Update snapshot(2018-01-10)
[platform/upstream/iotivity.git] / resource / csdk / security / provisioning / src / ocprovisioningmanager.c
index ffd1256..afdc839 100644 (file)
@@ -857,7 +857,8 @@ error:
  */
 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;
@@ -866,7 +867,7 @@ OCStackResult OCResetDevice(void* ctx, unsigned short waitTimeForOwnedDeviceDisc
         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;
@@ -881,7 +882,7 @@ OCStackResult OCResetDevice(void* ctx, unsigned short waitTimeForOwnedDeviceDisc
         {
             resultCallback(ctx, 0, NULL, false);
         }
-        SRPResetDevice(pTargetDev, resultCallback);
+        SRPResetDevice(pTargetDev, deleteCallback);
         res = OC_STACK_OK;
     }
     else if(OC_STACK_OK != res)