This call was previously nonblocking, but has no partial write handling.
It is called in the scan where it is free to block.
nmadmm_requests[NMADMM_REQ_IDN].req_str);
g_usleep(150 * 1000); /* Wait a little to allow serial port to settle. */
for (cnt = 0; cnt < 7; cnt++) {
- if (serial_write(serial, req, strlen(req)) == -1) {
- sr_err("Unable to send identification request: %d %s.",
- errno, strerror(errno));
+ if (serial_write_blocking(serial, req, strlen(req)) < 0) {
+ sr_err("Unable to send identification request.");
return NULL;
}
len = BUF_MAX;