[CONPRO-1571] Fix for DeleteObserver in case of GATT adapter 98/229398/1
authorKush <kush.agrawal@samsung.com>
Fri, 28 Feb 2020 09:52:38 +0000 (15:22 +0530)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Wed, 1 Apr 2020 01:31:42 +0000 (10:31 +0900)
https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/666
(cherry-picked from bd25a20961dc89dd4c7fedb5a3f4e881ddb53b0a)

Change-Id: Id9259093a010533ec20fc4061f2283d7d69d016a
Signed-off-by: Kush <kush.agrawal@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
resource/csdk/stack/src/ocobserve.c

index 7495f2b..9eef8d6 100644 (file)
@@ -773,7 +773,7 @@ OCStackResult DeleteObserverUsingDevAddr(const OCDevAddr *devAddr)
         if (out)
         {
             if ((strcmp(out->devAddr.addr, devAddr->addr) == 0)
-                    && out->devAddr.port == devAddr->port)
+                    && (out->devAddr.port == devAddr->port || OC_ADAPTER_GATT_BTLE == devAddr->adapter))
             {
                 OIC_LOG_V(INFO, TAG, "deleting observer id  %u with %s:%u",
                           out->observeId, out->devAddr.addr, out->devAddr.port);