fixed multicast presence for sample related c-sdk.
authorjihwan.seo <jihwan.seo@samsung.com>
Fri, 2 Sep 2016 06:41:33 +0000 (15:41 +0900)
committerAshok Babu Channa <ashok.channa@samsung.com>
Mon, 12 Sep 2016 09:15:47 +0000 (09:15 +0000)
Change-Id: I011b0575b34b957ef776a3ca56db0b3f2d751f2b
Signed-off-by: jihwan.seo <jihwan.seo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/11329
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
resource/csdk/stack/samples/linux/SimpleClientServer/occlient.cpp

index 4a90b45..f71ce90 100644 (file)
@@ -573,10 +573,7 @@ int InitPresence()
     {
         if (result == OC_STACK_OK)
         {
-            std::ostringstream multicastPresenceQuery;
-            multicastPresenceQuery.str("");
-            multicastPresenceQuery << "coap://" << OC_MULTICAST_PREFIX << OC_RSRVD_PRESENCE_URI;
-            result = InvokeOCDoResource(multicastPresenceQuery, &serverAddr, OC_REST_PRESENCE, OC_LOW_QOS,
+            result = InvokeOCDoResource(query, NULL, OC_REST_PRESENCE, OC_LOW_QOS,
                     presenceCB, NULL, 0);
         }
     }