Resolved JIRA issue [IOT-999]
authorRandeep Singh <randeep.s@samsung.com>
Wed, 23 Mar 2016 12:43:23 +0000 (18:13 +0530)
committerRandeep Singh <randeep.s@samsung.com>
Wed, 23 Mar 2016 14:09:13 +0000 (14:09 +0000)
Change-Id: Iba57ff1bf4f82619ec21e5f905b692608a9aff70
Signed-off-by: saurabh.s9 <saurabh.s9@samsung.com>
Signed-off-by: Randeep Singh <randeep.s@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/6175
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
resource/provisioning/src/OCProvisioningManager.cpp

index 0fc4d0226a87c6ef4ee3e1d8500c41e26b255b54..751ed441b88d894e7573befa0128960b44edc29d 100644 (file)
@@ -279,7 +279,7 @@ namespace OC
         if(!resultCallback)
         {
             oclog() <<"Result callback can't be null";
-            return OC_STACK_INVALID_PARAM;
+            return OC_STACK_INVALID_CALLBACK;
         }
 
         OCStackResult result;
@@ -304,11 +304,16 @@ namespace OC
     OCStackResult OCSecureResource::provisionACL( const OicSecAcl_t* acl,
             ResultCallBack resultCallback)
     {
-        if(!resultCallback || !acl)
+        if(!acl)
         {
-            oclog() <<"Result callback or ACL can't be null";
+            oclog() <<"ACL can't be null";
             return OC_STACK_INVALID_PARAM;
         }
+        if(!resultCallback)
+        {
+            oclog() <<"result callback can not be null";
+            return OC_STACK_INVALID_CALLBACK;
+        }
 
         OCStackResult result;
         auto cLock = m_csdkLock.lock();
@@ -336,7 +341,7 @@ namespace OC
         if(!resultCallback)
         {
             oclog() << "Result calback can't be null";
-            return OC_STACK_INVALID_PARAM;
+            return OC_STACK_INVALID_CALLBACK;
         }
 
         OCStackResult result;
@@ -367,8 +372,8 @@ namespace OC
     {
         if(!resultCallback)
         {
-            oclog() << "Result calback can't be null";
-            return OC_STACK_INVALID_PARAM;
+            oclog() << "Result callback can not be null";
+            return OC_STACK_INVALID_CALLBACK;
         }
 
         OCStackResult result;
@@ -400,7 +405,7 @@ namespace OC
         if(!resultCallback)
         {
             oclog() << "Result calback can't be null";
-            return OC_STACK_INVALID_PARAM;
+            return OC_STACK_INVALID_CALLBACK;
         }
 
         OCStackResult result;
@@ -429,7 +434,7 @@ namespace OC
         if(!resultCallback)
         {
             oclog() << "Result calback can't be null";
-            return OC_STACK_INVALID_PARAM;
+            return OC_STACK_INVALID_CALLBACK;
         }
 
         OCStackResult result;