diff options
author | Xavier Claessens <xclaesse@gmail.com> | 2007-07-26 20:20:29 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2007-07-26 20:20:29 +0800 |
commit | a1a519c76085cc402d015486fa654bfe7550de1a (patch) | |
tree | 8e356faf581d13ae2f21126ee53da1273fe4294f /libempathy | |
parent | e872cf69bb6dbae8b08e8747a8a0c7061eb76822 (diff) | |
download | gsoc2013-empathy-a1a519c76085cc402d015486fa654bfe7550de1a.tar gsoc2013-empathy-a1a519c76085cc402d015486fa654bfe7550de1a.tar.gz gsoc2013-empathy-a1a519c76085cc402d015486fa654bfe7550de1a.tar.bz2 gsoc2013-empathy-a1a519c76085cc402d015486fa654bfe7550de1a.tar.lz gsoc2013-empathy-a1a519c76085cc402d015486fa654bfe7550de1a.tar.xz gsoc2013-empathy-a1a519c76085cc402d015486fa654bfe7550de1a.tar.zst gsoc2013-empathy-a1a519c76085cc402d015486fa654bfe7550de1a.zip |
Fix problems when NM is not running. Fixes bug #460419.
2007-07-26 Xavier Claessens <xclaesse@gmail.com>
* libempathy/empathy-idle.c: Fix problems when NM is not running. Fixes
bug #460419.
* doc/*: Updated documentation.
svn path=/trunk/; revision=195
Diffstat (limited to 'libempathy')
-rw-r--r-- | libempathy/empathy-idle.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/libempathy/empathy-idle.c b/libempathy/empathy-idle.c index 923b499be..f3af7c4f9 100644 --- a/libempathy/empathy-idle.c +++ b/libempathy/empathy-idle.c @@ -192,10 +192,22 @@ empathy_idle_init (EmpathyIdle *idle) G_TYPE_INVALID, G_TYPE_UINT, &nm_status, G_TYPE_INVALID); - priv->nm_connected = (nm_status == NM_STATE_CONNECTED); - empathy_debug (DEBUG_DOMAIN, "NetworkManager connected: %s", - priv->nm_connected ? "Yes" : "No"); + if (error) { + /* Can't get actual status, NM is not working. */ + empathy_debug (DEBUG_DOMAIN, + "Couldn't get NM state: %s", + error->message); + g_clear_error (&error); + g_object_unref (priv->nm_proxy); + priv->nm_proxy = NULL; + priv->nm_connected = TRUE; + } else { + priv->nm_connected = (nm_status == NM_STATE_CONNECTED); + + empathy_debug (DEBUG_DOMAIN, "NetworkManager connected: %s", + priv->nm_connected ? "Yes" : "No"); + } if (!priv->nm_connected) { priv->saved_state = priv->state; |