This is an automated email from Gerrit.

Andrii Anpilogov (anpi...@gmail.com) just uploaded a new patch set to Gerrit, 
which you can find at http://openocd.zylin.com/3226

-- gerrit

commit 4c0602aa681e72178d772233fe046acd553eb5f4
Author: anpilog <anpi...@gmail.com>
Date:   Fri Jan 29 17:20:20 2016 +0800

    topic: Fix CMSIS-DAP serial number processing.
    
    Check CMSIS-DAP adapter has serialnumber before pass it to wcscmp.
    Keep looking for onother adapter if choosed one doesn't have correct
    serialnumber.
    
    Change-Id: I7d386a03cb49b9baf22073ae1c6b14269ed3b618
    Signed-off-by: Andrii Anpilogov <anpi...@gmail.com>

diff --git a/src/jtag/drivers/cmsis_dap_usb.c b/src/jtag/drivers/cmsis_dap_usb.c
index ff8b8ff..437d482 100644
--- a/src/jtag/drivers/cmsis_dap_usb.c
+++ b/src/jtag/drivers/cmsis_dap_usb.c
@@ -213,13 +213,13 @@ static int cmsis_dap_usb_open(void)
                if (found) {
                        /* we have found an adapter, so exit further checks */
                        /* check serial number matches if given */
-                       if (cmsis_dap_serial != NULL) {
+                       if (cmsis_dap_serial != NULL && cur_dev->serial_number 
!= NULL) {
                                if (wcscmp(cmsis_dap_serial, 
cur_dev->serial_number) == 0) {
                                        serial_found = true;
                                        break;
                                }
-                       } else
-                               break;
+                       }
+                       found = false;
                }
 
                cur_dev = cur_dev->next;

-- 

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to