Delete client callback with OCCancel. 93/22093/7
authorJaehong Jo <jaehong.jo@samsung.com>
Tue, 23 May 2017 05:44:50 +0000 (14:44 +0900)
committerUze Choi <uzchoi@samsung.com>
Thu, 19 Oct 2017 06:53:06 +0000 (06:53 +0000)
Change-Id: I3bde95b535fcbfd3290a7b9ae0610c3e9333be7a
Signed-off-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20299
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
(cherry picked from commit 94429e77972ccabbbaed53a850d4de27fa56de9c)

resource/csdk/stack/src/ocstack.c

index 56cfeb0..f3505b3 100644 (file)
@@ -3819,6 +3819,14 @@ OCStackResult OC_CALL OCCancel(OCDoHandle handle, OCQualityOfService qos, OCHead
             FindAndDeleteClientCB(clientCB);
             break;
 #endif
+        case OC_REST_GET:
+        case OC_REST_PUT:
+        case OC_REST_POST:
+        case OC_REST_DELETE:
+            OIC_LOG_V(INFO, TAG, "Cancelling request callback for resource %s",
+                                           clientCB->requestUri);
+            FindAndDeleteClientCB(clientCB);
+            break;
 
         default:
             ret = OC_STACK_INVALID_METHOD;