Imported Upstream version 1.0.0
[platform/upstream/iotivity.git] / resource / csdk / connectivity / src / ip_adapter / arduino / caipnwmonitor_eth.cpp
index afedf68..c9ef984 100644 (file)
@@ -1,4 +1,4 @@
-/******************************************************************
+/* ****************************************************************
 *
 * Copyright 2014 Samsung Electronics All Rights Reserved.
 *
@@ -18,9 +18,9 @@
 *
 ******************************************************************/
 /**
- * @file caipnwmonitor.cpp
- * @brief This file is to keep design in sync with other platforms.  Right now there is no
- *        api for network monitoring in arduino.
+ * @file
+ * This file is to keep design in sync with other platforms.  Right now
+ * there is no api for network monitoring in arduino.
  */
 
 #include "caipinterface.h"
 // defined & used (as-is defined in the linux socket headers).
 #define AF_INET (2)
 
+CAResult_t CAIPStartNetworkMonitor()
+{
+    return CA_STATUS_OK;
+}
+
+CAResult_t CAIPStopNetworkMonitor()
+{
+    return CA_STATUS_OK;
+}
+
 /// Retrieves the IP address assigned to Arduino Ethernet shield
 void CAArduinoGetInterfaceAddress(uint32_t *address)
 {
@@ -64,7 +74,7 @@ void CAArduinoGetInterfaceAddress(uint32_t *address)
 
 u_arraylist_t *CAIPGetInterfaceInformation(int desiredIndex)
 {
-    CAResult_t result;
+    bool result = true;
 
     u_arraylist_t *iflist = u_arraylist_create();
     if (!iflist)
@@ -88,13 +98,13 @@ u_arraylist_t *CAIPGetInterfaceInformation(int desiredIndex)
     CAArduinoGetInterfaceAddress(&ifitem->ipv4addr);
 
     result = u_arraylist_add(iflist, ifitem);
-    if (CA_STATUS_OK != result)
+    if (!result)
     {
         OIC_LOG(ERROR, TAG, "u_arraylist_add failed.");
         goto exit;
     }
 
-    OIC_LOG_V(ERROR, TAG, "Added interface: %s (%d)", ifitem->name, ifitem->family);
+    OIC_LOG_V(DEBUG, TAG, "Added interface: %s (%d)", ifitem->name, ifitem->family);
 
     return iflist;
 
@@ -102,4 +112,3 @@ exit:
     u_arraylist_destroy(iflist);
     return NULL;
 }
-