changeset 1865:8d758ff5957e

[gaim-migrate @ 1875] i got it right this time. no, i don't care. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Sun, 20 May 2001 09:09:02 +0000
parents 5cb89cf24f45
children 466fc4ada7cb
files plugins/jabber/jabber.c
diffstat 1 files changed, 9 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/jabber/jabber.c	Sun May 20 02:10:34 2001 +0000
+++ b/plugins/jabber/jabber.c	Sun May 20 09:09:02 2001 +0000
@@ -964,12 +964,6 @@
 	g_free(buddy);
 }
 
-static gboolean jabber_disconnect(gpointer data)
-{
-	signoff(data);
-	return FALSE;
-}
-
 static void jabber_handleauthresp(gjconn j, jpacket p)
 {
 	if (jpacket_subtype(p) == JPACKET__RESULT) {
@@ -1004,7 +998,7 @@
 			hide_login_progress(GJ_GC(j), "Unknown login error");
 		}
 
-		gtk_timeout_add(50, jabber_disconnect, GJ_GC(j));
+		signoff(GJ_GC(j));
 	}
 }
 
@@ -1216,13 +1210,20 @@
 	return TRUE;
 }
 
+static gboolean jabber_free(gpointer data)
+{
+	gjab_delete(data);
+	return FALSE;
+}
+
 static void jabber_close(struct gaim_connection *gc)
 {
 	struct jabber_data *jd = gc->proto_data;
 	g_hash_table_foreach_remove(jd->hash, jabber_destroy_hash, NULL);
 	g_hash_table_destroy(jd->hash);
 	gdk_input_remove(gc->inpa);
-	gjab_delete(jd->jc);
+	close(jd->jc->fd);
+	gtk_timeout_add(50, jabber_free, jd->jc);
 	jd->jc = NULL;
 	g_free(jd);
 	gc->proto_data = NULL;