mirror of
https://github.com/espressif/openthread.git
synced 2026-08-07 19:27:46 +00:00
[data-poll-sender] change StopFastPolls() to return void (#4941)
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user