Work around serial number issues.
commit7e0508d8487f65f71411117dff2e0b093e00bc80
authorAndreas Färber <afaerber@suse.de>
Sun, 25 Oct 2015 19:30:19 +0000 (25 20:30 +0100)
committerMarc Schink <jaylink-dev@marcschink.de>
Tue, 24 Nov 2015 19:25:44 +0000 (24 20:25 +0100)
treed70fd22b4800257dd42818636d207d566a6d5926
parent1f9ae2f5052872fd99d972a760fe8451b4179e71
Work around serial number issues.

The firmware "J-Link ARM-OB SAM7 compiled Jun  1 2012 09:33:42",
which is used in the Renesas Promotion Board RPBRX62N for example,
sometimes times out on reading the serial number which makes the device
undiscoverable although it works properly for the rest.

It appears that SEGGER handles this by just ignoring the timeout.
This patch implements the same behaviour. Additionally, the API of
jaylink_device_get_serial_number() is changed to indicate when the
serial number of a device is not available.

Signed-off-by: Andreas Färber <afaerber@suse.de>
Tested-by: Andreas Färber <afaerber@suse.de>
[Add valid_serial_number field and change API.]
Signed-off-by: Marc Schink <jaylink-dev@marcschink.de>
libjaylink/device.c
libjaylink/discovery.c
libjaylink/libjaylink-internal.h