From: Jaehong Jo Date: Tue, 20 Sep 2016 07:48:35 +0000 (+0900) Subject: [IOT-1335] Add check connectivityType when cancelObserve. X-Git-Tag: 1.3.0~1057^2~66 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=999af9c523f7d955c9d2baa94169da566e90c094;p=platform%2Fupstream%2Fiotivity.git [IOT-1335] Add check connectivityType when cancelObserve. If adapter is IP and QoS is Low, delete observe list. Change-Id: I232321d82ec2991da791587e0275c20fcc91c912 Signed-off-by: Jaehong Jo Reviewed-on: https://gerrit.iotivity.org/gerrit/11971 Tested-by: jenkins-iotivity Reviewed-by: Ashok Babu Channa --- diff --git a/android/android_api/base/jni/JniOcResource.cpp b/android/android_api/base/jni/JniOcResource.cpp index a90446a..44f1eb3 100644 --- a/android/android_api/base/jni/JniOcResource.cpp +++ b/android/android_api/base/jni/JniOcResource.cpp @@ -297,7 +297,9 @@ OCStackResult JniOcResource::observe(JNIEnv* env, ObserveType observeType, OCStackResult JniOcResource::cancelObserve(JNIEnv* env, QualityOfService qos) { - if (QualityOfService::HighQos != qos) + // In Low case, after delete the callback and send empty message when client receive the notify. + // But TCP does not support EMPTY message. + if ((CT_ADAPTER_IP & connectivityType()) && QualityOfService::HighQos != qos) { this->m_onObserveManager.removeAllListeners(env); }