Do not ignore return value of request callback.
authorTodd Malsbary <todd.malsbary@intel.com>
Mon, 25 Sep 2017 21:13:50 +0000 (14:13 -0700)
committerAshok Babu Channa <ashok.channa@samsung.com>
Tue, 3 Oct 2017 06:27:32 +0000 (06:27 +0000)
Bug: https://jira.iotivity.org/browse/IOT-2757
Change-Id: I6a3056db8fce56ac615729de9c8e4747c83446bc
Signed-off-by: Todd Malsbary <todd.malsbary@intel.com>
resource/csdk/stack/src/ocstack.c

index 38d0fc30dda8146b7254d458e79e0c480eb204e9..278cb7cf00db83170268bfcf9df8c65ea9a0e754 100644 (file)
@@ -2152,7 +2152,11 @@ void HandleCAErrorResponse(const CAEndpoint_t *endPoint, const CAErrorInfo_t *er
         response->identity.id_length = errorInfo->info.identity.id_length;
         response->result = CAResultToOCResult(errorInfo->result);
 
-        cbNode->callBack(cbNode->context, cbNode->handle, response);
+        OCStackApplicationResult cbResult = cbNode->callBack(cbNode->context, cbNode->handle, response);
+        if (cbResult == OC_STACK_DELETE_TRANSACTION)
+        {
+            FindAndDeleteClientCB(cbNode);
+        }
         OICFree(response);
     }