Mercurial > pidgin.yaz
changeset 21116:a3dc160d7914
Patch from eperez to fix some debug code, Fixes #3524
author | Ka-Hing Cheung <khc@hxbc.us> |
---|---|
date | Sat, 03 Nov 2007 05:46:41 +0000 |
parents | b95550f14549 |
children | 2bc214520c42 |
files | libpurple/protocols/msn/slplink.c |
diffstat | 1 files changed, 3 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/msn/slplink.c Sat Nov 03 05:37:59 2007 +0000 +++ b/libpurple/protocols/msn/slplink.c Sat Nov 03 05:46:41 2007 +0000 @@ -39,22 +39,17 @@ char *tmp; char *dir; char *pload; - FILE *tf; int c; gsize pload_size; dir = send ? "send" : "recv"; c = send ? m_sc++ : m_rc++; tmp = g_strdup_printf("%s/msntest/%s/%03d", g_get_home_dir(), dir, c); - tf = g_fopen(tmp, "wb"); - if (tf == NULL) + pload = msn_message_gen_payload(msg, &pload_size); + if (!purple_util_write_data_to_file_absolute(tmp, pload, pload_size)) { - purple_debug_error("msn", "could not open debug file\n"); - return; + purple_debug_error("msn", "could not save debug file"); } - pload = msn_message_gen_payload(msg, &pload_size); - fwrite(pload, 1, pload_size, tf); - fclose(tf); g_free(tmp); } #endif