Mercurial > pidgin
diff libpurple/protocols/myspace/myspace.c @ 19431:3b7539c7402e
Now that MsimMessageElement's are more accessible outside message.c,
change msim_msg_get_list() to return a GList of MsimMessageElements instead of
strings. This just makes sense, because it gives myspace.c full access to the
msim_msg_get_*_from_element() data conversion routines that give you an integer,
unescaped string, etc.
This fixes half of #2637, in that status messages now are unescaped
(http://example.com/ used to show up as http://1/1example.com/1, but no more.)
author | Jeffrey Connelly <jaconnel@calpoly.edu> |
---|---|
date | Sun, 26 Aug 2007 02:50:38 +0000 |
parents | 0104035fd510 |
children | 210f792efd7c |
line wrap: on
line diff
--- a/libpurple/protocols/myspace/myspace.c Sun Aug 26 01:35:10 2007 +0000 +++ b/libpurple/protocols/myspace/myspace.c Sun Aug 26 02:50:38 2007 +0000 @@ -2991,9 +2991,9 @@ */ list = msim_msg_get_list(msg, "msg"); - status_code = atoi(g_list_nth_data(list, MSIM_STATUS_ORDINAL_ONLINE)); + status_code = msim_msg_get_integer_from_element(g_list_nth_data(list, MSIM_STATUS_ORDINAL_ONLINE)); purple_debug_info("msim", "msim_status: %s's status code = %d\n", username, status_code); - status_headline = g_list_nth_data(list, MSIM_STATUS_ORDINAL_HEADLINE); + status_headline = msim_msg_get_string_from_element(g_list_nth_data(list, MSIM_STATUS_ORDINAL_HEADLINE)); blist = purple_get_blist(); @@ -3017,7 +3017,8 @@ purple_debug_info("msim", "msim_status: found buddy %s\n", username); } - user->headline = g_strdup(status_headline); + /* don't copy; let the MsimUser own the headline, memory-wise */ + user->headline = status_headline; /* Set user status */ switch (status_code) {