Revision 5ca99fb4b235309dbf41514329d877293090d8b1
nosnilmot at pidgin.im
nosnilmot at pidgin.im
Wed Apr 11 01:22:53 EDT 2007
o -----------------------------------------------------------------
| Revision: 5ca99fb4b235309dbf41514329d877293090d8b1
| Ancestor: 82ca4c7fe6b1b1498420013bee0dfc6b163922ea
| Author: nosnilmot
| Date: 2005-01-11T17:27:29
| Branch: im.pidgin.gaim.oldstatus
|
| Modified files:
| ChangeLog plugins/tcl/tcl_signals.c src/blist.c src/cmds.c
| src/conversation.c src/ft.c src/gtkblist.c src/gtkconn.c
| src/gtkconv.c src/gtkimhtml.c src/gtkimhtmltoolbar.c
| src/gtkutils.c src/protocols/irc/irc.c
| src/protocols/irc/msgs.c src/protocols/irc/parse.c
| src/protocols/jabber/chat.c src/protocols/jabber/jabber.c
| src/protocols/msn/cmdproc.c src/protocols/msn/httpconn.c
| src/protocols/msn/msn.c src/protocols/msn/msn.h
| src/protocols/msn/nexus.c src/protocols/msn/notification.c
| src/protocols/msn/session.c src/protocols/msn/slpcall.c
| src/protocols/msn/switchboard.c src/protocols/msn/userlist.c
| src/protocols/oscar/msgcookie.c src/protocols/oscar/oscar.c
| src/protocols/yahoo/util.c src/protocols/yahoo/yahoochat.c
|
| ChangeLog:
|
| [gaim-migrate @ 11797]
| Some things here:
| - Several memory leak fixes
| - A few invalid memory access fixes
| - Fix MSN notification server transfer to be quiet about it
| - Fix MSN blist sync if user has insane friendly name
| - 1 typo fix :)
|
| ... and quite possibly something else I forgot.
| ============================================================
| --- ChangeLog a1691b1cb89d07caf24ed92a6433e4efd7c3f9c2
| +++ ChangeLog fd0c5d61d8413b9056cb48cbf5fd9b7615c4ee48
| @@ -9,6 +9,7 @@ version 1.1.2:
| * Fix configuration of Jabber chat rooms on some servers
| * More MSN bug fixes (Felipe Contreras)
| * Fix queue messages to Docklet when not globally away (Robert McQueen)
| + * Fix some leaks
|
| version 1.1.1 (12/28/2004):
| * Allow SILC authentication via public key if your key is password
| ============================================================
| --- plugins/tcl/tcl_signals.c f2718eeb862769688643395fc61a0b0ecd6d3aa9
| +++ plugins/tcl/tcl_signals.c 87c32bb8b769b82138af222742fbcb98eb66faff
| @@ -310,7 +310,7 @@ static void *tcl_signal_callback(va_list
| }
|
| g_string_free(name, TRUE);
| - g_string_free(val, FALSE);
| + g_string_free(val, TRUE);
| g_free(vars);
|
| return retval;
| ============================================================
| --- src/blist.c daffe19c045883a7e116edb852c434da3387fa6b
| +++ src/blist.c aa60f0ce338fcebd75c615e7fe829a868c4af443
| @@ -1212,6 +1212,7 @@ void gaim_blist_remove_contact(GaimConta
| ops->remove(gaimbuddylist, node);
|
| /* Delete the node */
| + g_hash_table_destroy(contact->node.settings);
| g_free(contact);
| }
| }
| @@ -1281,6 +1282,7 @@ void gaim_blist_remove_buddy(GaimBuddy *
| g_hash_table_destroy(buddy->node.settings);
| g_free(buddy->name);
| g_free(buddy->alias);
| + g_free(buddy->server_alias);
| g_free(buddy);
|
| /* If the contact is empty then remove it */
| @@ -1323,6 +1325,7 @@ void gaim_blist_remove_chat(GaimChat *ch
|
| /* Delete the node */
| g_hash_table_destroy(chat->components);
| + g_hash_table_destroy(chat->node.settings);
| g_free(chat->alias);
| g_free(chat);
| }
| @@ -1384,6 +1387,7 @@ void gaim_blist_remove_group(GaimGroup *
| }
|
| /* Delete the node */
| + g_hash_table_destroy(group->node.settings);
| g_free(group->name);
| g_free(group);
| }
| ============================================================
| --- src/cmds.c 53a87959431c2215c684e9db84e9fcc63b96778d
| +++ src/cmds.c dc3a7b35f900245f9c8dee7b099f2b6d20deb844
| @@ -44,9 +44,9 @@ static gint cmds_compare_func(const Gaim
|
| static gint cmds_compare_func(const GaimCmd *a, const GaimCmd *b)
| {
| - if (a->id > b->id)
| + if (a->priority > b->priority)
| return -1;
| - else if (a->id < b->id)
| + else if (a->priority < b->priority)
| return 1;
| else return 0;
| }
| ============================================================
| --- src/conversation.c 44f35be443b04053ace51875ae12b3b044a27f66
| +++ src/conversation.c 2d31b84e24b840c39dad51306f16b68999ac4471
| @@ -978,7 +978,7 @@ gaim_conversation_destroy(GaimConversati
|
| for (node = conv->u.chat->in_room; node != NULL; node = node->next) {
| if (node->data != NULL)
| - g_free(node->data);
| + gaim_conv_chat_cb_destroy((GaimConvChatBuddy *)node->data);
| node->data = NULL;
| }
|
| @@ -1002,6 +1002,9 @@ gaim_conversation_destroy(GaimConversati
| g_free(conv->u.chat->topic);
| conv->u.chat->topic = NULL;
|
| + if(conv->u.chat->nick)
| + g_free(conv->u.chat->nick);
| +
| g_free(conv->u.chat);
| conv->u.chat = NULL;
|
| ============================================================
| --- src/ft.c 84134c8c92a655ba1a7b11a3534625d6daad964d
| +++ src/ft.c eb67fcf3e1dd9beb908a9c7c92562d7a87807144
| @@ -984,12 +984,12 @@ gaim_xfer_cancel_remote(GaimXfer *xfer)
| escaped = g_markup_escape_text(gaim_xfer_get_filename(xfer), -1);
| msg = g_strdup_printf(_("%s canceled the transfer of %s"),
| xfer->who, escaped);
| + g_free(escaped);
| }
| else
| {
| msg = g_strdup_printf(_("%s canceled the file transfer"), xfer->who);
| }
| - g_free(escaped);
| gaim_xfer_conversation_write(xfer, msg, TRUE);
| gaim_xfer_error(gaim_xfer_get_type(xfer), xfer->who, msg);
| g_free(msg);
| ============================================================
| --- src/gtkblist.c 315e00696fae1e663d180a7ba346b623b393eae7
| +++ src/gtkblist.c bfac327425fd91d98c1fb5d053272d9f5d844cea
| @@ -2162,8 +2162,10 @@ static gboolean gaim_gtk_blist_tooltip_t
| node = g_value_get_pointer(&val);
|
| if(!GAIM_BLIST_NODE_IS_CONTACT(node) && !GAIM_BLIST_NODE_IS_BUDDY(node)
| - && !GAIM_BLIST_NODE_IS_CHAT(node))
| + && !GAIM_BLIST_NODE_IS_CHAT(node)) {
| + gtk_tree_path_free(path);
| return FALSE;
| + }
|
| gtknode = node->ui_data;
|
| @@ -3524,9 +3526,13 @@ static void gaim_gtk_blist_remove(GaimBu
| if(node->parent)
| gaim_gtk_blist_update(list, node->parent);
|
| - /* There's something I don't understand here */
| - /* g_free(node->ui_data);
| - node->ui_data = NULL; */
| + /* There's something I don't understand here - Ethan */
| + /* Ethan said that back in 2003, but this g_free has been left commented
| + * out ever since. I can't find any reason at all why this is bad and
| + * valgrind found several reasons why it's good. If this causes problems
| + * comment it out again. Stu */
| + g_free(node->ui_data);
| + node->ui_data = NULL;
| }
|
| static gboolean do_selection_changed(GaimBlistNode *new_selection)
| ============================================================
| --- src/gtkconn.c cc56815657e28b6096c3ec7d55b274b31a112629
| +++ src/gtkconn.c 6847f94385a33a1a25cf69727fc347819be37f59
| @@ -317,7 +317,7 @@ static void disconnect_window_update_but
| {
| GtkTreeIter iter;
| GtkTreeSelection *sel;
| - const char *label_text;
| + char *label_text;
| GaimAccount *account = NULL;
|
| if ((disconnect_window == NULL) || (model == NULL))
| @@ -366,6 +366,7 @@ static void disconnect_window_update_but
| gtk_widget_hide(disconnect_window->reconnect_btn);
| else
| gtk_widget_show(disconnect_window->reconnect_btn);
| + g_free(label_text);
| }
|
| static void disconnect_response_cb(GtkDialog *dialog, gint id, GtkWidget *widget)
| ============================================================
| --- src/gtkconv.c b64326fd00e166f7dd3629c9a6e8b8f9bf718734
| +++ src/gtkconv.c ff916f8ce8484b48a8c45c5a7665c5991dee80ac
| @@ -1336,7 +1336,7 @@ ignore_cb(GtkWidget *w, GaimConversation
| GtkTreeIter iter;
| GtkTreeModel *model;
| GtkTreeSelection *sel;
| - const char *name;
| + char *name;
|
| chat = GAIM_CONV_CHAT(conv);
| gtkconv = GAIM_GTK_CONVERSATION(conv);
| @@ -1358,6 +1358,7 @@ ignore_cb(GtkWidget *w, GaimConversation
| gaim_conv_chat_ignore(chat, name);
|
| add_chat_buddy_common(conv, name);
| + g_free(name);
| }
|
| static void
| @@ -1432,7 +1433,7 @@ static GtkWidget *
| }
|
| static GtkWidget *
| -create_chat_menu(GaimConversation *conv, gchar *who,
| +create_chat_menu(GaimConversation *conv, const char *who,
| GaimPluginProtocolInfo *prpl_info, GaimConnection *gc)
| {
| static GtkWidget *menu = NULL;
| @@ -1450,7 +1451,7 @@ create_chat_menu(GaimConversation *conv,
| button = gtk_menu_item_new_with_label(_("IM"));
| g_signal_connect(G_OBJECT(button), "activate",
| G_CALLBACK(menu_chat_im_cb), conv);
| - g_object_set_data(G_OBJECT(button), "user_data", who);
| + g_object_set_data_full(G_OBJECT(button), "user_data", g_strdup(who), g_free);
| gtk_menu_shell_append(GTK_MENU_SHELL(menu), button);
| gtk_widget_show(button);
|
| @@ -1459,7 +1460,7 @@ create_chat_menu(GaimConversation *conv,
| button = gtk_menu_item_new_with_label(_("Send File"));
| g_signal_connect(G_OBJECT(button), "activate",
| G_CALLBACK(menu_chat_send_file_cb), conv);
| - g_object_set_data(G_OBJECT(button), "user_data", who);
| + g_object_set_data_full(G_OBJECT(button), "user_data", g_strdup(who), g_free);
| gtk_menu_shell_append(GTK_MENU_SHELL(menu), button);
| gtk_widget_show(button);
| }
| @@ -1471,7 +1472,7 @@ create_chat_menu(GaimConversation *conv,
|
| g_signal_connect(G_OBJECT(button), "activate",
| G_CALLBACK(ignore_cb), conv);
| - g_object_set_data(G_OBJECT(button), "user_data", who);
| + g_object_set_data_full(G_OBJECT(button), "user_data", g_strdup(who), g_free);
| gtk_menu_shell_append(GTK_MENU_SHELL(menu), button);
| gtk_widget_show(button);
|
| @@ -1479,7 +1480,7 @@ create_chat_menu(GaimConversation *conv,
| button = gtk_menu_item_new_with_label(_("Info"));
| g_signal_connect(G_OBJECT(button), "activate",
| G_CALLBACK(menu_chat_info_cb), conv);
| - g_object_set_data(G_OBJECT(button), "user_data", who);
| + g_object_set_data_full(G_OBJECT(button), "user_data", g_strdup(who), g_free);
| gtk_menu_shell_append(GTK_MENU_SHELL(menu), button);
| gtk_widget_show(button);
| }
| @@ -1488,7 +1489,7 @@ create_chat_menu(GaimConversation *conv,
| button = gtk_menu_item_new_with_label(_("Get Away Msg"));
| g_signal_connect(G_OBJECT(button), "activate",
| G_CALLBACK(menu_chat_get_away_cb), conv);
| - g_object_set_data(G_OBJECT(button), "user_data", who);
| + g_object_set_data_full(G_OBJECT(button), "user_data", g_strdup(who), g_free);
| gtk_menu_shell_append(GTK_MENU_SHELL(menu), button);
| gtk_widget_show(button);
| }
| @@ -1504,7 +1505,7 @@ create_chat_menu(GaimConversation *conv,
| g_signal_connect(G_OBJECT(button), "activate",
| G_CALLBACK(menu_chat_add_remove_cb), conv);
|
| - g_object_set_data(G_OBJECT(button), "user_data", who);
| + g_object_set_data_full(G_OBJECT(button), "user_data", g_strdup(who), g_free);
| gtk_menu_shell_append(GTK_MENU_SHELL(menu), button);
| gtk_widget_show(button);
| }
| @@ -1547,6 +1548,7 @@ gtkconv_chat_popup_menu_cb(GtkWidget *wi
| gtk_menu_popup(GTK_MENU(menu), NULL, NULL,
| gaim_gtk_treeview_popup_menu_position_func, widget,
| 0, GDK_CURRENT_TIME);
| + g_free(who);
|
| return TRUE;
| }
| @@ -1592,13 +1594,15 @@ right_click_chat_cb(GtkWidget *widget, G
|
| if (event->button == 1 && event->type == GDK_2BUTTON_PRESS) {
| chat_do_im(conv, who);
| - g_free(who);
| } else if (event->button == 3 && event->type == GDK_BUTTON_PRESS) {
| GtkWidget *menu = create_chat_menu (conv, who, prpl_info, gc);
| gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL,
| event->button, event->time);
| }
|
| + g_free(who);
| + gtk_tree_path_free(path);
| +
| return TRUE;
| }
|
| @@ -2421,7 +2425,8 @@ update_tab_icon(GaimConversation *conv)
| g_object_unref(status);
|
| if (gaim_conv_window_get_active_conversation(win) == conv &&
| - gtkconv->u.im->anim == NULL)
| + (gaim_conversation_get_type(conv) != GAIM_CONV_IM ||
| + gtkconv->u.im->anim == NULL))
| {
| status = get_tab_icon(conv, FALSE);
|
| @@ -5197,7 +5202,7 @@ gaim_gtkconv_write_conv(GaimConversation
| str = g_malloc(1024);
|
| /* If we're whispering, it's not an autoresponse. */
| - if (gaim_message_meify(new_message, length)) {
| + if (gaim_message_meify(new_message, -1)) {
| g_snprintf(str, 1024, "***%s", who_escaped);
| strcpy(color, "#6C2585");
| }
| @@ -5207,7 +5212,7 @@ gaim_gtkconv_write_conv(GaimConversation
| }
| }
| else {
| - if (gaim_message_meify(new_message, length)) {
| + if (gaim_message_meify(new_message, -1)) {
| str = g_malloc(1024);
|
| if (flags & GAIM_MESSAGE_AUTO_RESP)
| ============================================================
| --- src/gtkimhtml.c 20f003f12d02ab350a13af6c103fd0b855e76a9a
| +++ src/gtkimhtml.c e5598fa4ce4e31ab07c1095f8d0eb898fd44cba4
| @@ -1372,6 +1372,7 @@ gtk_imhtml_link_drag_rcv_cb(GtkWidget *w
| return;
| }
| }
| + g_strfreev(links);
| break;
| case GTK_IMHTML_DRAG_HTML:
| {
| @@ -2359,6 +2360,8 @@ void gtk_imhtml_insert_html_at_iter(GtkI
| ws[0] = '\0'; wpos = 0;
| gtk_imhtml_toggle_link(imhtml, href);
| }
| + if (href)
| + g_free(href);
| }
| break;
| case 46: /* IMG (opt) */
| ============================================================
| --- src/gtkimhtmltoolbar.c 5c45a55023eeb38447bc57605f95e52c53e52aa3
| +++ src/gtkimhtmltoolbar.c 3685235d12e9da6f40edec380eb9457200392087
| @@ -154,7 +154,7 @@ toggle_font(GtkWidget *font, GtkIMHtmlTo
| static void
| toggle_font(GtkWidget *font, GtkIMHtmlToolbar *toolbar)
| {
| - const char *fontname;
| + char *fontname;
|
| g_return_if_fail(toolbar);
|
| @@ -170,6 +170,7 @@ toggle_font(GtkWidget *font, GtkIMHtmlTo
| g_snprintf(fonttif, sizeof(fonttif), "%s 12", fontname);
| gtk_font_selection_dialog_set_font_name(GTK_FONT_SELECTION_DIALOG(toolbar->font_dialog),
| fonttif);
| + g_free(fontname);
| } else {
| gtk_font_selection_dialog_set_font_name(GTK_FONT_SELECTION_DIALOG(toolbar->font_dialog),
| DEFAULT_FONT_FACE);
| @@ -232,7 +233,7 @@ toggle_fg_color(GtkWidget *color, GtkIMH
| if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(color))) {
| GtkWidget *colorsel;
| GdkColor fgcolor;
| - const char *color = gtk_imhtml_get_current_forecolor(GTK_IMHTML(toolbar->imhtml));
| + char *color = gtk_imhtml_get_current_forecolor(GTK_IMHTML(toolbar->imhtml));
|
| if (!toolbar->fgcolor_dialog) {
|
| @@ -241,6 +242,7 @@ toggle_fg_color(GtkWidget *color, GtkIMH
| if (color) {
| gdk_color_parse(color, &fgcolor);
| gtk_color_selection_set_current_color(GTK_COLOR_SELECTION(colorsel), &fgcolor);
| + g_free(color);
| }
|
| g_object_set_data(G_OBJECT(colorsel), "gaim_toolbar", toolbar);
| @@ -305,7 +307,7 @@ toggle_bg_color(GtkWidget *color, GtkIMH
| if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(color))) {
| GtkWidget *colorsel;
| GdkColor bgcolor;
| - const char *color = gtk_imhtml_get_current_backcolor(GTK_IMHTML(toolbar->imhtml));
| + char *color = gtk_imhtml_get_current_backcolor(GTK_IMHTML(toolbar->imhtml));
|
| if (!toolbar->bgcolor_dialog) {
|
| @@ -314,6 +316,7 @@ toggle_bg_color(GtkWidget *color, GtkIMH
| if (color) {
| gdk_color_parse(color, &bgcolor);
| gtk_color_selection_set_current_color(GTK_COLOR_SELECTION(colorsel), &bgcolor);
| + g_free(color);
| }
|
| g_object_set_data(G_OBJECT(colorsel), "gaim_toolbar", toolbar);
| ============================================================
| --- src/gtkutils.c 2fb8f7d709a9dc040534572bbf8805267fbe16a9
| +++ src/gtkutils.c 65bfec658c5a905960957b1f60991e758e06cc0e
| @@ -228,18 +228,20 @@ gaim_pixbuf_button_from_stock(const char
| gaim_pixbuf_button_from_stock(const char *text, const char *icon,
| GaimButtonOrientation style)
| {
| - GtkWidget *button, *image, *label, *bbox, *ibox, *lbox;
| + GtkWidget *button, *image, *label, *bbox, *ibox, *lbox = NULL;
|
| button = gtk_button_new();
|
| if (style == GAIM_BUTTON_HORIZONTAL) {
| bbox = gtk_hbox_new(FALSE, 0);
| ibox = gtk_hbox_new(FALSE, 0);
| - lbox = gtk_hbox_new(FALSE, 0);
| + if (text)
| + lbox = gtk_hbox_new(FALSE, 0);
| } else {
| bbox = gtk_vbox_new(FALSE, 0);
| ibox = gtk_vbox_new(FALSE, 0);
| - lbox = gtk_vbox_new(FALSE, 0);
| + if (text)
| + lbox = gtk_vbox_new(FALSE, 0);
| }
|
| gtk_container_add(GTK_CONTAINER(button), bbox);
| ============================================================
| --- src/protocols/irc/irc.c 333c0d62b8cb988338ac783c5fccd934925f7b03
| +++ src/protocols/irc/irc.c 834cd28f42dc6f90ff618362a7efcbddc181a01f
| @@ -314,6 +314,7 @@ static void irc_close(GaimConnection *gc
| gaim_timeout_remove(irc->timer);
| g_hash_table_destroy(irc->cmds);
| g_hash_table_destroy(irc->msgs);
| + g_hash_table_destroy(irc->buddies);
| if (irc->motd)
| g_string_free(irc->motd, TRUE);
| g_free(irc->server);
| ============================================================
| --- src/protocols/irc/msgs.c 786c3077e2aa61e0aa255d3e27de7f1f7939d557
| +++ src/protocols/irc/msgs.c 1c5d231d6e4c48d46f15caa6ea65901cce848c84
| @@ -224,6 +224,7 @@ void irc_msg_endwhois(struct irc_conn *i
| _("Buddy Information for %s"), irc->whois.nick);
| gaim_notify_userinfo(gc, irc->whois.nick, NULL, buffer, NULL, str, NULL, NULL);
|
| + g_free(irc->whois.nick);
| g_free(str);
| memset(&irc->whois, 0, sizeof(irc->whois));
| }
| @@ -738,6 +739,7 @@ void irc_msg_nickused(struct irc_conn *i
| buf = irc_format(irc, "vn", "NICK", newnick);
| irc_send(irc, buf);
| g_free(buf);
| + g_free(newnick);
| }
|
| void irc_msg_notice(struct irc_conn *irc, const char *name, const char *from, char **args)
| ============================================================
| --- src/protocols/irc/parse.c ded5e2f0a12a7bf5dd8181f88d3d6a3cfa2580a7
| +++ src/protocols/irc/parse.c 622a022684135416d39df8898eff5a3b00c7d32f
| @@ -235,8 +235,10 @@ static char *irc_recv_convert(struct irc
| enclist = gaim_account_get_string(irc->account, "encoding", IRC_DEFAULT_CHARSET);
| encodings = g_strsplit(enclist, ",", -1);
|
| - if (encodings[0] == NULL)
| + if (encodings[0] == NULL) {
| + g_strfreev(encodings);
| return gaim_utf8_salvage(string);
| + }
|
| for (i = 0; encodings[i] != NULL; i++) {
| charset = encodings[i];
| @@ -255,6 +257,7 @@ static char *irc_recv_convert(struct irc
| return utf8;
| }
| }
| + g_strfreev(encodings);
|
| return gaim_utf8_salvage(string);
| }
| ============================================================
| --- src/protocols/jabber/chat.c c1e68e6cf63e2260d37fe12469e1041f15349ec8
| +++ src/protocols/jabber/chat.c c1e265c1bdc04fb5d7366c655f3c9e4f99250810
| @@ -292,6 +292,8 @@ void jabber_chat_free(JabberChat *chat)
|
| g_free(chat->room);
| g_free(chat->server);
| + g_free(chat->handle);
| + g_hash_table_destroy(chat->members);
| g_free(chat);
| }
|
| ============================================================
| --- src/protocols/jabber/jabber.c 441c5226341f535a627aca6a36459308c1d8ce70
| +++ src/protocols/jabber/jabber.c 3145f3c9e27c05e4500346877cb8a08d10646421
| @@ -109,6 +109,7 @@ static void jabber_bind_result_cb(Jabber
| }
| if((my_jb = jabber_buddy_find(js, full_jid, TRUE)))
| my_jb->subscription |= JABBER_SUB_BOTH;
| + g_free(full_jid);
| }
| } else {
| char *msg = jabber_parse_error(js, packet);
| ============================================================
| --- src/protocols/msn/cmdproc.c 25e666a31f262345923a562e5eeb61a580824e3b
| +++ src/protocols/msn/cmdproc.c fc9f8438a5af72282df5ae02b601054c26cf72b6
| @@ -49,6 +49,10 @@ msn_cmdproc_destroy(MsnCmdProc *cmdproc)
| g_queue_free(cmdproc->txqueue);
|
| msn_history_destroy(cmdproc->history);
| +
| + if (cmdproc->last_cmd != NULL)
| + msn_command_destroy(cmdproc->last_cmd);
| +
| g_free(cmdproc);
| }
|
| ============================================================
| --- src/protocols/msn/httpconn.c ba03a982581837b270e54ba2fa80626c01610d2c
| +++ src/protocols/msn/httpconn.c ca6ea190aae45f8e4974cf0d4bd2acea9df96db2
| @@ -68,6 +68,15 @@ msn_httpconn_destroy(MsnHttpConn *httpco
| if (httpconn->connected)
| msn_httpconn_disconnect(httpconn);
|
| + if (httpconn->full_session_id != NULL)
| + g_free(httpconn->full_session_id);
| +
| + if (httpconn->session_id != NULL)
| + g_free(httpconn->session_id);
| +
| + if (httpconn->host != NULL)
| + g_free(httpconn->host);
| +
| g_free(httpconn);
| }
|
| @@ -669,17 +678,17 @@ msn_httpconn_parse_data(MsnHttpConn *htt
|
| if (!wasted)
| {
| - if (httpconn->full_session_id != NULL);
| + if (httpconn->full_session_id != NULL)
| g_free(httpconn->full_session_id);
|
| httpconn->full_session_id = full_session_id;
|
| - if (httpconn->session_id != NULL);
| + if (httpconn->session_id != NULL)
| g_free(httpconn->session_id);
|
| httpconn->session_id = session_id;
|
| - if (httpconn->host != NULL);
| + if (httpconn->host != NULL)
| g_free(httpconn->host);
|
| httpconn->host = gw_ip;
| @@ -689,6 +698,7 @@ msn_httpconn_parse_data(MsnHttpConn *htt
| MsnServConn *servconn;
|
| /* It's going to die. */
| + /* poor thing */
|
| servconn = httpconn->servconn;
|
| @@ -696,6 +706,7 @@ msn_httpconn_parse_data(MsnHttpConn *htt
| servconn->wasted = TRUE;
|
| g_free(full_session_id);
| + g_free(session_id);
| g_free(gw_ip);
| }
| }
| ============================================================
| --- src/protocols/msn/msn.c 86533d3f4656b13555453e39059309042bc4f153
| +++ src/protocols/msn/msn.c ce163c4c73cc5df08ccbffab46cd3b4fae3cf61a
| @@ -47,8 +47,6 @@
| #include "imgstore.h"
| #endif
|
| -#define BUDDY_ALIAS_MAXLEN 387
| -
| typedef struct
| {
| GaimConnection *gc;
| ============================================================
| --- src/protocols/msn/msn.h 2f37626407aa695f9ead618675675ba821fecdb6
| +++ src/protocols/msn/msn.h 9c91fee0e5efa1a3fe84ca2749df6cfde22fbb98
| @@ -69,6 +69,7 @@
|
| #define USEROPT_HOTMAIL 0
|
| +#define BUDDY_ALIAS_MAXLEN 387
|
| #define MSN_FT_GUID "{5D3E02AB-6190-11d3-BBBB-00C04F795683}"
|
| ============================================================
| --- src/protocols/msn/nexus.c f54fd42744b2afe062d596b626c278dffa953431
| +++ src/protocols/msn/nexus.c d5649035ce838e7f1367d98c25243ac302e7b07b
| @@ -132,7 +132,8 @@ login_connect_cb(gpointer data, GaimSslC
| session = nexus->session;
| g_return_if_fail(session != NULL);
|
| - msn_session_set_login_step(session, MSN_LOGIN_STEP_GET_COOKIE);
| + if (!session->logged_in)
| + msn_session_set_login_step(session, MSN_LOGIN_STEP_GET_COOKIE);
|
| username =
| g_strdup(gaim_url_encode(gaim_account_get_username(session->account)));
| @@ -312,7 +313,8 @@ nexus_connect_cb(gpointer data, GaimSslC
| session = nexus->session;
| g_return_if_fail(session != NULL);
|
| - msn_session_set_login_step(session, MSN_LOGIN_STEP_AUTH);
| + if (!session->logged_in)
| + msn_session_set_login_step(session, MSN_LOGIN_STEP_AUTH);
|
| request_str = g_strdup_printf("GET /rdr/pprdr.asp\r\n\r\n");
|
| ============================================================
| --- src/protocols/msn/notification.c bd5b923eadf1ed1c3a3d747d3a286e7ee7a20325
| +++ src/protocols/msn/notification.c cc75925d6b657418a64ba7b18ff842f935680d96
| @@ -111,7 +111,8 @@ connect_cb(MsnServConn *servconn)
|
| vers = g_strjoinv(" ", a);
|
| - msn_session_set_login_step(session, MSN_LOGIN_STEP_HANDSHAKE);
| + if (!session->logged_in)
| + msn_session_set_login_step(session, MSN_LOGIN_STEP_HANDSHAKE);
| msn_cmdproc_send(cmdproc, "VER", "%s", vers);
|
| g_strfreev(a);
| @@ -199,7 +200,8 @@ msn_got_login_params(MsnSession *session
|
| cmdproc = session->notification->cmdproc;
|
| - msn_session_set_login_step(session, MSN_LOGIN_STEP_AUTH_END);
| + if (!session->logged_in)
| + msn_session_set_login_step(session, MSN_LOGIN_STEP_AUTH_END);
|
| msn_cmdproc_send(cmdproc, "USR", "TWN S %s", login_params);
| }
| @@ -233,7 +235,8 @@ usr_cmd(MsnCmdProc *cmdproc, MsnCommand
|
| gaim_connection_set_display_name(gc, friendly);
|
| - msn_session_set_login_step(session, MSN_LOGIN_STEP_SYN);
| + if (!session->logged_in)
| + msn_session_set_login_step(session, MSN_LOGIN_STEP_SYN);
|
| msn_cmdproc_send(cmdproc, "SYN", "%s", "0");
| }
| @@ -258,7 +261,8 @@ usr_cmd(MsnCmdProc *cmdproc, MsnCommand
|
| g_strfreev(elems);
|
| - msn_session_set_login_step(session, MSN_LOGIN_STEP_AUTH_START);
| + if (!session->logged_in)
| + msn_session_set_login_step(session, MSN_LOGIN_STEP_AUTH_START);
|
| msn_nexus_connect(session->nexus);
| }
| ============================================================
| --- src/protocols/msn/session.c 5bc0dfd60f8b8896ff24c6c083ae40d454001e93
| +++ src/protocols/msn/session.c 41570c2732f7d6cc486ac35029a4584bbdda7fea
| @@ -366,6 +366,9 @@ msn_session_finish_login(MsnSession *ses
| account = session->account;
| gc = gaim_account_get_connection(account);
|
| + if (session->logged_in)
| + return;
| +
| msn_user_set_buddy_icon(session->user,
| gaim_account_get_buddy_icon(session->account));
|
| ============================================================
| --- src/protocols/msn/slpcall.c 3fa8f263568cf95b79f591f989ff94f94fda1e8e
| +++ src/protocols/msn/slpcall.c acbe2f80d001a143585c80f7412409978624ae09
| @@ -192,9 +192,9 @@ msn_slp_call_timeout(gpointer data)
| {
| MsnSlpCall *slpcall;
|
| - gaim_debug_info("msn", "slpcall timeout (%p)\n", slpcall);
| + slpcall = data;
|
| - slpcall = data;
| + gaim_debug_info("msn", "slpcall timeout (%p)\n", slpcall);
|
| if (!slpcall->pending && !slpcall->progress)
| {
| ============================================================
| --- src/protocols/msn/switchboard.c ec1aac7b5e388761f710c5cde899f20f9c31c302
| +++ src/protocols/msn/switchboard.c 78226719dc398f9fc82ec0278301b71eff91c9ac
| @@ -352,7 +352,7 @@ msg_error_helper(MsnCmdProc *cmdproc, Ms
| {
| const char *format;
| char *body_str, *body_enc, *pre, *post;
| - char *str_reason;
| + const char *str_reason;
|
| #if 0
| if (swboard->conv == NULL)
| @@ -651,7 +651,10 @@ bye_cmd(MsnCmdProc *cmdproc, MsnCommand
| }
|
| if (str != NULL)
| + {
| msn_switchboard_report_user(swboard, GAIM_MESSAGE_SYSTEM, str);
| + g_free(str);
| + }
|
| msn_switchboard_destroy(swboard);
| }
| ============================================================
| --- src/protocols/msn/userlist.c 39a63924456d44884b5e8116f5f004821cbc7309
| +++ src/protocols/msn/userlist.c 543e8dcb0ae5b06a48d2120a92eadbf2716218a8
| @@ -467,6 +467,7 @@ msn_userlist_remove_group(MsnUserList *u
| msn_userlist_remove_group(MsnUserList *userlist, MsnGroup *group)
| {
| userlist->groups = g_list_remove(userlist->groups, group);
| + msn_group_destroy(group);
| }
|
| MsnGroup *
| @@ -630,6 +631,13 @@ msn_userlist_add_buddy(MsnUserList *user
|
| store_name = (user != NULL) ? get_store_name(user) : who;
|
| + /* this might be a bit of a hack, but it should prevent notification server
| + * disconnections for people who have buddies with insane friendly names
| + * who added you to their buddy list from being disconnected. Stu. */
| + /* ... No, that sentence didn't parse for me either. Stu. */
| + if (strlen(store_name) > BUDDY_ALIAS_MAXLEN)
| + store_name = who;
| +
| /* Then request the add to the server. */
| list = lists[list_id];
|
| ============================================================
| --- src/protocols/oscar/msgcookie.c c8fb2201cc067f5abbd294deb718651621b79ad8
| +++ src/protocols/oscar/msgcookie.c b7a95dceed637981d90f444bccf45cbb702a8636
| @@ -144,7 +144,7 @@ faim_internal int aim_dumpcookie(aim_ses
| /**
| * aim_cookie_free - free an aim_msgcookie_t struct
| *
| - * this function removes the cookie *cookie from teh list of cookies
| + * this function removes the cookie *cookie from the list of cookies
| * in sess, and then frees all memory associated with it. including
| * its data! if you want to use the private data after calling this,
| * make sure you copy it first.
| ============================================================
| --- src/protocols/oscar/oscar.c fa29a56e967c6acd6d42f8b66377b2cccc3536df
| +++ src/protocols/oscar/oscar.c ae58df53ae6a2c709edc9236471758ca562d90be
| @@ -1209,7 +1209,8 @@ static int gaim_odc_incoming(aim_session
| /* for each valid image tag... */
| while (gaim_markup_find_tag("img", tmp, &start, &end, &attribs)) {
| const char *id, *src, *datasize;
| - const char *tag = NULL, *data = NULL;
| + const char *data = NULL;
| + char *tag = NULL;
| size_t size;
| int imgid = 0;
|
| @@ -1229,6 +1230,8 @@ static int gaim_odc_incoming(aim_session
| if (tag && (data = gaim_strcasestr(binary, tag)))
| data += strlen(tag);
|
| + g_free(tag);
| +
| /* check the data is here and store it */
| if (data + (size = atoi(datasize)) <= msgend)
| imgid = gaim_imgstore_add(data, size, src);
| ============================================================
| --- src/protocols/yahoo/util.c d757614b39b746e4fd98ad0f3d8b3f1d671b71f6
| +++ src/protocols/yahoo/util.c b3bf7fee885f2e9364a0c0315f67b8339f44f73c
| @@ -46,7 +46,7 @@ char *yahoo_string_encode(GaimConnection
| {
| struct yahoo_data *yd = gc->proto_data;
| char *ret;
| - char *to_codeset;
| + const char *to_codeset;
|
| if (yd->jp && utf8 && *utf8)
| *utf8 = FALSE;
| ============================================================
| --- src/protocols/yahoo/yahoochat.c 3f6ee0e426592b108382157cc3d9b798a94debb7
| +++ src/protocols/yahoo/yahoochat.c 096ab5f2dceca219c30f6fff92dbb5f7acdcb791
| @@ -1110,6 +1110,7 @@ static void yahoo_roomlist_destroy(struc
| g_free(yrl->host);
| if (yrl->parse)
| g_markup_parse_context_free(yrl->parse);
| + g_free(yrl);
| }
|
| enum yahoo_room_type {
To get the patch for this revision, please do this:
mtn log --last 1 --diffs --from 5ca99fb4b235309dbf41514329d877293090d8b1
More information about the Commits
mailing list