Mercurial > pidgin.yaz
diff libgaim/account.c @ 14696:34083fe39891
[gaim-migrate @ 17448]
From Paul Betts, NetworkManager integration. This will smartly disconnect and reconnect
accounts according to network availability. Probably needs some more tweaking.
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Sun, 08 Oct 2006 08:40:09 +0000 |
parents | 61a4a2dc491e |
children | 05c34aabdcc3 |
line wrap: on
line diff
--- a/libgaim/account.c Sun Oct 08 04:31:39 2006 +0000 +++ b/libgaim/account.c Sun Oct 08 08:40:09 2006 +0000 @@ -27,6 +27,7 @@ #include "core.h" #include "dbus-maybe.h" #include "debug.h" +#include "network.h" #include "notify.h" #include "pounce.h" #include "prefs.h" @@ -2242,6 +2243,13 @@ GList *l; GaimAccount *account; + /* If we're not connected to the Internet right now, we bail on this */ + if (!gaim_network_is_available()) + { + fprintf(stderr, "Network not connected; skipping reconnect\n"); + return; + } + for (l = gaim_accounts_get_all(); l != NULL; l = l->next) { account = (GaimAccount *)l->data;