changeset 1015:c3579d03a0c1

[gaim-migrate @ 1025] damn i'm smooth. no more 100% cpu usage! yay! :) committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Sat, 21 Oct 2000 09:56:16 +0000
parents bc4f6a535bd9
children 661ac77ccd1b
files src/oscar.c src/server.c
diffstat 2 files changed, 14 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/oscar.c	Fri Oct 20 23:47:35 2000 +0000
+++ b/src/oscar.c	Sat Oct 21 09:56:16 2000 +0000
@@ -314,7 +314,17 @@
 
 void oscar_close(struct gaim_connection *gc) {
 	struct oscar_data *odata = (struct oscar_data *)gc->proto_data;
+	GSList *c = odata->oscar_chats;
+	struct chat_connection *n;
 	if (gc->protocol != PROTO_OSCAR) return;
+	
+	while (c) {
+		n = (struct chat_connection *)c->data;
+		gdk_input_remove(n->inpa);
+		g_free(n->name);
+		g_free(n);
+		c = c->next;
+	}
 	if (gc->inpa > 0)
 		gdk_input_remove(gc->inpa);
 	if (odata->cnpa > 0)
--- a/src/server.c	Fri Oct 20 23:47:35 2000 +0000
+++ b/src/server.c	Sat Oct 21 09:56:16 2000 +0000
@@ -438,6 +438,10 @@
 
 void serv_chat_leave(struct gaim_connection *g, int id)
 {
+	/* i think this is the only one this should be necessary for since this is the
+	 * only thing that could possibly get called after the connection is closed */
+	if (!g_slist_find(connections, g)) return;
+
 	if (g->prpl && g->prpl->chat_leave)
 		(*g->prpl->chat_leave)(g, id);
 }