modified transport type check logic for coap over tcp
authorhyuna0213.jo <hyuna0213.jo@samsung.com>
Mon, 22 Feb 2016 08:02:56 +0000 (17:02 +0900)
committerJon A. Cruz <jonc@osg.samsung.com>
Tue, 23 Feb 2016 18:55:12 +0000 (18:55 +0000)
coap over tcp format can be used to send TCP, BT, LE message.
If user selects the several tranports to send message,
CAIsSupportedCoAPOverTCP() function is not working.
because it use '==' operator to compare the transport type.

Change-Id: I03183794ff34f3052b91b87c51c5de1171f6cd36
Signed-off-by: hyuna0213.jo <hyuna0213.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/5109
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
resource/csdk/connectivity/src/caprotocolmessage.c

index a605d78c352f20c7ddc8249115482c5a22742818..0723f179c01fbac28a7fab43ed2a9f03511db64f 100644 (file)
@@ -1138,8 +1138,8 @@ CAPayloadFormat_t CAConvertFormat(uint8_t format)
 #ifdef WITH_TCP
 bool CAIsSupportedCoAPOverTCP(CATransportAdapter_t adapter)
 {
-    if (CA_ADAPTER_GATT_BTLE == adapter || CA_ADAPTER_RFCOMM_BTEDR == adapter
-            || CA_ADAPTER_TCP == adapter)
+    if (CA_ADAPTER_GATT_BTLE & adapter || CA_ADAPTER_RFCOMM_BTEDR & adapter
+            || CA_ADAPTER_TCP & adapter)
     {
         return true;
     }