[data-poll-sender] change StopFastPolls() to return void (#4941)

This commit is contained in:
Jonathan Hui
2020-05-11 12:44:54 -07:00
parent 11db44e36a
commit 8a27e6da83
3 changed files with 5 additions and 10 deletions
+3 -5
View File
@@ -378,10 +378,8 @@ void DataPollSender::SendFastPolls(uint8_t aNumFastPolls)
}
}
otError DataPollSender::StopFastPolls(void)
void DataPollSender::StopFastPolls(void)
{
otError error = OT_ERROR_NONE;
VerifyOrExit(mFastPollsUsers != 0, OT_NOOP);
// If `mFastPollsUsers` hits the max, let it be cleared
@@ -390,13 +388,13 @@ otError DataPollSender::StopFastPolls(void)
mFastPollsUsers--;
VerifyOrExit(mFastPollsUsers == 0, error = OT_ERROR_BUSY);
VerifyOrExit(mFastPollsUsers == 0, OT_NOOP);
mRemainingFastPolls = 0;
ScheduleNextPoll(kRecalculatePollPeriod);
exit:
return error;
return;
}
void DataPollSender::ResetKeepAliveTimer(void)
+1 -4
View File
@@ -215,11 +215,8 @@ public:
/**
* This method asks data poll sender to stop fast polls when the expecting response is received.
*
* @retval OT_ERROR_NONE Successfully stopped fast polls when no other responses are expected.
* @retval OT_ERROR_BUSY There are other callers who are waiting for responses.
*
*/
otError StopFastPolls(void);
void StopFastPolls(void);
/**
* This method gets the maximum data polling period in use.
+1 -1
View File
@@ -2955,7 +2955,7 @@ void Mle::HandleDataResponse(const Message &aMessage, const Ip6::MessageInfo &aM
// running out the specified number. E.g. other component also trigger fast poll, and
// is waiting for response; or the corner case where multiple Mle Data Request attempts
// happened due to the retransmission mechanism.
IgnoreError(Get<DataPollSender>().StopFastPolls());
Get<DataPollSender>().StopFastPolls();
}
exit: