Skip to content

Commit

Permalink
eMBPoll: return internal failures
Browse files Browse the repository at this point in the history
Status flags are returned by the internal peMBFrameReceiveCur and
peMBFrameSendCur handlers, but were being ignored, with the function
simply always returning MB_ENOERR unless the entire eMBState was
invalid.

This should allow better stats collecting from the outside of eMBPoll

Fixes: cwalter-at#8
Signed-off-by: Karl Palsson <[email protected]>
  • Loading branch information
karlp committed Aug 26, 2019
1 parent f167010 commit b7e6879
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modbus/mb.c
Original file line number Diff line number Diff line change
Expand Up @@ -407,5 +407,5 @@ eMBPoll( void )
break;
}
}
return MB_ENOERR;
return eStatus;
}

0 comments on commit b7e6879

Please sign in to comment.