pidgin: ce2edd4a: Support new connection states in Network...

rekkanoryo at pidgin.im rekkanoryo at pidgin.im
Thu Apr 7 21:45:55 EDT 2011


----------------------------------------------------------------------
Revision: ce2edd4a4c23f21dddc22884b693b1b13c7adbdd
Parent:   cdf975015f8d160647bdb31d527b21445f446062
Author:   dcbw at redhat.com
Date:     04/07/11 20:49:24
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/ce2edd4a4c23f21dddc22884b693b1b13c7adbdd

Changelog: 

Support new connection states in NetworkMakanter 0.9.  Fixes #13505.

Changes against parent cdf975015f8d160647bdb31d527b21445f446062

  patched  libpurple/network.c

-------------- next part --------------
============================================================
--- libpurple/network.c	d2307574aa2975179b237e414c6823cd2fbbb134
+++ libpurple/network.c	cecea56b2fc49d2c96c29843b575083168be0807
@@ -71,6 +71,10 @@
 #include <dbus/dbus-glib.h>
 #include <NetworkManager.h>
 
+#if !defined(NM_CHECK_VERSION)
+#define NM_CHECK_VERSION(x,y,z) 0
+#endif
+
 static DBusGConnection *nm_conn = NULL;
 static DBusGProxy *nm_proxy = NULL;
 static DBusGProxy *dbus_proxy = NULL;
@@ -863,7 +867,13 @@ nm_update_state(NMState state)
 
 	switch(state)
 	{
+#if NM_CHECK_VERSION(0,8,992)
+		case NM_STATE_CONNECTED_LOCAL:
+		case NM_STATE_CONNECTED_SITE:
+		case NM_STATE_CONNECTED_GLOBAL:
+#else
 		case NM_STATE_CONNECTED:
+#endif
 			/* Call res_init in case DNS servers have changed */
 			res_init();
 			/* update STUN IP in case we it changed (theoretically we could
@@ -880,6 +890,9 @@ nm_update_state(NMState state)
 		case NM_STATE_ASLEEP:
 		case NM_STATE_CONNECTING:
 		case NM_STATE_DISCONNECTED:
+#if NM_CHECK_VERSION(0,8,992)
+		case NM_STATE_DISCONNECTING:
+#endif
 			if (prev != NM_STATE_CONNECTED && prev != NM_STATE_UNKNOWN)
 				break;
 			if (ui_ops != NULL && ui_ops->network_disconnected != NULL)


More information about the Commits mailing list