diff libpurple/protocols/myspace/myspace.c @ 17355:9c5b1dc7404f

Change msim_msg_debug_string() to msim_msg_dump(), which prints the string using purple_debug_info() using a given formatting string. Simplifies usage.
author Jeffrey Connelly <jaconnel@calpoly.edu>
date Mon, 04 Jun 2007 01:59:20 +0000
parents c2208b64bffb
children c6305f8845d8
line wrap: on
line diff
--- a/libpurple/protocols/myspace/myspace.c	Sun Jun 03 05:50:11 2007 +0000
+++ b/libpurple/protocols/myspace/myspace.c	Mon Jun 04 01:59:20 2007 +0000
@@ -830,11 +830,7 @@
 
 #ifdef MSIM_DEBUG_MSG
 	{
-		gchar *debug_msg;
-
-		debug_msg = msim_msg_debug_string(msg);
-		purple_debug_info("msim", "%s\n", debug_msg);
-		g_free(debug_msg);
+		msim_msg_dump("ready to process: %s\n", msg);
 	}
 #endif
 
@@ -1087,6 +1083,8 @@
 
         /* TODO: sometimes (when click on it), buddy list disappears. Fix. */
         purple_blist_add_buddy(buddy, NULL, NULL, NULL);
+		//purple_blist_set_int(&buddy->node, "uid", XYZ);
+		exit(0);
     } else {
         purple_debug_info("msim", "msim_status: found buddy %s\n", username);
     }
@@ -1364,12 +1362,7 @@
 			 * clone message if it wants to keep it afterwards.) */
             if (!msim_process(gc, msg))
 			{
-				gchar *dbs;
-
-				dbs = msim_msg_debug_string(msg);
-				purple_debug_info("msim", "msim_input_cb: processing message failed on msg: %s\n",
-						dbs);
-				g_free(dbs);
+				msim_msg_dump("msim_input_cb: processing message failed on msg: %s\n", msg);
 			}
 			msim_msg_free(msg);
         }
@@ -1789,6 +1782,7 @@
 		msg = msim_msg_append(msg, "k1", MSIM_TYPE_STRING, g_strdup("v52/xxx\\yyy"));
 		msg = msim_msg_append(msg, "k1", MSIM_TYPE_STRING, g_strdup("v7"));
 		purple_debug_info("msim", "msg debug str=%s\n", msim_msg_debug_string(msg));
+		msim_msg_debug_dump("msg debug str=%s\n", msg);
 		purple_debug_info("msim", "msg packed=%s\n", msim_msg_pack(msg));
 		purple_debug_info("msim", "msg cloned=%s\n", msim_msg_pack(msim_msg_clone(msg)));
 		msim_msg_free(msg);