From: sahil bansal Date: Thu, 17 Mar 2016 11:20:01 +0000 (+0530) Subject: Correcting error case return value X-Git-Tag: 1.2.0+RC1~508 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9f100da0a2770f6afd9f6b4af3f88151efb58ef1;p=platform%2Fupstream%2Fiotivity.git Correcting error case return value Change-Id: If1b1e8e0674ab37461f95a8fae0a22b026fe4ce6 Signed-off-by: sahil bansal Reviewed-on: https://gerrit.iotivity.org/gerrit/6011 Reviewed-by: Joonghwan Lee Tested-by: jenkins-iotivity Reviewed-by: Randeep Singh --- diff --git a/resource/csdk/stack/src/ocstack.c b/resource/csdk/stack/src/ocstack.c index 1302699..6e580a7 100644 --- a/resource/csdk/stack/src/ocstack.c +++ b/resource/csdk/stack/src/ocstack.c @@ -3902,12 +3902,17 @@ OCStackResult OCDoDirectPairing(OCDPDev_t* peer, OCPrm_t pmSel, char *pinNumber, OCDirectPairingCB resultCallback) { OIC_LOG(INFO, TAG, "Start OCDoDirectPairing"); - if(NULL == peer || NULL == resultCallback) + if(NULL == peer) { OIC_LOG(ERROR, TAG, "Invalid parameters"); return OC_STACK_INVALID_PARAM; } + if(NULL == resultCallback) + { + OIC_LOG(ERROR, TAG, "Invalid parameters"); + return OC_STACK_INVALID_CALLBACK; + } gDirectpairingCallback = resultCallback; return DPDirectPairing((OCDirectPairingDev_t*)peer, (OicSecPrm_t)pmSel, pinNumber, DirectPairingCB);