mirror of
https://github.com/espressif/openthread.git
synced 2026-09-15 21:50:08 +00:00
[data-poll] only allow data polling when rx-off-when-idle (#2770)
This commit is contained in:
@@ -71,7 +71,7 @@ otError DataPollManager::StartPolling(void)
|
|||||||
otError error = OT_ERROR_NONE;
|
otError error = OT_ERROR_NONE;
|
||||||
|
|
||||||
VerifyOrExit(!mEnabled, error = OT_ERROR_ALREADY);
|
VerifyOrExit(!mEnabled, error = OT_ERROR_ALREADY);
|
||||||
VerifyOrExit(!GetNetif().GetMle().IsFullThreadDevice(), error = OT_ERROR_INVALID_STATE);
|
VerifyOrExit(!GetNetif().GetMle().IsRxOnWhenIdle(), error = OT_ERROR_INVALID_STATE);
|
||||||
|
|
||||||
mEnabled = true;
|
mEnabled = true;
|
||||||
ScheduleNextPoll(kRecalculatePollPeriod);
|
ScheduleNextPoll(kRecalculatePollPeriod);
|
||||||
|
|||||||
Reference in New Issue
Block a user