diff src/connection.c @ 6076:8d6aa792e0f6

[gaim-migrate @ 6535] make the jabber error code, and the core error code more betterer. this should fix luke's problem with downed jabber servers committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Thu, 10 Jul 2003 18:56:52 +0000
parents 547ba881bc7e
children 99f4bbeb27bc
line wrap: on
line diff
--- a/src/connection.c	Thu Jul 10 06:55:23 2003 +0000
+++ b/src/connection.c	Thu Jul 10 18:56:52 2003 +0000
@@ -175,9 +175,11 @@
 gboolean
 gaim_connection_disconnect_cb(gpointer data)
 {
-	GaimConnection *gc = data;
+	GaimAccount *account = data;
+	GaimConnection *gc = gaim_account_get_connection(account);
 
-	gaim_connection_disconnect(gc);
+	if(gc)
+		gaim_connection_disconnect(gc);
 
 	return FALSE;
 }
@@ -371,7 +373,8 @@
 	if (ops != NULL && ops->disconnected != NULL)
 		ops->disconnected(gc, text);
 
-	g_timeout_add(0, gaim_connection_disconnect_cb, gc);
+	g_timeout_add(0, gaim_connection_disconnect_cb,
+			gaim_connection_get_account(gc));
 }
 
 void