telepathy-mission-control: mcd_connectivity_monitor_is_online: check if we are awake as well

Guillaume Desmottes gdesmott at kemper.freedesktop.org
Thu Sep 6 02:19:29 PDT 2012


Module: telepathy-mission-control
Branch: master
Commit: a5fb89bad8b6fc7498cb7056faea1fdaa44de986
URL:    http://cgit.freedesktop.org/telepathy/telepathy-mission-control/commit/?id=a5fb89bad8b6fc7498cb7056faea1fdaa44de986

Author: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
Date:   Tue Sep  4 13:51:20 2012 +0200

mcd_connectivity_monitor_is_online: check if we are awake as well

To be considered as online, we have to be connected to the network *and* not
in the proccess of sleeping.

Fix a race where an account we just disconnected because we are going to sleep
is put back online because the monitor was considering us online again.

---

 src/connectivity-monitor.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/connectivity-monitor.c b/src/connectivity-monitor.c
index 0ab8272..2c22a57 100644
--- a/src/connectivity-monitor.c
+++ b/src/connectivity-monitor.c
@@ -465,7 +465,7 @@ mcd_connectivity_monitor_is_online (McdConnectivityMonitor *connectivity_monitor
 {
   McdConnectivityMonitorPrivate *priv = connectivity_monitor->priv;
 
-  return priv->connected;
+  return priv->connected && priv->awake;
 }
 
 gboolean



More information about the telepathy-commits mailing list