When a driver has multiple cables, UrJTAG will try them one by one.
When a suitable cable has been found, the error from the last fail
trial should be cleared to avoid confusing error reporting. Committed.

Regards,
Jie
  * src/tap/cable/generic_usbconn.c (urj_tap_cable_generic_usbconn_connect):
    Clear connection error if a suitable cable has been found.

Index: src/tap/cable/generic_usbconn.c
===================================================================
--- src/tap/cable/generic_usbconn.c	(revision 1972)
+++ src/tap/cable/generic_usbconn.c	(working copy)
@@ -137,6 +137,13 @@ urj_tap_cable_generic_usbconn_connect (u
                  _("Couldn't connect to suitable USB device.\n"));
         return URJ_STATUS_FAIL;
     }
+    else
+    {
+        /* If some cables have been tried before a suitable cable is found,
+           urj_error will still contain an error from the last fail trial.
+           Clear it to avoid confusing error reporting.  */
+        urj_error_reset ();
+    }
 
     cable_params = malloc (sizeof (urj_tap_cable_generic_params_t));
     if (!cable_params)
------------------------------------------------------------------------------
Storage Efficiency Calculator
This modeling tool is based on patent-pending intellectual property that
has been used successfully in hundreds of IBM storage optimization engage-
ments, worldwide.  Store less, Store more with what you own, Move data to 
the right place. Try It Now! http://www.accelacomm.com/jaw/sfnl/114/51427378/
_______________________________________________
UrJTAG-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/urjtag-development

Reply via email to