Mercurial > pidgin
comparison libpurple/protocols/yahoo/yahoo_packet.c @ 27302:377e063ecda5
Convert the yahoo prpl to using the debug convenience functions instead of
purple_debug().
author | John Bailey <rekkanoryo@rekkanoryo.org> |
---|---|
date | Sun, 05 Jul 2009 02:23:43 +0000 |
parents | 84b2e1770ede |
children | ef5f0cde8d74 |
comparison
equal
deleted
inserted
replaced
27301:84b2e1770ede | 27302:377e063ecda5 |
---|---|
188 pkt->hash = g_slist_prepend(pkt->hash, pair); | 188 pkt->hash = g_slist_prepend(pkt->hash, pair); |
189 | 189 |
190 if (purple_debug_is_verbose()) { | 190 if (purple_debug_is_verbose()) { |
191 char *esc; | 191 char *esc; |
192 esc = g_strescape(pair->value, NULL); | 192 esc = g_strescape(pair->value, NULL); |
193 purple_debug(PURPLE_DEBUG_MISC, "yahoo", | 193 purple_debug_misc("yahoo", "Key: %d \tValue: %s\n", pair->key, esc); |
194 "Key: %d \tValue: %s\n", pair->key, esc); | |
195 g_free(esc); | 194 g_free(esc); |
196 } | 195 } |
197 } else { | 196 } else { |
198 g_free(pair); | 197 g_free(pair); |
199 } | 198 } |
249 void yahoo_packet_dump(guchar *data, int len) | 248 void yahoo_packet_dump(guchar *data, int len) |
250 { | 249 { |
251 #ifdef YAHOO_DEBUG | 250 #ifdef YAHOO_DEBUG |
252 int i; | 251 int i; |
253 | 252 |
254 purple_debug(PURPLE_DEBUG_MISC, "yahoo", ""); | 253 purple_debug_misc("yahoo", ""); |
255 | 254 |
256 for (i = 0; i + 1 < len; i += 2) { | 255 for (i = 0; i + 1 < len; i += 2) { |
257 if ((i % 16 == 0) && i) { | 256 if ((i % 16 == 0) && i) { |
258 purple_debug(PURPLE_DEBUG_MISC, NULL, "\n"); | 257 purple_debug_misc(NULL, "\n"); |
259 purple_debug(PURPLE_DEBUG_MISC, "yahoo", ""); | 258 purple_debug_misc("yahoo", ""); |
260 } | 259 } |
261 | 260 |
262 purple_debug(PURPLE_DEBUG_MISC, NULL, "%02x%02x ", data[i], data[i + 1]); | 261 purple_debug_misc(NULL, "%02x%02x ", data[i], data[i + 1]); |
263 } | 262 } |
264 if (i < len) | 263 if (i < len) |
265 purple_debug(PURPLE_DEBUG_MISC, NULL, "%02x", data[i]); | 264 purple_debug_misc(NULL, "%02x", data[i]); |
266 | 265 |
267 purple_debug(PURPLE_DEBUG_MISC, NULL, "\n"); | 266 purple_debug_misc(NULL, "\n"); |
268 purple_debug(PURPLE_DEBUG_MISC, "yahoo", ""); | 267 purple_debug_misc("yahoo", ""); |
269 | 268 |
270 for (i = 0; i < len; i++) { | 269 for (i = 0; i < len; i++) { |
271 if ((i % 16 == 0) && i) { | 270 if ((i % 16 == 0) && i) { |
272 purple_debug(PURPLE_DEBUG_MISC, NULL, "\n"); | 271 purple_debug_misc(NULL, "\n"); |
273 purple_debug(PURPLE_DEBUG_MISC, "yahoo", ""); | 272 purple_debug_misc("yahoo", ""); |
274 } | 273 } |
275 | 274 |
276 if (g_ascii_isprint(data[i])) | 275 if (g_ascii_isprint(data[i])) |
277 purple_debug(PURPLE_DEBUG_MISC, NULL, "%c ", data[i]); | 276 purple_debug_misc(NULL, "%c ", data[i]); |
278 else | 277 else |
279 purple_debug(PURPLE_DEBUG_MISC, NULL, ". "); | 278 purple_debug_misc(NULL, ". "); |
280 } | 279 } |
281 | 280 |
282 purple_debug(PURPLE_DEBUG_MISC, NULL, "\n"); | 281 purple_debug_misc(NULL, "\n"); |
283 #endif /* YAHOO_DEBUG */ | 282 #endif /* YAHOO_DEBUG */ |
284 } | 283 } |
285 | 284 |
286 static void | 285 static void |
287 yahoo_packet_send_can_write(gpointer data, gint source, PurpleInputCondition cond) | 286 yahoo_packet_send_can_write(gpointer data, gint source, PurpleInputCondition cond) |