Always wait until complete frame has been transmitted

This commit is contained in:
Stefan Wahren 2012-06-11 21:22:31 +02:00
parent 2f5476c3a5
commit 7c304b34a0

View File

@ -212,6 +212,11 @@ mbus_serial_send_frame(mbus_serial_handle *handle, mbus_frame *frame)
fprintf(stderr, "%s: Failed to write frame to socket (ret = %d: %s)\n", __PRETTY_FUNCTION__, ret, strerror(errno));
return -1;
}
//
// wait until complete frame has been transmitted
//
tcdrain(handle->fd);
return 0;
}