Mercurial > pidgin.yaz
comparison libpurple/protocols/qq/char_conv.c @ 23051:190bc4ecf6c3
patch-03-add-qq_hex_dump
author | SHiNE CsyFeK <csyfek@gmail.com> |
---|---|
date | Tue, 24 Jun 2008 12:09:16 +0000 |
parents | 9a5d140400f1 |
children | 51dbe83ebbd3 |
comparison
equal
deleted
inserted
replaced
23050:9a5d140400f1 | 23051:190bc4ecf6c3 |
---|---|
112 ret = g_convert(str, len, to_charset, from_charset, &byte_read, &byte_write, &error); | 112 ret = g_convert(str, len, to_charset, from_charset, &byte_read, &byte_write, &error); |
113 | 113 |
114 if (error == NULL) | 114 if (error == NULL) |
115 return ret; /* conversion is OK */ | 115 return ret; /* conversion is OK */ |
116 else { /* conversion error */ | 116 else { /* conversion error */ |
117 gchar *failed = hex_dump_to_str((guint8 *) str, (len == -1) ? strlen(str) : len); | |
118 purple_debug(PURPLE_DEBUG_ERROR, "QQ", "%s\n", error->message); | 117 purple_debug(PURPLE_DEBUG_ERROR, "QQ", "%s\n", error->message); |
119 purple_debug(PURPLE_DEBUG_WARNING, "QQ", "Dump failed text\n%s", failed); | 118 |
120 g_free(failed); | 119 qq_hex_dump(PURPLE_DEBUG_WARNING, "QQ", |
120 (guint8 *) str, (len == -1) ? strlen(str) : len, | |
121 "Dump failed text"); | |
122 | |
121 g_error_free(error); | 123 g_error_free(error); |
122 return g_strdup(QQ_NULL_MSG); | 124 return g_strdup(QQ_NULL_MSG); |
123 } | 125 } |
124 } | 126 } |
125 | 127 |