mirror of
https://github.com/siemens-mobile-hacks/node-serialport-bindings-cpp.git
synced 2026-11-26 02:47:17 +00:00
Check write(...) errno #43
This commit is contained in:
parent
30c9015965
commit
543a2cd1a3
1 changed files with 4 additions and 2 deletions
|
|
@ -231,9 +231,11 @@ void EIO_Write(uv_work_t* req) {
|
|||
QueuedWrite* queuedWrite = static_cast<QueuedWrite*>(req->data);
|
||||
WriteBaton* data = static_cast<WriteBaton*>(queuedWrite->baton);
|
||||
|
||||
int bytesWritten = write(data->fd, data->bufferData, data->bufferLength);
|
||||
data->result = write(data->fd, data->bufferData, data->bufferLength);
|
||||
if ( data->result == -1 ) {
|
||||
printf( "Error %d calling write(...)\n", errno );
|
||||
}
|
||||
|
||||
data->result = bytesWritten;
|
||||
}
|
||||
|
||||
void EIO_Close(uv_work_t* req) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue