This call is executed from an event handler and was previously nonblocking,
but has no partial write handling. It sends a short packet so should be OK
to block, most likely the output buffer will be empty anyway.
struct sr_serial_dev_inst *serial;
serial = sdi->conn;
- if (serial_write(serial, packet, PACKET_SIZE) == -1)
+ if (serial_write_blocking(serial, packet, PACKET_SIZE) == -1)
sr_dbg("Failed to send packet: %s", strerror(errno));
dump_packet("sent", packet);
}