handle direction of ACK correctly

This commit is contained in:
Stefan Wahren 2012-10-04 23:20:28 +02:00
parent da28505323
commit 30ab8dd643

View File

@ -307,9 +307,16 @@ int
mbus_frame_direction(mbus_frame *frame)
{
if (frame)
{
if (frame->type == MBUS_FRAME_TYPE_ACK)
{
return MBUS_CONTROL_MASK_DIR_S2M;
}
else
{
return (frame->control & MBUS_CONTROL_MASK_DIR);
}
}
return -1;
}