[data-poll-handler] update the logging of indirect tx failure (#4058)

This commit changes data poll handler to log an indirect tx failure
only when the tx attempt counter is increased (i.e., when there is a
no-ack error).
This commit is contained in:
Abtin Keshavarzian
2019-08-05 11:10:31 -07:00
committed by Jonathan Hui
parent 14875e1380
commit 78f602df42
+3 -3
View File
@@ -236,6 +236,9 @@ void DataPollHandler::HandleSentFrame(const Mac::TxFrame &aFrame, otError aError
case OT_ERROR_NO_ACK:
aChild.IncrementIndirectTxAttempts();
otLogInfoMac("Indirect tx to child %04x failed, attempt %d/%d", aChild.GetRloc16(),
aChild.GetIndirectTxAttempts(), kMaxPollTriggeredTxAttempts);
// Fall through
case OT_ERROR_CHANNEL_ACCESS_FAILURE:
@@ -249,9 +252,6 @@ void DataPollHandler::HandleSentFrame(const Mac::TxFrame &aFrame, otError aError
ExitNow();
}
otLogInfoMac("Indirect tx to child %04x failed, attempt %d/%d, error:%s", aChild.GetRloc16(),
aChild.GetIndirectTxAttempts(), kMaxPollTriggeredTxAttempts, otThreadErrorToString(aError));
if (aChild.GetIndirectTxAttempts() < kMaxPollTriggeredTxAttempts)
{
// We save the frame counter, key id, and data sequence number of