Removed obsolete OC_WELL_KNOWN_PORT
authorYuliya Kamatkova <yuliya.kamatkova@intel.com>
Tue, 17 Feb 2015 18:46:28 +0000 (13:46 -0500)
committerSudarshan Prasad <sudarshan.prasad@intel.com>
Thu, 19 Feb 2015 01:42:01 +0000 (01:42 +0000)
Removed obsolete OC_WELL_KNOWN_PORT that was causing warnings.

Change-Id: I40034334e723b817818f80d9fedd60ed6ebcaf3a
Signed-off-by: Yuliya Kamatkova <yuliya.kamatkova@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/360
Reviewed-by: Erich Keane <erich.keane@intel.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Sashi Penta <sashi.kumar.penta@intel.com>
Reviewed-by: Sudarshan Prasad <sudarshan.prasad@intel.com>
resource/csdk/stack/samples/arduino/SimpleClientServer/ocserver/ocserver.cpp
resource/csdk/stack/samples/linux/SimpleClientServer/ocserverslow.cpp
service/soft-sensor-manager/SampleApp/arduino/Reference_Thing/src/reference.cpp
service/soft-sensor-manager/SampleApp/arduino/THSensorApp/src/thserver.cpp
service/soft-sensor-manager/SampleApp/arduino/THSensorApp1/src/thserver.cpp
service/soft-sensor-manager/SampleApp/arduino/Trackee_Thing/src/trackee.cpp

index e5cd93f..a4c93f9 100644 (file)
@@ -60,9 +60,6 @@ static LightResource Light;
 static char responsePayloadGet[] = "{\"href\":\"/a/light\",\"rep\":{\"state\":\"on\",\"power\":10}}";
 static char responsePayloadPut[] = "{\"href\":\"/a/light\",\"rep\":{\"state\":\"off\",\"power\":0}}";
 
-/// This is the port which Arduino Server will use for all unicast communication with it's peers
-static uint16_t OC_WELL_KNOWN_PORT = 5683;
-
 #ifdef ARDUINOWIFI
 // Arduino WiFi Shield
 // Note : Arduino WiFi Shield currently does NOT support multicast and therefore
@@ -254,7 +251,6 @@ void setup()
     // Note : This will initialize Serial port on Arduino at 115200 bauds
     OC_LOG_INIT();
     OC_LOG(DEBUG, TAG, PCF("OCServer is starting..."));
-    uint16_t port = OC_WELL_KNOWN_PORT;
 
     // Connect to Ethernet or WiFi network
     if (ConnectToNetwork() != 0)
@@ -264,7 +260,7 @@ void setup()
     }
 
     // Initialize the OC Stack in Server mode
-    if (OCInit(NULL, port, OC_SERVER) != OC_STACK_OK)
+    if (OCInit(NULL, 0, OC_SERVER) != OC_STACK_OK)
     {
         OC_LOG(ERROR, TAG, PCF("OCStack init error"));
         return;
index beac534..a403915 100644 (file)
@@ -45,8 +45,6 @@ static LEDResource gLedInstance[SAMPLE_MAX_NUM_POST_INSTANCE];
 //char *gResourceUri= const_cast<char *>("/a/led");
 char *gResourceUri= (char *)"/a/led";
 
-static constexpr uint16_t OC_WELL_KNOWN_PORT = 5683;
-
 //This function takes the request as an input and returns the response
 //in JSON format.
 char* constructJsonResponse (OCEntityHandlerRequest *ehRequest)
index 953032e..1141793 100644 (file)
@@ -30,8 +30,6 @@
 #include "oic_lanLib.h"
 
 #define ARDUINO_AVR_MEGA2560 1
-/// This is the port which Arduino Server will use for all unicast communication with it's peers
-#define OC_WELL_KNOWN_PORT 5683
 
 #define JSON_BASE00 "{\"href\":\"\",\"rep\":{"
 #define JSON_BASE01 "\"0\":\"MAC\",\"1\":\"string\",\"2\":\""
@@ -205,7 +203,7 @@ void setup()
        }
 
        // Initialize the OC Stack in Server mode
