diff src/buddy.c @ 1081:efcacae6acdb

[gaim-migrate @ 1091] libfaim connects non-blocking committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Fri, 10 Nov 2000 22:49:02 +0000
parents 7221054ad2b1
children 12478dd1e9d7
line wrap: on
line diff
--- a/src/buddy.c	Fri Nov 10 05:54:04 2000 +0000
+++ b/src/buddy.c	Fri Nov 10 22:49:02 2000 +0000
@@ -262,9 +262,10 @@
 	struct group_show *g;
 	GSList *m;
 	struct buddy_show *b;
+	gboolean remove_group;
 
 	while (s) {
-		gboolean remove_group = FALSE;
+		remove_group = FALSE;
 		g = (struct group_show *)s->data;
 		m = g->members;
 		while (m) {
@@ -287,10 +288,11 @@
 				g_free(b->name);
 				g_free(b->show);
 				g_free(b);
-			} else {
+			} else if (g_slist_find(b->connlist, gc)) {
 				b->connlist = g_slist_remove(b->connlist, gc);
 				m = g_slist_next(m);
-			}
+			} else
+				m = g_slist_next(m);
 		}
 		if (remove_group)
 			s = shows;
@@ -316,13 +318,13 @@
 {
 	destroy_buddies(gc);
 	plugin_event(event_signoff, gc, 0, 0, 0);
+	update_keepalive(gc, FALSE);
 	serv_close(gc);
 
 	if (connections) return;
 
 	sprintf(debug_buff, "date: %s\n", full_date());
 	debug_print(debug_buff);
-	update_keepalive(gc, FALSE);
         destroy_all_dialogs();
         destroy_buddy();
 #ifdef USE_APPLET