Fix return value and error message
This commit is contained in:
parent
858aea33ab
commit
d7168a4ea4
@ -291,7 +291,8 @@ mbus_serial_recv_frame(mbus_handle *handle, mbus_frame *frame)
|
||||
// Make sure serial connection is open
|
||||
if (isatty(handle->fd) == 0)
|
||||
{
|
||||
return -1;
|
||||
fprintf(stderr, "%s: Serial connection is not available.\n", __PRETTY_FUNCTION__);
|
||||
return MBUS_RECV_RESULT_ERROR;
|
||||
}
|
||||
|
||||
memset((void *)buff, 0, sizeof(buff));
|
||||
|
Loading…
x
Reference in New Issue
Block a user