Title: [131333] trunk/Source/WebCore
Revision
131333
Author
commit-qu...@webkit.org
Date
2012-10-15 12:21:07 -0700 (Mon, 15 Oct 2012)

Log Message

[EFL] Provide logging for OnlineState detection code
https://bugs.webkit.org/show_bug.cgi?id=99299

Patch by Christophe Dumez <christophe.du...@intel.com> on 2012-10-15
Reviewed by Kenneth Rohde Christiansen.

Add logging to NetworkStateNotifierEfl.cpp to facilitate
debugging of this functionality.

No new tests, no behavior change.

* platform/network/efl/NetworkStateNotifierEfl.cpp:
(WebCore::NetworkStateNotifier::updateState):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (131332 => 131333)


--- trunk/Source/WebCore/ChangeLog	2012-10-15 19:04:49 UTC (rev 131332)
+++ trunk/Source/WebCore/ChangeLog	2012-10-15 19:21:07 UTC (rev 131333)
@@ -1,3 +1,18 @@
+2012-10-15  Christophe Dumez  <christophe.du...@intel.com>
+
+        [EFL] Provide logging for OnlineState detection code
+        https://bugs.webkit.org/show_bug.cgi?id=99299
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Add logging to NetworkStateNotifierEfl.cpp to facilitate
+        debugging of this functionality.
+
+        No new tests, no behavior change.
+
+        * platform/network/efl/NetworkStateNotifierEfl.cpp:
+        (WebCore::NetworkStateNotifier::updateState):
+
 2012-10-15  MORITA Hajime  <morr...@google.com>
 
         [Regression r131167] run-webkit-tests fails

Modified: trunk/Source/WebCore/platform/network/efl/NetworkStateNotifierEfl.cpp (131332 => 131333)


--- trunk/Source/WebCore/platform/network/efl/NetworkStateNotifierEfl.cpp	2012-10-15 19:04:49 UTC (rev 131332)
+++ trunk/Source/WebCore/platform/network/efl/NetworkStateNotifierEfl.cpp	2012-10-15 19:21:07 UTC (rev 131333)
@@ -51,6 +51,8 @@
     // Assume that we're offline until proven otherwise.
     m_isOnLine = false;
 
+    LOG(Network, "Checking online state...");
+
     Eina_List* networkInterfaces = eeze_net_list();
 
     Eina_List* list;
@@ -65,17 +67,26 @@
 
         // Skip interfaces that are not up.
         const char* state = eeze_net_attribute_get(networkInterface, udevOperstateAttribute);
+        LOG(Network, "Found network interface \"%s\" with state: \"%s\"", syspath, state);
         if (!state || strcmp(state, udevOperstateUp))
             continue;
 
         // Check if the interface has an IP address.
         eeze_net_scan(networkInterface);
         if (eeze_net_addr_get(networkInterface, EEZE_NET_ADDR_TYPE_IP) || eeze_net_addr_get(networkInterface, EEZE_NET_ADDR_TYPE_IP6)) {
+#if !LOG_DISABLED
+            const char* ipAddress = eeze_net_addr_get(networkInterface, EEZE_NET_ADDR_TYPE_IP);
+            if (!ipAddress)
+                ipAddress = eeze_net_addr_get(networkInterface, EEZE_NET_ADDR_TYPE_IP6);
+            LOG(Network, "Network interface at %s has the following IP address: %s", syspath, ipAddress);
+#endif
             m_isOnLine = true;
             break;
         }
     }
 
+    LOG(Network, "Detected online state is \"%s\"", m_isOnLine ? "online" : "offline");
+
     EINA_LIST_FREE(networkInterfaces, data)
         eeze_net_free(static_cast<Eeze_Net*>(data));
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to