Removed clientCB delete logic when we received error from CA
authorhyuna0213.jo <hyuna0213.jo@samsung.com>
Thu, 11 Aug 2016 08:08:20 +0000 (17:08 +0900)
committerAshok Babu Channa <ashok.channa@samsung.com>
Fri, 26 Aug 2016 05:31:00 +0000 (05:31 +0000)
If we remove clientCB when we received error message from CA,
we cann't receive the other response message in case request message
is sent over multi transport. so clientCB shouldn't be removed.

Change-Id: I5289fe4892a32f7da1d84cf3f50493e260e4eada
Signed-off-by: hyuna0213.jo <hyuna0213.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10257
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
android/android_api/base/jni/JniOnResourceFoundListener.cpp
resource/csdk/stack/src/ocstack.c

index eb9f9d9..c1a04b1 100644 (file)
@@ -184,7 +184,6 @@ void JniOnResourceFoundListener::findResourceErrorCallback(const std::string& ur
     }
     env->CallVoidMethod(jListener, midL, ex, env->NewStringUTF(uri.c_str()));
 
-    checkExAndRemoveListener(env);
     if (JNI_EDETACHED == ret)
     {
         g_jvm->DetachCurrentThread();
index 2ec4e89..f05d633 100644 (file)
@@ -1594,7 +1594,6 @@ void HandleCAErrorResponse(const CAEndpoint_t *endPoint, const CAErrorInfo_t *er
         response.result = CAResultToOCStackResult(errorInfo->result);
 
         cbNode->callBack(cbNode->context, cbNode->handle, &response);
-        FindAndDeleteClientCB(cbNode);
     }
 
     OIC_LOG(INFO, TAG, "Exit HandleCAErrorResponse");