# HG changeset patch # User Stu Tomlinson # Date 1097690051 0 # Node ID 9d839c9f6c2d076ca8b183a373193b72b2f68f60 # Parent 1843023b818983f52b5502ee7bd9b2ef750378f2 [gaim-migrate @ 11111] Some more great MSN bugfixes from the patch tracker: Patch: 1045196: Fixed sending messages to MSN Web Messenger users (Damien Ayers) Patches 1045834 & 1044931: Fixed some memory leaks in the MSN plugin (Evan Schoenberg) Patch 1046398: Fixed a potential crash viewing MSN user profiles (Evan Schoenberg) (this also fixed a double-"Has You" bug that was only present in HEAD) Thanks guys! committer: Tailor Script diff -r 1843023b8189 -r 9d839c9f6c2d src/protocols/msn/msn.c --- a/src/protocols/msn/msn.c Wed Oct 13 14:40:45 2004 +0000 +++ b/src/protocols/msn/msn.c Wed Oct 13 17:54:11 2004 +0000 @@ -459,9 +459,12 @@ _("Idle") : gaim_status_get_name(status)); } - g_string_append_printf(s, _("\n%s: %s"), _("Has you"), - (user->list_op & (1 << MSN_LIST_RL)) ? - _("Yes") : _("No")); + if (user) + { + g_string_append_printf(s, _("\n%s: %s"), _("Has you"), + (user->list_op & (1 << MSN_LIST_RL)) ? + _("Yes") : _("No")); + } return g_string_free(s, FALSE); } @@ -1247,7 +1250,6 @@ if (b) { - MsnUser *user; GaimPresence *presence; char *statustext = msn_tooltip_text(b); @@ -1280,15 +1282,13 @@ if (statustext) { - g_string_append_printf(s, "%s
", statustext); + char *tmp; + tmp = gaim_strreplace((*statustext == '\n' ? statustext + 1 : statustext), + "\n", "
"); g_free(statustext); + g_string_append_printf(s, "%s
", tmp); + g_free(tmp); } - - user = b->proto_data; - - g_string_append_printf(s, _("%s: %s
"), _("Has you"), - (user->list_op & (1 << MSN_LIST_RL)) ? - _("Yes") : _("No")); } return g_string_free(s, FALSE); diff -r 1843023b8189 -r 9d839c9f6c2d src/protocols/msn/object.c --- a/src/protocols/msn/object.c Wed Oct 13 14:40:45 2004 +0000 +++ b/src/protocols/msn/object.c Wed Oct 13 17:54:11 2004 +0000 @@ -28,6 +28,8 @@ { \ tag += strlen(id "=\""); \ c = strchr(tag, '"'); \ + if (obj->field != NULL) \ + g_free(obj->field); \ obj->field = g_strndup(tag, c - tag); \ } diff -r 1843023b8189 -r 9d839c9f6c2d src/protocols/msn/switchboard.c --- a/src/protocols/msn/switchboard.c Wed Oct 13 14:40:45 2004 +0000 +++ b/src/protocols/msn/switchboard.c Wed Oct 13 17:54:11 2004 +0000 @@ -835,6 +835,8 @@ } msn_switchboard_connect(swboard, host, port); + + g_free(host); } void diff -r 1843023b8189 -r 9d839c9f6c2d src/protocols/msn/utils.c --- a/src/protocols/msn/utils.c Wed Oct 13 14:40:45 2004 +0000 +++ b/src/protocols/msn/utils.c Wed Oct 13 17:54:11 2004 +0000 @@ -181,6 +181,7 @@ msg = g_malloc0(len + 1); memset(fontcolor, 0, sizeof(fontcolor)); + strcat(fontcolor, "0"); memset(fonteffect, 0, sizeof(fonteffect)); for (c = html; *c != '\0';)