Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Improved error message in case of unknown Control Code

  • Loading branch information...
commit 1db372e7abef198aaef9fa1c9ee1862afa154df1 1 parent e2400f5
@lategoodbye authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 mbus/mbus-protocol.c
View
4 mbus/mbus-protocol.c
@@ -298,7 +298,7 @@ mbus_frame_verify(mbus_frame *frame)
(frame->control != MBUS_CONTROL_MASK_REQ_UD2) &&
(frame->control != MBUS_CONTROL_MASK_REQ_UD2 | MBUS_CONTROL_MASK_FCB))
{
- snprintf(error_str, sizeof(error_str), "Unknown Control Code for Short Frame");
+ snprintf(error_str, sizeof(error_str), "Unknown Control Code 0x%.2x", frame->control);
return -1;
}
@@ -322,7 +322,7 @@ mbus_frame_verify(mbus_frame *frame)
(frame->control != MBUS_CONTROL_MASK_RSP_UD | MBUS_CONTROL_MASK_ACD) &&
(frame->control != MBUS_CONTROL_MASK_RSP_UD | MBUS_CONTROL_MASK_DFC | MBUS_CONTROL_MASK_ACD))
{
- snprintf(error_str, sizeof(error_str), "Unknown Control Code for Long/Control Frame");
+ snprintf(error_str, sizeof(error_str), "Unknown Control Code 0x%.2x", frame->control);
return -1;
}
Please sign in to comment.
Something went wrong with that request. Please try again.