pidgin: 99687ce6: Changes suggested by QuLogic to fix my b...
rlaager at pidgin.im
rlaager at pidgin.im
Sat May 10 01:20:55 EDT 2008
-----------------------------------------------------------------
Revision: 99687ce6fa955d1d32092992b65de140dc944ab0
Ancestor: 5800923dc413a26c68576e06ea89148d645fa4a9
Author: rlaager at pidgin.im
Date: 2008-05-10T05:15:58
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/99687ce6fa955d1d32092992b65de140dc944ab0
Modified files:
libpurple/network.c
ChangeLog:
Changes suggested by QuLogic to fix my broken changes to the NetworkManager
support. We should now properly honor NetworkManager.
-------------- next part --------------
============================================================
--- libpurple/network.c 767335e157aea41377a41fb7ea35ac45d497782d
+++ libpurple/network.c c70cc18d41956bb374b1836ac9723bfb37b0ce5a
@@ -594,17 +594,22 @@ purple_network_is_available(void)
purple_network_is_available(void)
{
#ifdef HAVE_NETWORKMANAGER_NETWORKMANAGER_H
- /* Try NetworkManager first, maybe we'll get lucky */
- if (nm_get_network_state() != NM_STATE_CONNECTED)
- {
- purple_debug_warning("network", "NetworkManager not active or reports no connection\n");
+ NMState state = nm_get_network_state();
+ if (state == NM_STATE_UNKNOWN)
+ {
+ purple_debug_warning("network", "NetworkManager not active. Assuming connection exists.\n");
+ return TRUE;
+ }
+ else if (state == NM_STATE_CONNECTED)
return TRUE;
- } else
- return TRUE;
+
+ return FALSE;
+
#elif defined _WIN32
return (current_network_count > 0);
-#endif
+#else
return TRUE;
+#endif
}
#ifdef HAVE_NETWORKMANAGER_NETWORKMANAGER_H
More information about the Commits
mailing list