Fixed mbus_recv_frame() return value to -1 when invalid m-bus handle

This commit is contained in:
jakubovsky 2012-07-03 16:47:11 +02:00
parent 5d079254cc
commit 9f9e0fc008

View File

@ -1386,7 +1386,7 @@ mbus_recv_frame(mbus_handle * handle, mbus_frame *frame)
if (handle == NULL) if (handle == NULL)
{ {
MBUS_ERROR("%s: Invalid M-Bus handle for receive.\n", __PRETTY_FUNCTION__); MBUS_ERROR("%s: Invalid M-Bus handle for receive.\n", __PRETTY_FUNCTION__);
return 0; return -1;
} }
if (handle->is_serial) if (handle->is_serial)