aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2011-03-22 17:04:24 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-03-22 17:04:24 +0800
commit1b68d34282947697e1c173456bdb35700dc0f19e (patch)
treecd586955914c673ac0d780d9aac4be5b3862b019
parent5d27216d4ee76a9bb460b69370f205652a6d9c09 (diff)
downloadgsoc2013-empathy-1b68d34282947697e1c173456bdb35700dc0f19e.tar
gsoc2013-empathy-1b68d34282947697e1c173456bdb35700dc0f19e.tar.gz
gsoc2013-empathy-1b68d34282947697e1c173456bdb35700dc0f19e.tar.bz2
gsoc2013-empathy-1b68d34282947697e1c173456bdb35700dc0f19e.tar.lz
gsoc2013-empathy-1b68d34282947697e1c173456bdb35700dc0f19e.tar.xz
gsoc2013-empathy-1b68d34282947697e1c173456bdb35700dc0f19e.tar.zst
gsoc2013-empathy-1b68d34282947697e1c173456bdb35700dc0f19e.zip
Handle new NM 0.9 states (#644412)
-rw-r--r--libempathy/empathy-connectivity.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libempathy/empathy-connectivity.c b/libempathy/empathy-connectivity.c
index 42d5fcc1f..ebd72b09d 100644
--- a/libempathy/empathy-connectivity.c
+++ b/libempathy/empathy-connectivity.c
@@ -87,6 +87,11 @@ connectivity_change_state (EmpathyConnectivity *connectivity,
}
#ifdef HAVE_NM
+
+#if !defined(NM_CHECK_VERSION)
+#define NM_CHECK_VERSION(x,y,z) 0
+#endif
+
static void
connectivity_nm_state_change_cb (NMClient *client,
const GParamSpec *pspec,
@@ -103,6 +108,9 @@ connectivity_nm_state_change_cb (NMClient *client,
state = nm_client_get_state (priv->nm_client);
new_nm_connected = !(state == NM_STATE_CONNECTING
+#if NM_CHECK_VERSION(0,8,992)
+ || state == NM_STATE_DISCONNECTING
+#endif
|| state == NM_STATE_DISCONNECTED);
DEBUG ("New NetworkManager network state %d (connected: %s)", state,