From: <sea...@us...> - 2006-11-22 18:40:12
|
Revision: 17811 http://svn.sourceforge.net/gaim/?rev=17811&view=rev Author: seanegan Date: 2006-11-22 10:40:11 -0800 (Wed, 22 Nov 2006) Log Message: ----------- I wanted to make networkmanager detection of disconnected networks just send keepalives as not to kill the connection if it doesn't have to Modified Paths: -------------- trunk/gtk/gtkconn.c Modified: trunk/gtk/gtkconn.c =================================================================== --- trunk/gtk/gtkconn.c 2006-11-22 18:16:51 UTC (rev 17810) +++ trunk/gtk/gtkconn.c 2006-11-22 18:40:11 UTC (rev 17811) @@ -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; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |