Extended mbus_recv_frame() error codes, improved collision handling
- handling TCP connection reset and read(2) timeout
This commit is contained in:
6
bin/mbus-tcp-request-data.c
Normal file → Executable file
6
bin/mbus-tcp-request-data.c
Normal file → Executable file
@ -111,11 +111,11 @@ main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
if (mbus_recv_frame(handle, &reply) == -1)
|
||||
if (mbus_recv_frame(handle, &reply) != 0)
|
||||
{
|
||||
fprintf(stderr, "Failed to receive M-Bus response frame.\n");
|
||||
fprintf(stderr, "Failed to receive M-Bus response frame: %s\n", mbus_error_str());
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// parse data and print in XML format
|
||||
|
Reference in New Issue
Block a user