[posix] skip calling RadioReceiveDone with OT_ERROR_ABORT (#2779)

This commit changes the posix platform radio implementation by not
invoking the `RadioReceiveDone` callback with error `OT_ERROR_ABORT`.
This is added to help remove extra logs when simulating OpenThread in
posix mode.
This commit is contained in:
Abtin Keshavarzian
2018-06-12 09:23:03 -07:00
committed by Jonathan Hui
parent 8d21f72cf0
commit 674757aa44
+10 -8
View File
@@ -748,16 +748,18 @@ void radioProcessFrame(otInstance *aInstance)
exit:
if (error != OT_ERROR_ABORT)
{
#if OPENTHREAD_ENABLE_DIAG
if (otPlatDiagModeGet())
{
otPlatDiagRadioReceiveDone(aInstance, error == OT_ERROR_NONE ? &sReceiveFrame : NULL, error);
}
else
if (otPlatDiagModeGet())
{
otPlatDiagRadioReceiveDone(aInstance, error == OT_ERROR_NONE ? &sReceiveFrame : NULL, error);
}
else
#endif
{
otPlatRadioReceiveDone(aInstance, error == OT_ERROR_NONE ? &sReceiveFrame : NULL, error);
{
otPlatRadioReceiveDone(aInstance, error == OT_ERROR_NONE ? &sReceiveFrame : NULL, error);
}
}
}