From 841fb714a3f11bac09db7c8b3c57f587fc5d5518 Mon Sep 17 00:00:00 2001 From: Randeep Singh Date: Wed, 23 Mar 2016 18:13:23 +0530 Subject: [PATCH] Resolved JIRA issue [IOT-999] Change-Id: Iba57ff1bf4f82619ec21e5f905b692608a9aff70 Signed-off-by: saurabh.s9 Signed-off-by: Randeep Singh Reviewed-on: https://gerrit.iotivity.org/gerrit/6175 Tested-by: jenkins-iotivity --- resource/provisioning/src/OCProvisioningManager.cpp | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/resource/provisioning/src/OCProvisioningManager.cpp b/resource/provisioning/src/OCProvisioningManager.cpp index 0fc4d02..751ed44 100644 --- a/resource/provisioning/src/OCProvisioningManager.cpp +++ b/resource/provisioning/src/OCProvisioningManager.cpp @@ -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; -- 2.7.4