[IOT-1903] Change to set single adapter flag for cloud notification
authorch79.cho <ch79.cho@samsung.com>
Wed, 8 Mar 2017 07:22:30 +0000 (16:22 +0900)
committerUze Choi <uzchoi@samsung.com>
Wed, 8 Mar 2017 13:05:27 +0000 (13:05 +0000)
Fixed to set sindle adapter flag such as OC_ADAPTER_IP and OC_ADAPTER_TCP
during address parsing because multiple set of adapters caused an error
from base layer to handle it.

Change-Id: I7754d9d305d8c29f8d775d802164f5ccd761614b
Signed-off-by: ch79.cho <ch79.cho@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/17761
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: JungYong KIM <jyong2.kim@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
service/notification/src/common/NSUtil.c

index c3dafff..2fbc027 100755 (executable)
@@ -502,7 +502,7 @@ OCDevAddr * NSChangeAddress(const char * inputaddress)
     if (strstr(inputaddress, "coap+tcp://"))
     {
         NS_LOG(DEBUG, "address : TCP");
-        adapter |= OC_ADAPTER_TCP;
+        adapter = OC_ADAPTER_TCP;
     }
     else if (strstr(inputaddress, "coaps://"))
     {
@@ -513,7 +513,7 @@ OCDevAddr * NSChangeAddress(const char * inputaddress)
     {
         NS_LOG(DEBUG, "address : TCP + SECURED");
         flags |= OC_FLAG_SECURE;
-        adapter |= OC_ADAPTER_TCP;
+        adapter = OC_ADAPTER_TCP;
     }
     else if (strstr(inputaddress, "coap://"))
     {