-       if (OCInit(NULL, OC_WELL_KNOWN_PORT, OC_SERVER) != OC_STACK_OK)
+       if (OCInit(NULL, 0, OC_SERVER) != OC_STACK_OK)
        {
                OC_LOG(ERROR, TAG, PCF("OCStack init error"));
                return;
index 1132399..80d1e9e 100644 (file)
@@ -58,9 +58,6 @@ typedef struct THRESOURCE
 
 static THResource TH;
 
-/// This is the port which Arduino Server will use for all unicast communication with it's peers
-static uint16_t OC_WELL_KNOWN_PORT = 5683;
-
 #define JSON_BASE00 "{\"href\":\"\",\"rep\":{"
 #define JSON_BASE01 "\"0\":\"temperature\",\"1\":\"int\",\"2\":\""
 #define JSON_BASE02 "\",\"3\":\"humidity\",\"4\":\"int\",\"5\":\""
@@ -349,7 +346,6 @@ void setup()
     OC_LOG_INIT();
 
     OC_LOG(DEBUG, TAG, PCF("OCServer is starting..."));
-    uint16_t port = OC_WELL_KNOWN_PORT;
 
     // Connect to Ethernet or WiFi network
     if (ConnectToNetwork() != 0)
@@ -359,7 +355,7 @@ void setup()
     }
 
     // Initialize the OC Stack in Server mode
-    if (OCInit(NULL, port, OC_SERVER) != OC_STACK_OK)
+    if (OCInit(NULL, 0, OC_SERVER) != OC_STACK_OK)
     {
         OC_LOG(ERROR, TAG, PCF("OCStack init error"));
         return;
index b1fd2ff..a25d88e 100644 (file)
@@ -58,9 +58,6 @@ typedef struct THRESOURCE
 
 static THResource TH;
 
-/// This is the port which Arduino Server will use for all unicast communication with it's peers
-static uint16_t OC_WELL_KNOWN_PORT = 5683;
-
 #define JSON_BASE00 "{\"href\":\"\",\"rep\":{"
 #define JSON_BASE01 "\"0\":\"temperature\",\"1\":\"int\",\"2\":\""
 #define JSON_BASE02 "\",\"3\":\"humidity\",\"4\":\"int\",\"5\":\""
@@ -349,7 +346,6 @@ void setup()
     OC_LOG_INIT();
 
     OC_LOG(DEBUG, TAG, PCF("OCServer is starting..."));
-    uint16_t port = OC_WELL_KNOWN_PORT;
 
     // Connect to Ethernet or WiFi network
     if (ConnectToNetwork() != 0)
@@ -359,7 +355,7 @@ void setup()
     }
 
     // Initialize the OC Stack in Server mode
-    if (OCInit(NULL, port, OC_SERVER) != OC_STACK_OK)
+    if (OCInit(NULL, 0, OC_SERVER) != OC_STACK_OK)
     {
         OC_LOG(ERROR, TAG, PCF("OCStack init error"));
         return;
index 8d78c5b..c62c468 100644 (file)
@@ -37,8 +37,6 @@
 #define SLAVER_EA      2
 
 #define ARDUINO_AVR_MEGA2560 1
-/// This is the port which Arduino Server will use for all unicast communication with it's peers
-#define OC_WELL_KNOWN_PORT 5683
 
 PROGMEM const char TAG[] = "TrackeeSensor";
 
@@ -319,7 +317,6 @@ void setup()
        OC_LOG_INIT();
 
        OC_LOG(DEBUG, TAG, PCF("OCServer is starting..."));
-       //    uint16_t port = OC_WELL_KNOWN_PORT;
 
        // Connect to Ethernet or WiFi network
        if (ConnectToNetwork() != 0)
@@ -329,7 +326,7 @@ void setup()
        }
 
        // Initialize the OC Stack in Server mode
-       if (OCInit(NULL, OC_WELL_KNOWN_PORT, OC_SERVER) != OC_STACK_OK)
+       if (OCInit(NULL, 0, OC_SERVER) != OC_STACK_OK)
        {
                OC_LOG(ERROR, TAG, PCF("OCStack init error"));
                return;