From: Joseph Morrow Date: Mon, 9 Mar 2015 17:53:03 +0000 (-0400) Subject: Applied fixes to enable Unicast discovery in the RI Layer's sample apps. X-Git-Tag: 1.2.0+RC1~1855^2~118 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bb09189b4434e4aa18311705c78bcb50c3241167;p=platform%2Fupstream%2Fiotivity.git Applied fixes to enable Unicast discovery in the RI Layer's sample apps. This fixes IOT-372 "Unicast Discovery over Wifi does not work." Change-Id: Ifbc545f8a04049518410a4d9f54f692388921288 Signed-off-by: Joseph Morrow Reviewed-on: https://gerrit.iotivity.org/gerrit/452 Tested-by: jenkins-iotivity Reviewed-by: Doug Hudson Reviewed-by: Ashok Babu Channa Reviewed-by: Erich Keane --- diff --git a/resource/csdk/stack/samples/linux/SimpleClientServer/occlient.cpp b/resource/csdk/stack/samples/linux/SimpleClientServer/occlient.cpp index 3f3a9eb..b4e20ba 100644 --- a/resource/csdk/stack/samples/linux/SimpleClientServer/occlient.cpp +++ b/resource/csdk/stack/samples/linux/SimpleClientServer/occlient.cpp @@ -31,8 +31,8 @@ static int UNICAST_DISCOVERY = 0; static int TEST_CASE = 0; -static const char * UNICAST_DISCOVERY_QUERY = "coap://%s:5298/oc/core"; -static const char * UNICAST_DEVICE_DISCOVERY_QUERY = "coap://%s:5298/oc/core/d"; +static const char * UNICAST_DISCOVERY_QUERY = "coap://%s:6298/oc/core"; +static const char * UNICAST_DEVICE_DISCOVERY_QUERY = "coap://%s:6298/oc/core/d"; static const char * MULTICAST_DEVICE_DISCOVERY_QUERY = "/oc/core/d"; static const char * MULTICAST_RESOURCE_DISCOVERY_QUERY = "/oc/core"; //The following variable determines the interface (wifi, ethernet etc.) diff --git a/resource/csdk/stack/samples/linux/SimpleClientServer/occlientbasicops.cpp b/resource/csdk/stack/samples/linux/SimpleClientServer/occlientbasicops.cpp index 77ab40e..58c9df2 100644 --- a/resource/csdk/stack/samples/linux/SimpleClientServer/occlientbasicops.cpp +++ b/resource/csdk/stack/samples/linux/SimpleClientServer/occlientbasicops.cpp @@ -38,7 +38,7 @@ static int IPV4_ADDR_SIZE = 16; static int UNICAST_DISCOVERY = 0; static int TEST_CASE = 0; -static const char UNICAST_DISCOVERY_QUERY[] = "coap://%s:5298/oc/core"; +static const char UNICAST_DISCOVERY_QUERY[] = "coap://%s:6298/oc/core"; static std::string putPayload = "{\"state\":\"off\",\"power\":10}"; //The following variable determines the interface (wifi, ethernet etc.) diff --git a/resource/csdk/stack/samples/linux/SimpleClientServer/occlientslow.cpp b/resource/csdk/stack/samples/linux/SimpleClientServer/occlientslow.cpp index 3f40b85..dc230c4 100644 --- a/resource/csdk/stack/samples/linux/SimpleClientServer/occlientslow.cpp +++ b/resource/csdk/stack/samples/linux/SimpleClientServer/occlientslow.cpp @@ -31,7 +31,7 @@ static int UNICAST_DISCOVERY = 0; static int TEST_CASE = 0; -static const char * UNICAST_DISCOVERY_QUERY = "coap://%s:5298/oc/core"; +static const char * UNICAST_DISCOVERY_QUERY = "coap://%s:6298/oc/core"; static std::string putPayload = "{\"state\":\"off\",\"power\":10}"; static std::string coapServerIP = "255.255.255.255"; static std::string coapServerPort = "5683"; diff --git a/resource/csdk/stack/samples/linux/secure/occlientbasicops.cpp b/resource/csdk/stack/samples/linux/secure/occlientbasicops.cpp index 7b7333b..0a65ea0 100644 --- a/resource/csdk/stack/samples/linux/secure/occlientbasicops.cpp +++ b/resource/csdk/stack/samples/linux/secure/occlientbasicops.cpp @@ -36,7 +36,7 @@ static int UNICAST_DISCOVERY = 0; static int TEST_CASE = 0; static int IPV4_ADDR_SIZE = 16; -static char UNICAST_DISCOVERY_QUERY[] = "coap://%s:5298/oc/core"; +static char UNICAST_DISCOVERY_QUERY[] = "coap://%s:6298/oc/core"; static char MULTICAST_DISCOVERY_QUERY[] = "/oc/core"; static std::string putPayload = "{\"state\":\"off\",\"power\":10}"; diff --git a/service/soft-sensor-manager/SSMCore/src/SensorProcessor/ResourceFinder.cpp b/service/soft-sensor-manager/SSMCore/src/SensorProcessor/ResourceFinder.cpp index cb6c434..3f142e7 100644 --- a/service/soft-sensor-manager/SSMCore/src/SensorProcessor/ResourceFinder.cpp +++ b/service/soft-sensor-manager/SSMCore/src/SensorProcessor/ResourceFinder.cpp @@ -76,7 +76,7 @@ void CResourceFinder::presenceHandler(OCStackResult result, const unsigned int n { case OC_STACK_OK: ret = OC::OCPlatform::findResource("", - "coap://" + hostAddress + ":5298" + "/oc/core?rt=SoftSensorManager.Sensor", OC_ALL, + "coap://" + hostAddress + ":6298" + "/oc/core?rt=SoftSensorManager.Sensor", OC_ALL, std::bind(&CResourceFinder::onResourceFound, this, std::placeholders::_1)); if (ret != OC_STACK_OK) @@ -118,7 +118,7 @@ SSMRESULT CResourceFinder::startResourceFinder() OCStackResult ret = OC_STACK_ERROR; ret = OC::OCPlatform::findResource("", - "coap://224.0.1.187:5298/oc/core?rt=SoftSensorManager.Sensor", OC_ALL, + "coap://224.0.1.187:6298/oc/core?rt=SoftSensorManager.Sensor", OC_ALL, std::bind(&CResourceFinder::onResourceFound, this, std::placeholders::_1)); if (ret != OC_STACK_OK)