[IOT-2300] Call callback when delete roles resource
authorGreg Zaverucha <gregz@microsoft.com>
Mon, 22 May 2017 18:26:06 +0000 (11:26 -0700)
committerRandeep Singh <randeep.s@samsung.com>
Tue, 23 May 2017 08:44:59 +0000 (08:44 +0000)
When deleteting roles with OCDeleteRoleCertificateByCredId, the
callback provided by the caller was not being called.

Change-Id: I51da5fe61760ff5561fd676e5c220905f106f512
Signed-off-by: Greg Zaverucha <gregz@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20269
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
resource/csdk/security/provisioning/src/secureresourceprovider.c

index fd15922487f0cde4732fa4ee5e11ca6fc8491a44..625d4cf6f7fec18ca245c780696678911141b6e1 100644 (file)
@@ -3480,6 +3480,7 @@ static OCStackApplicationResult SRPDeleteRoleCertificateCB(void *ctx, OCDoHandle
 {
     OC_UNUSED(UNUSED);
     GetSecData_t *getSecData = (GetSecData_t *)ctx;
+    OCProvisionResultCB resultCallback = getSecData->resultCallback;
 
     OIC_LOG(DEBUG, TAG, "SRPDeleteRoleCertificateCB IN");
 
@@ -3489,6 +3490,7 @@ static OCStackApplicationResult SRPDeleteRoleCertificateCB(void *ctx, OCDoHandle
             getSecData->deviceInfo->doxm->deviceID.id, UUID_LENGTH);
         getSecData->resArr[(getSecData->numOfResults)].res = clientResponse->result;
         ++(getSecData->numOfResults);
+        resultCallback(getSecData->ctx, getSecData->numOfResults, getSecData->resArr, false);
     }
 
     OIC_LOG(DEBUG, TAG, "SRPDeleteRoleCertificateCB OUT");