[IOT-2300] Call callback when delete roles resource 69/20269/3 mbedtls 1.3.0-RC3
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 fd15922..625d4cf 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");