center-3xx: Fix blocking serial write timeout.

This fixes bug #428.
This commit is contained in:
Uwe Hermann 2015-09-13 23:48:09 +02:00
parent 5360d6d706
commit 84d328ac98
1 changed files with 2 additions and 1 deletions

View File

@ -34,7 +34,8 @@ static int center_send(struct sr_serial_dev_inst *serial, const char *cmd)
{
int ret;
if ((ret = serial_write_blocking(serial, cmd, strlen(cmd), 0)) < 0) {
if ((ret = serial_write_blocking(serial, cmd, strlen(cmd),
serial_timeout(serial, strlen(cmd)))) < 0) {
sr_err("Error sending '%s' command: %d.", cmd, ret);
return SR_ERR;
}