# HG changeset patch # User dcbw@redhat.com # Date 1302223764 0 # Node ID f5a18dd894cc25b0602a19de67687935ed47d798 # Parent 87825f9602e8d3d8105c5ce9c9c8ae6b0278626c Support new connection states in NetworkMakanter 0.9. Fixes #13505. committer: John Bailey diff -r 87825f9602e8 -r f5a18dd894cc libpurple/network.c --- a/libpurple/network.c Thu Apr 07 02:21:14 2011 +0000 +++ b/libpurple/network.c Fri Apr 08 00:49:24 2011 +0000 @@ -71,6 +71,10 @@ #include #include +#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 @@ 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 @@ 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)