Do not revert to non-volatile settings when changed by application. (#1586)

- Invalidate Active and Pending Datasets when configs are changed via APIs.
- Do not allow client to change network configurations while Thread is enabled.
This commit is contained in:
Jonathan Hui
2017-04-13 08:41:35 -07:00
committed by GitHub
parent b6e72560a9
commit 04d3032bab
6 changed files with 110 additions and 23 deletions
+3 -2
View File
@@ -1522,14 +1522,15 @@ otThreadGetExtendedPanId(
}
OTAPI
void
ThreadError
OTCALL
otThreadSetExtendedPanId(
_In_ otInstance *aInstance,
const uint8_t *aExtendedPanId
)
{
if (aInstance) (void)SetIOCTL(aInstance, IOCTL_OTLWF_OT_EXTENDED_PANID, (const otExtendedPanId*)aExtendedPanId);
if (aInstance == nullptr) return kThreadError_InvalidArgs;
return DwordToThreadError(SetIOCTL(aInstance, IOCTL_OTLWF_OT_EXTENDED_PANID, (const otExtendedPanId*)aExtendedPanId));
}
OTAPI
+1 -2
View File
@@ -1244,8 +1244,7 @@ otLwfIoCtl_otExtendedPanId(
if (InBufferLength >= sizeof(otExtendedPanId))
{
otThreadSetExtendedPanId(pFilter->otCtx, (uint8_t*)InBuffer);
status = STATUS_SUCCESS;
status = ThreadErrorToNtstatus(otThreadSetExtendedPanId(pFilter->otCtx, (uint8_t*)InBuffer));
*OutBufferLength = 0;
}
else if (*OutBufferLength >= sizeof(otExtendedPanId))