[IOT-1775] Fix observer response handle logic
authorbg.chun <bg.chun@samsung.com>
Thu, 2 Feb 2017 01:41:09 +0000 (10:41 +0900)
committerDan Mihai <Daniel.Mihai@microsoft.com>
Mon, 6 Feb 2017 21:34:35 +0000 (21:34 +0000)
Fix observer response handle logic to return OC_STACK_OK,
cases of observer request fail and observer cancel response
will handled with this logic.
[As is]
return OC_STACK_UNAUTHORIZED_REQ
[To be]
return OC_STACK_OK

Change-Id: I7e36775b71d6e4baa3f611b27c2e1cec46779b66
Signed-off-by: bg.chun <bg.chun@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/16999
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: jihwan seo <jihwan.seo@samsung.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
resource/csdk/stack/src/ocstack.c

index 42cdb99..5a1f243 100644 (file)
@@ -1368,7 +1368,9 @@ void OCHandleResponse(const CAEndpoint_t* endPoint, const CAResponseInfo_t* resp
             memcpy(response->identity.id, responseInfo->info.identity.id,
                                     sizeof (response->identity.id));
             response->identity.id_length = responseInfo->info.identity.id_length;
-            response->result = OC_STACK_UNAUTHORIZED_REQ;
+            response->result = OC_STACK_OK;
+
+            OIC_LOG(DEBUG, TAG, "This is response of observer cancel or observer request fail");
 
             cbNode->callBack(cbNode->context,
                              cbNode->handle,