Fix return value and error message

This commit is contained in:
Stefan Wahren 2013-05-13 08:47:19 +02:00
parent 858aea33ab
commit d7168a4ea4

View File

@ -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));