# HG changeset patch # User Sean Egan # Date 1164220811 0 # Node ID 9e720be7d8b9e05b8da9d3bf5449e9239a313724 # Parent 0570155bed53f68e7a884d02f1bb83e1c48538d3 [gaim-migrate @ 17811] I wanted to make networkmanager detection of disconnected networks just send keepalives as not to kill the connection if it doesn't have to committer: Tailor Script diff -r 0570155bed53 -r 9e720be7d8b9 gtk/gtkconn.c --- a/gtk/gtkconn.c Wed Nov 22 18:16:51 2006 +0000 +++ b/gtk/gtkconn.c Wed Nov 22 18:40:11 2006 +0000 @@ -214,14 +214,25 @@ { GList *l = gaim_accounts_get_all_active(); GaimGtkBuddyList *gtkblist = gaim_gtk_blist_get_default_gtk_blist(); - + GaimPluginProtocolInfo *prpl_info = NULL; + GaimConnection *gc = NULL; + if(gtkblist) gtk_gaim_status_box_set_network_available(GTK_GAIM_STATUS_BOX(gtkblist->statusbox), FALSE); while (l) { GaimAccount *a = (GaimAccount*)l->data; - if (!gaim_account_is_disconnected(a)) - gaim_account_disconnect(a); + if (!gaim_account_is_disconnected(a)) { + gc = gaim_account_get_connection(a); + if (gc && gc->prpl) + prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl); + if (prpl_info) { + if (prpl_info->keepalive) + prpl_info->keepalive(gc); + else + gaim_account_disconnect(a); + } + } l = l->next; } }