changeset 2031:d7a1bbf220b0

[gaim-migrate @ 2041] ha committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Sat, 16 Jun 2001 03:06:32 +0000
parents 094dd4781735
children cfb9cf4655e6
files plugins/jabber/jabber.c
diffstat 1 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/jabber/jabber.c	Sat Jun 16 02:57:23 2001 +0000
+++ b/plugins/jabber/jabber.c	Sat Jun 16 03:06:32 2001 +0000
@@ -420,14 +420,19 @@
 {
 	xmlnode x;
 	char *t, *t2;
-	gjconn j = data;
-	struct gaim_connection *gc;
+	struct gaim_connection *gc = data;;
+	gjconn j;
 
 	if (source == -1) {
 		STATE_EVT(JCONN_STATE_OFF)
 		return;
 	}
 
+	if (!g_slist_find(connections, gc)) {
+		close(source);
+		return;
+	}
+
 	if (j->fd != source)
 		j->fd = source;
 
@@ -467,7 +472,7 @@
 	XML_SetElementHandler(j->parser, startElement, endElement);
 	XML_SetCharacterDataHandler(j->parser, charData);
 
-	j->fd = proxy_connect(j->user->server, 5222, gjab_connected, j);
+	j->fd = proxy_connect(j->user->server, 5222, gjab_connected, GJ_GC(j));
 	if (!user->gc || (j->fd < 0)) {
 		STATE_EVT(JCONN_STATE_OFF)
 		return;