cwalter-at / freemodbus

BSD licensed MODBUS RTU/ASCII and TCP slave
720 stars 379 forks source link

eMBPoll: return internal failures #11

Open karlp opened 4 years ago

karlp commented 4 years ago

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: https://github.com/cwalter-at/freemodbus/issues/8 Signed-off-by: Karl Palsson karlp@etactica.com