# HG changeset patch # User Mark Doliner # Date 1155543759 0 # Node ID ae1c155bed575ab5803c247026d3761fe741bfeb # Parent 12be86c7e2ceb60311318578468123b15739b5c8 [gaim-migrate @ 16751] This should take care of the silc gaim_proxy_connect()s committer: Tailor Script diff -r 12be86c7e2ce -r ae1c155bed57 src/protocols/silc/silc.c --- a/src/protocols/silc/silc.c Mon Aug 14 07:37:11 2006 +0000 +++ b/src/protocols/silc/silc.c Mon Aug 14 08:22:39 2006 +0000 @@ -141,7 +141,7 @@ } static void -silcgaim_login_connected(gpointer data, gint source) +silcgaim_login_connected(gpointer data, gint source, const gchar *error_message) { GaimConnection *gc = data; SilcGaim sg; @@ -153,20 +153,14 @@ g_return_if_fail(gc != NULL); - if (!GAIM_CONNECTION_IS_VALID(gc)) { - close(source); - return; - } + sg = gc->proto_data; + sg->connect_info = NULL; if (source < 0) { gaim_connection_error(gc, _("Connection failed")); return; } - sg = gc->proto_data; - if (sg == NULL) - return; - client = sg->client; account = sg->account; @@ -363,11 +357,12 @@ gc->proto_data = sg; /* Connect to the SILC server */ - if (gaim_proxy_connect(account, + sg->connect_info = gaim_proxy_connect(account, gaim_account_get_string(account, "server", "silc.silcnet.org"), gaim_account_get_int(account, "port", 706), - silcgaim_login_connected, gc) == NULL) + silcgaim_login_connected, gc); + if (sg->connect_info == NULL) { gaim_connection_error(gc, _("Unable to create connection")); return; @@ -387,6 +382,8 @@ SilcGaim sg = (SilcGaim)context; silc_client_stop(sg->client); silc_client_free(sg->client); + if (sg->connect_info != NULL) + gaim_proxy_connect_cancel(sg->connect_info); #ifdef HAVE_SILCMIME_H if (sg->mimeass) silc_mime_assembler_free(sg->mimeass); diff -r 12be86c7e2ce -r ae1c155bed57 src/protocols/silc/silcgaim.h --- a/src/protocols/silc/silcgaim.h Mon Aug 14 07:37:11 2006 +0000 +++ b/src/protocols/silc/silcgaim.h Mon Aug 14 08:22:39 2006 +0000 @@ -67,6 +67,7 @@ SilcClient client; SilcClientConnection conn; + GaimProxyConnectInfo *connect_info; guint scheduler; GaimConnection *gc; GaimAccount *account;