*/
OCStackResult OCResetDevice(void* ctx, unsigned short waitTimeForOwnedDeviceDiscovery,
const OCProvisionDev_t* pTargetDev,
- OCProvisionResultCB resultCallback)
+ OCProvisionResultCB resultCallback,
+ OCClientContextDeleter deleteCallback)
{
OIC_LOG(INFO, TAG, "IN OCResetDevice");
OCStackResult res = OC_STACK_ERROR;
OIC_LOG(INFO, TAG, "OCResetDevice : Invalid parameters");
return OC_STACK_INVALID_PARAM;
}
- if (!resultCallback)
+ if (!deleteCallback || !resultCallback)
{
OIC_LOG(INFO, TAG, "OCResetDevice : NULL Callback");
return OC_STACK_INVALID_CALLBACK;
{
resultCallback(ctx, 0, NULL, false);
}
- SRPResetDevice(pTargetDev, resultCallback);
+ SRPResetDevice(pTargetDev, deleteCallback);
res = OC_STACK_OK;
}
else if(OC_STACK_OK != res)