Don't ignore handshaking errors
This commit is contained in:
parent
6e9278ff24
commit
3daba977e0
@ -228,7 +228,11 @@ uwatec_meridian_device_open (dc_device_t **out, dc_context_t *context, const cha
|
|||||||
dc_serial_purge (device->port, DC_DIRECTION_ALL);
|
dc_serial_purge (device->port, DC_DIRECTION_ALL);
|
||||||
|
|
||||||
// Perform the handshaking.
|
// Perform the handshaking.
|
||||||
uwatec_meridian_handshake (device);
|
status = uwatec_meridian_handshake (device);
|
||||||
|
if (status != DC_STATUS_SUCCESS) {
|
||||||
|
ERROR (context, "Failed to handshake with the device.");
|
||||||
|
goto error_close;
|
||||||
|
}
|
||||||
|
|
||||||
*out = (dc_device_t*) device;
|
*out = (dc_device_t*) device;
|
||||||
|
|
||||||
|
|||||||
@ -191,7 +191,11 @@ uwatec_smart_device_open (dc_device_t **out, dc_context_t *context)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Perform the handshaking.
|
// Perform the handshaking.
|
||||||
uwatec_smart_handshake (device);
|
status = uwatec_smart_handshake (device);
|
||||||
|
if (status != DC_STATUS_SUCCESS) {
|
||||||
|
ERROR (context, "Failed to handshake with the device.");
|
||||||
|
goto error_close;
|
||||||
|
}
|
||||||
|
|
||||||
*out = (dc_device_t*) device;
|
*out = (dc_device_t*) device;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user