add the prefix definition to resolve the build error
authorhyuna0213.jo <hyuna0213.jo@samsung.com>
Mon, 30 Nov 2015 08:55:28 +0000 (08:55 +0000)
committerJon A. Cruz <jonc@osg.samsung.com>
Wed, 9 Dec 2015 19:11:11 +0000 (19:11 +0000)
after '[IOT-828] OCRepresentation to provide host info' was submitted,
build error has been encountered while building WITH_TCP=true option.
so I added the prefix definition for coap over tcp.

Change-Id: Ia479a1946eae78beffc146b61f99ec864bd0b142
Signed-off-by: hyuna0213.jo <hyuna0213.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/4371
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
resource/src/OCRepresentation.cpp

index ac6654d..1eea68d 100644 (file)
@@ -39,6 +39,7 @@ namespace OC
 {
     static const char COAP[] = "coap://";
     static const char COAPS[] = "coaps://";
+    static const char COAP_TCP[] = "coap+tcp://";
 
     void MessageContainer::setPayload(const OCPayload* rep)
     {
@@ -651,12 +652,10 @@ namespace OC
         {
             ss << COAPS;
         }
-    #ifdef TCP_ADAPTER
         else if (m_devAddr.adapter & OC_ADAPTER_TCP)
         {
             ss << COAP_TCP;
         }
-    #endif
         else
         {
             ss << COAP;