mirror of
https://github.com/espressif/openthread.git
synced 2026-09-06 17:20:09 +00:00
[data-poll-manager] check user-specified poll period (#3401)
This commit is contained in:
@@ -164,7 +164,7 @@ public:
|
||||
property uint32_t PollPeriod
|
||||
{
|
||||
uint32_t get() { return otLinkGetPollPeriod(DeviceInstance); }
|
||||
void set(uint32_t value) { otLinkSetPollPeriod(DeviceInstance, value); }
|
||||
void set(uint32_t value) { ThrowOnFailure(otLinkSetPollPeriod(DeviceInstance, value)); }
|
||||
}
|
||||
|
||||
property uint8_t Channel
|
||||
|
||||
@@ -2424,15 +2424,19 @@ otLinkGetPollPeriod(
|
||||
return Result;
|
||||
}
|
||||
|
||||
OTAPI
|
||||
void
|
||||
OTAPI
|
||||
otError
|
||||
OTCALL
|
||||
otLinkSetPollPeriod(
|
||||
_In_ otInstance *aInstance,
|
||||
_In_ otInstance *aInstance,
|
||||
uint32_t aPollPeriod
|
||||
)
|
||||
{
|
||||
if (aInstance) (void)SetIOCTL(aInstance, IOCTL_OTLWF_OT_POLL_PERIOD, aPollPeriod);
|
||||
otError result = OT_ERROR_INVALID_ARGS;
|
||||
|
||||
if (aInstance) result = DwordToThreadError(SetIOCTL(aInstance, IOCTL_OTLWF_OT_POLL_PERIOD, aPollPeriod));
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
OTAPI
|
||||
|
||||
@@ -4971,8 +4971,7 @@ otLwfIoCtl_otPollPeriod(
|
||||
|
||||
if (InBufferLength >= sizeof(uint32_t))
|
||||
{
|
||||
otLinkSetPollPeriod(pFilter->otCtx, *(uint32_t*)InBuffer);
|
||||
status = STATUS_SUCCESS;
|
||||
status = ThreadErrorToNtstatus(otLinkSetPollPeriod(pFilter->otCtx, *(uint32_t*)InBuffer));
|
||||
*OutBufferLength = 0;
|
||||
}
|
||||
else if (*OutBufferLength >= sizeof(uint32_t))
|
||||
|
||||
Reference in New Issue
Block a user