]> git.0d.be Git - empathy.git/commitdiff
Always react when disconnecting from the network
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>
Tue, 30 Jun 2009 16:21:18 +0000 (17:21 +0100)
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>
Tue, 30 Jun 2009 17:21:29 +0000 (18:21 +0100)
libempathy/empathy-idle.c

index 78366e02177034f490d53428cd92a77e46bdaba8..1686555ff5f2c2e9abf9943eb40c0906ab58d013 100644 (file)
@@ -244,8 +244,7 @@ idle_nm_state_change_cb (NMClient         *client,
 
        priv = GET_PRIV (idle);
 
-       if (!priv->use_nm
-           || priv->nm_saved_state == TP_CONNECTION_PRESENCE_TYPE_UNSET) {
+       if (!priv->use_nm) {
                return;
        }
 
@@ -266,7 +265,8 @@ idle_nm_state_change_cb (NMClient         *client,
                priv->nm_saved_status = g_strdup (priv->status);
                empathy_idle_set_state (idle, TP_CONNECTION_PRESENCE_TYPE_OFFLINE);
        }
-       else if (!old_nm_connected && new_nm_connected) {
+       else if (!old_nm_connected && new_nm_connected
+                       && priv->nm_saved_state != TP_CONNECTION_PRESENCE_TYPE_UNSET) {
                /* We are now connected */
                DEBUG ("Reconnected: Restore state %d (%s)",
                                priv->nm_saved_state, priv->nm_saved_status);