Imported Upstream version 0.9.1
[platform/upstream/iotivity.git] / resource / csdk / stack / test / arduino / ocserver.cpp
index 3c47701..dc8be91 100644 (file)
@@ -9,17 +9,15 @@ static uint8_t ETHERNET_MAC[] = {0x90, 0xA2, 0xDA, 0x0F, 0x2B, 0x72 };
 #define TAG PCF("ocserver")
 
 void ocInitialize () {
-    char ipAddr[16] = "";
-    OCGetInterfaceAddress (NULL, 0, AF_INET, (uint8_t *)ipAddr, 16);
     OC_LOG(DEBUG, TAG, PCF("IP addr is:"));
     OC_LOG_BUFFER(INFO, TAG, (uint8_t*)ipAddr, sizeof(ipAddr));
     delay(2000);
-    OCInit (ipAddr, 8001, OC_SERVER);
+    OCInit (NULL, 0, OC_SERVER);
 }
 
 void setup() {
-       Serial.begin(115200);
-   
+    Serial.begin(115200);
+
     Serial.println ("Trying to get an IP addr using DHCP");
     if (Ethernet.begin(ETHERNET_MAC) == 0) {
         Serial.println("DHCP failed");
@@ -28,7 +26,8 @@ void setup() {
 }
 
 void loop() {
-       Serial.println ("Processing CoAP messages!\n");
+    Serial.println ("Processing CoAP messages!\n");
     OCProcess ();
-       delay(1000);
+    delay(1000);
 }
+