Mercurial > pidgin
comparison libpurple/protocols/myspace/myspace.c @ 17692:3aed9c8c6af7
Fix bug where string returned from msim_msg_get_string() is not a new
string if the data type is a string (oops). This fixes the get info crash
on Windows.
author | Jeffrey Connelly <jaconnel@calpoly.edu> |
---|---|
date | Thu, 05 Jul 2007 00:29:25 +0000 |
parents | b9fd55903979 |
children | 3c613fec5617 |
comparison
equal
deleted
inserted
replaced
17691:b9fd55903979 | 17692:3aed9c8c6af7 |
---|---|
1100 { | 1100 { |
1101 purple_debug_info("msim", "msim_get_info_cb: no 'user' in msg"); | 1101 purple_debug_info("msim", "msim_get_info_cb: no 'user' in msg"); |
1102 return; | 1102 return; |
1103 } | 1103 } |
1104 | 1104 |
1105 msim_msg_free(msg); | |
1105 purple_debug_info("msim", "msim_get_info_cb: got for user: %s\n", user); | 1106 purple_debug_info("msim", "msim_get_info_cb: got for user: %s\n", user); |
1106 msim_msg_free(msg); | |
1107 | 1107 |
1108 body_str = msim_msg_get_string(user_info_msg, "body"); | 1108 body_str = msim_msg_get_string(user_info_msg, "body"); |
1109 g_return_if_fail(body_str != NULL); | 1109 g_return_if_fail(body_str != NULL); |
1110 body = msim_parse_body(body_str); | 1110 body = msim_parse_body(body_str); |
1111 g_free(body_str); | 1111 g_free(body_str); |
1115 * not on blist. */ | 1115 * not on blist. */ |
1116 | 1116 |
1117 user_info = purple_notify_user_info_new(); | 1117 user_info = purple_notify_user_info_new(); |
1118 | 1118 |
1119 /* Identification */ | 1119 /* Identification */ |
1120 purple_notify_user_info_add_pair(user_info, _("User"), g_strdup(user)); | 1120 purple_notify_user_info_add_pair(user_info, _("User"), user); |
1121 | 1121 |
1122 /* note: g_hash_table_lookup does not create a new string! */ | 1122 /* note: g_hash_table_lookup does not create a new string! */ |
1123 str = g_hash_table_lookup(body, "UserID"); | 1123 str = g_hash_table_lookup(body, "UserID"); |
1124 if (str) | 1124 if (str) |
1125 purple_notify_user_info_add_pair(user_info, _("User ID"), | 1125 purple_notify_user_info_add_pair(user_info, _("User ID"), |