Delete client callback for error response. 89/213989/1
authorSenthil Kumar G S <senthil.gs@samsung.com>
Mon, 9 Sep 2019 12:36:31 +0000 (18:06 +0530)
committerSudipto <sudipto.bal@samsung.com>
Tue, 17 Sep 2019 06:17:39 +0000 (11:47 +0530)
After invoking application's callback from HandleCAErrorResponse(),
client callback is not removed from client callback list ('cbList').
This patch removes it.

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/commit/2aed3ca47526d7cb49e779ce3d4bab925738ed40
(cherry-picked from 2aed3ca47526d7cb49e779ce3d4bab925738ed40)

Change-Id: I4e1732a3b47ba2879e02ad91577bb21264c764ae
Signed-off-by: Senthil Kumar G S <senthil.gs@samsung.com>
Signed-off-by: Sudipto <sudipto.bal@samsung.com>
resource/csdk/stack/src/ocstack.c

index a8198ce..9505f26 100644 (file)
@@ -1845,6 +1845,8 @@ void HandleCAErrorResponse(const CAEndpoint_t *endPoint, const CAErrorInfo_t *er
         OIC_LOG(INFO, TAG, "Before calling into application address space for error response");
         cbNode->callBack(cbNode->context, cbNode->handle, &response);
         OIC_LOG(INFO, TAG, "After calling into application address space for error response");
+
+        FindAndDeleteClientCB(cbNode);
     }
 
     ResourceObserver *observer = GetObserverUsingToken(errorInfo->info.token,