From 78f602df42ce651441489fe2cd6cd1381b5b55c8 Mon Sep 17 00:00:00 2001 From: Abtin Keshavarzian Date: Mon, 5 Aug 2019 11:10:31 -0700 Subject: [PATCH] [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). --- src/core/mac/data_poll_handler.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/mac/data_poll_handler.cpp b/src/core/mac/data_poll_handler.cpp index 55d4c4316..dc9d9885b 100644 --- a/src/core/mac/data_poll_handler.cpp +++ b/src/core/mac/data_poll_handler.cpp @@ -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