summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-09-04 13:51:20 +0200
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-09-06 11:18:43 +0200
commita5fb89bad8b6fc7498cb7056faea1fdaa44de986 (patch)
tree3c2065dd94f36ef2bffcca8b3bab48e41dc07822
parent47f3cb54fcda485e3fbfc9b297dd556a504273b7 (diff)
downloadtelepathy-mission-control-a5fb89bad8b6fc7498cb7056faea1fdaa44de986.tar.gz
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.
-rw-r--r--src/connectivity-monitor.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/connectivity-monitor.c b/src/connectivity-monitor.c
index 0ab8272e..2c22a571 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