diff libpurple/protocols/oscar/oscar.c @ 27868:e4fa83bb82e0

propagate from branch 'im.pidgin.pidgin' (head c50c272054b5f756082d58737d15f1ab5e46be26) to branch 'im.pidgin.pidgin.yaz' (head 722923614311c50bbed8655320ee549b5ec3fb28)
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Sat, 16 Aug 2008 07:04:26 +0000
parents e81f0d1966db 62fda5f78f6a
children e187fdccd743
line wrap: on
line diff
--- a/libpurple/protocols/oscar/oscar.c	Mon Aug 11 04:44:54 2008 +0000
+++ b/libpurple/protocols/oscar/oscar.c	Sat Aug 16 07:04:26 2008 +0000
@@ -1663,6 +1663,7 @@
 	char in = '\0';
 	int x = 0;
 	unsigned char m[17];
+	GString *msg;
 
 	while (read(pos->fd, &in, 1) == 1) {
 		if (in == '\n')
@@ -1693,11 +1694,14 @@
 				"from " AIMHASHDATA "--that's bad.\n");
 	}
 	m[16] = '\0';
-	purple_debug_misc("oscar", "Sending hash: ");
+
+	msg = g_string_new("Sending hash: ");
 	for (x = 0; x < 16; x++)
-		purple_debug_misc(NULL, "%02hhx ", (unsigned char)m[x]);
-
-	purple_debug_misc(NULL, "\n");
+		g_string_append_printf(msg, "%02hhx ", (unsigned char)m[x]);
+	g_string_append(msg, "\n");
+	purple_debug_misc("oscar", msg->str);
+	g_string_free(msg, TRUE);
+
 	purple_input_remove(pos->inpa);
 	close(pos->fd);
 	aim_sendmemblock(od, pos->conn, 0, 16, m, AIM_SENDMEMBLOCK_FLAG_ISHASH);
@@ -4954,19 +4958,19 @@
 	va_list ap;
 	int numtypes;
 	guint16 *maxitems;
+	GString *msg;
 
 	va_start(ap, fr);
 	numtypes = va_arg(ap, int);
 	maxitems = va_arg(ap, guint16 *);
 	va_end(ap);
 
-	purple_debug_misc("oscar", "ssi rights:");
-
+	msg = g_string_new("ssi rights:");
 	for (i=0; i<numtypes; i++)
-		purple_debug_misc(NULL, " max type 0x%04x=%hd,",
-				   i, maxitems[i]);
-
-	purple_debug_misc(NULL, "\n");
+		g_string_append_printf(msg, " max type 0x%04x=%hd,", i, maxitems[i]);
+	g_string_append(msg, "\n");
+	purple_debug_misc("oscar", msg->str);
+	g_string_free(msg, TRUE);
 
 	if (numtypes >= 0)
 		od->rights.maxbuddies = maxitems[0];