From 896e1a45e0f7004a993c9d5d7928f284f2ba91cf Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Sun, 13 Sep 2015 23:20:03 +0200 Subject: [PATCH] manson-hcs-3xxx: Fix blocking serial write timeout. This fixes bug #437. --- src/hardware/manson-hcs-3xxx/protocol.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/hardware/manson-hcs-3xxx/protocol.c b/src/hardware/manson-hcs-3xxx/protocol.c index ad31d429..6521a451 100644 --- a/src/hardware/manson-hcs-3xxx/protocol.c +++ b/src/hardware/manson-hcs-3xxx/protocol.c @@ -44,7 +44,8 @@ SR_PRIV int hcs_send_cmd(struct sr_serial_dev_inst *serial, const char *cmd, ... sr_dbg("Sending '%s'.", cmd_esc); g_free(cmd_esc); - if ((ret = serial_write_blocking(serial, cmdbuf, strlen(cmdbuf), 0)) < 0) { + if ((ret = serial_write_blocking(serial, cmdbuf, strlen(cmdbuf), + serial_timeout(serial, strlen(cmdbuf)))) < 0) { sr_err("Error sending command: %d.", ret); return ret; }