comparison libgaim/protocols/qq/char_conv.c @ 14656:d1a76ccb93c4

[gaim-migrate @ 17402] leak-be-gone committer: Tailor Script <tailor@pidgin.im>
author Mark Huetsch <markhuetsch>
date Sat, 30 Sep 2006 00:14:00 +0000
parents a8140cbe08ce
children c039c920e11c
comparison
equal deleted inserted replaced
14655:4764c501fdb9 14656:d1a76ccb93c4
110 ret = g_convert(str, len, to_charset, from_charset, &byte_read, &byte_write, &error); 110 ret = g_convert(str, len, to_charset, from_charset, &byte_read, &byte_write, &error);
111 111
112 if (error == NULL) 112 if (error == NULL)
113 return ret; /* conversion is OK */ 113 return ret; /* conversion is OK */
114 else { /* conversion error */ 114 else { /* conversion error */
115 gchar *failed = hex_dump_to_str((guint8 *) str, (len == -1) ? strlen(str) : len);
115 gaim_debug(GAIM_DEBUG_ERROR, "QQ", "%s\n", error->message); 116 gaim_debug(GAIM_DEBUG_ERROR, "QQ", "%s\n", error->message);
116 gaim_debug(GAIM_DEBUG_WARNING, "QQ", 117 gaim_debug(GAIM_DEBUG_WARNING, "QQ", "Dump failed text\n%s", failed);
117 "Dump failed text\n%s", 118 g_free(failed);
118 hex_dump_to_str((guint8 *) str, (len == -1) ? strlen(str) : len));
119 g_error_free(error); 119 g_error_free(error);
120 return g_strdup(QQ_NULL_MSG); 120 return g_strdup(QQ_NULL_MSG);
121 } 121 }
122 } 122 }
123 123