Mercurial > pidgin.yaz
comparison src/server.c @ 2017:eee309c0de93
[gaim-migrate @ 2027]
this is better. also plugged a mem leak for when you left a chat after you were disconnected.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Thu, 14 Jun 2001 21:43:59 +0000 |
parents | 9187e83c8b03 |
children | 3366311426df |
comparison
equal
deleted
inserted
replaced
2016:9a2e3902658c | 2017:eee309c0de93 |
---|---|
59 } | 59 } |
60 } | 60 } |
61 | 61 |
62 void serv_close(struct gaim_connection *gc) | 62 void serv_close(struct gaim_connection *gc) |
63 { | 63 { |
64 GSList *bcs = gc->buddy_chats; | 64 while (gc->buddy_chats) { |
65 struct conversation *b; | 65 struct conversation *b = gc->buddy_chats->data; |
66 while (bcs) { | |
67 b = (struct conversation *)bcs->data; | |
68 gc->buddy_chats = g_slist_remove(gc->buddy_chats, b); | 66 gc->buddy_chats = g_slist_remove(gc->buddy_chats, b); |
69 b->gc = NULL; | 67 b->gc = NULL; |
70 bcs = gc->buddy_chats; | |
71 } | 68 } |
72 | 69 |
73 if (gc->idle_timer > 0) | 70 if (gc->idle_timer > 0) |
74 gtk_timeout_remove(gc->idle_timer); | 71 gtk_timeout_remove(gc->idle_timer); |
75 gc->idle_timer = 0; | 72 gc->idle_timer = 0; |
868 | 865 |
869 debug_printf("Leaving room %s.\n", b->name); | 866 debug_printf("Leaving room %s.\n", b->name); |
870 | 867 |
871 g->buddy_chats = g_slist_remove(g->buddy_chats, b); | 868 g->buddy_chats = g_slist_remove(g->buddy_chats, b); |
872 | 869 |
873 while (b->in_room) { | 870 delete_chat(b); |
874 char *tmp = b->in_room->data; | |
875 b->in_room = g_list_remove(b->in_room, tmp); | |
876 g_free(tmp); | |
877 } | |
878 | |
879 while (b->ignored) { | |
880 g_free(b->ignored->data); | |
881 b->ignored = g_list_remove(b->ignored, b->ignored->data); | |
882 } | |
883 | |
884 g_string_free(b->history, TRUE); | |
885 g_free(b); | |
886 } | 871 } |
887 | 872 |
888 void serv_got_chat_in(struct gaim_connection *g, int id, char *who, int whisper, char *message, time_t mtime) | 873 void serv_got_chat_in(struct gaim_connection *g, int id, char *who, int whisper, char *message, time_t mtime) |
889 { | 874 { |
890 int w; | 875 int w; |