This call is executed from an event handler context was previously
nonblocking, however there is no handling for a partial write.
The output buffer is unlikely to be full and the commands to be sent
are short, so it should be OK to make this a blocking call.
strncat(buf, "\r\n", 32);
else
strncat(buf, "\n\r\n", 32);
- if (serial_write(serial, buf, strlen(buf)) == -1) {
+ if (serial_write_blocking(serial, buf, strlen(buf)) == -1) {
sr_err("Failed to send: %s.", strerror(errno));
return SR_ERR;
}