libgaim/protocols/silc/silc.c

changeset 14899
c65f0b4fb351
parent 14604
67a7c42a8654
child 15081
7e978e8dc84a
--- a/libgaim/protocols/silc/silc.c	Sat Oct 28 19:52:30 2006 +0000
+++ b/libgaim/protocols/silc/silc.c	Sat Oct 28 20:04:03 2006 +0000
@@ -154,7 +154,6 @@
 	g_return_if_fail(gc != NULL);
 
 	sg = gc->proto_data;
-	sg->connect_data = NULL;
 
 	if (source < 0) {
 		gaim_connection_error(gc, _("Connection failed"));
@@ -357,12 +356,11 @@
 	gc->proto_data = sg;
 
 	/* Connect to the SILC server */
-	sg->connect_data = gaim_proxy_connect(account,
+	if (gaim_proxy_connect(gc, account,
 			       gaim_account_get_string(account, "server",
 						       "silc.silcnet.org"),
 			       gaim_account_get_int(account, "port", 706),
-			       silcgaim_login_connected, gc);
-	if (sg->connect_data == NULL)
+			       silcgaim_login_connected, gc) == NULL)
 	{
 		gaim_connection_error(gc, _("Unable to create connection"));
 		return;
@@ -382,8 +380,6 @@
 	SilcGaim sg = (SilcGaim)context;
 	silc_client_stop(sg->client);
 	silc_client_free(sg->client);
-	if (sg->connect_data != NULL)
-		gaim_proxy_connect_cancel(sg->connect_data);
 #ifdef HAVE_SILCMIME_H
 	if (sg->mimeass)
 		silc_mime_assembler_free(sg->mimeass);

mercurial