Applied fixes to enable Unicast discovery in the RI Layer's sample apps.
authorJoseph Morrow <joseph.l.morrow@intel.com>
Mon, 9 Mar 2015 17:53:03 +0000 (13:53 -0400)
committerErich Keane <erich.keane@intel.com>
Wed, 11 Mar 2015 16:39:35 +0000 (16:39 +0000)
This fixes IOT-372 "Unicast Discovery over Wifi does not work."

Change-Id: Ifbc545f8a04049518410a4d9f54f692388921288
Signed-off-by: Joseph Morrow <joseph.l.morrow@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/452
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Doug Hudson <douglas.hudson@intel.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
Reviewed-by: Erich Keane <erich.keane@intel.com>
resource/csdk/stack/samples/linux/SimpleClientServer/occlient.cpp
resource/csdk/stack/samples/linux/SimpleClientServer/occlientbasicops.cpp
resource/csdk/stack/samples/linux/SimpleClientServer/occlientslow.cpp
resource/csdk/stack/samples/linux/secure/occlientbasicops.cpp
service/soft-sensor-manager/SSMCore/src/SensorProcessor/ResourceFinder.cpp

index 3f3a9eb..b4e20ba 100644 (file)
@@ -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.)
index 77ab40e..58c9df2 100644 (file)
@@ -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.)
index 3f40b85..dc230c4 100644 (file)
@@ -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";
index 7b7333b..0a65ea0 100644 (file)
@@ -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}";
index cb6c434..3f142e7 100644 (file)
@@ -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)