pidgin: 0a622e51: Apparently, I missed a few changes for p...

qulogic at pidgin.im qulogic at pidgin.im
Mon Jul 13 02:01:06 EDT 2009


-----------------------------------------------------------------
Revision: 0a622e51eb4f20f13d90ea9a1e4c11187a7437fd
Ancestor: 7464e6a7cd486b83bbd919dde287ca04a5a711ce
Author: qulogic at pidgin.im
Date: 2009-07-12T07:33:06
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/0a622e51eb4f20f13d90ea9a1e4c11187a7437fd

Modified files:
        libpurple/protocols/msn/msg.c
        libpurple/protocols/msn/slplink.c

ChangeLog: 

Apparently, I missed a few changes for purple_debug_is_verbose().

-------------- next part --------------
============================================================
--- libpurple/protocols/msn/msg.c	22353c00088ed0fe16be26e0a3a52a6a11869f62
+++ libpurple/protocols/msn/msg.c	c2f3133f1550516cf28d60ae7786e423090cc109
@@ -767,8 +767,7 @@ msn_message_show_readable(MsnMessage *ms
 		g_string_append_printf(str, "SUB ID:     %u\r\n", msg->msnslp_header.ack_sub_id);
 		g_string_append_printf(str, "ACK Size:   %" G_GUINT64_FORMAT "\r\n", msg->msnslp_header.ack_size);
 
-#ifdef MSN_DEBUG_SLP_VERBOSE
-		if (body != NULL)
+		if (purple_debug_is_verbose() && body != NULL)
 		{
 			if (text_body)
 			{
@@ -792,7 +791,6 @@ msn_message_show_readable(MsnMessage *ms
 				g_string_append(str, "\r\n");
 			}
 		}
-#endif
 
 		g_string_append_printf(str, "Footer:     %u\r\n", msg->msnslp_footer.value);
 	}
============================================================
--- libpurple/protocols/msn/slplink.c	d7fddf4c0a7dea8c8638877600a5112b64949a3d
+++ libpurple/protocols/msn/slplink.c	60bf75e50500c7fc39ec2c03bd53f809866955ed
@@ -65,9 +65,8 @@ msn_slplink_new(MsnSession *session, con
 
 	slplink = g_new0(MsnSlpLink, 1);
 
-#ifdef MSN_DEBUG_SLPLINK
-	purple_debug_info("msn", "slplink_new: slplink(%p)\n", slplink);
-#endif
+	if (purple_debug_is_verbose())
+		purple_debug_info("msn", "slplink_new: slplink(%p)\n", slplink);
 
 	slplink->session = session;
 	slplink->slp_seq_id = rand() % 0xFFFFFF00 + 4;
@@ -87,9 +86,8 @@ msn_slplink_destroy(MsnSlpLink *slplink)
 {
 	MsnSession *session;
 
-#ifdef MSN_DEBUG_SLPLINK
-	purple_debug_info("msn", "slplink_destroy: slplink(%p)\n", slplink);
-#endif
+	if (purple_debug_is_verbose())
+		purple_debug_info("msn", "slplink_destroy: slplink(%p)\n", slplink);
 
 	g_return_if_fail(slplink != NULL);
 
@@ -269,9 +267,8 @@ msn_slplink_send_msgpart(MsnSlpLink *slp
 		msg->msnslp_header.length = len;
 	}
 
-#ifdef MSN_DEBUG_SLP
-	msn_message_show_readable(msg, slpmsg->info, slpmsg->text_body);
-#endif
+	if (purple_debug_is_verbose())
+		msn_message_show_readable(msg, slpmsg->info, slpmsg->text_body);
 
 #ifdef MSN_DEBUG_SLP_FILES
 	debug_msg_to_file(msg, TRUE);
@@ -441,10 +438,7 @@ msn_slplink_send_ack(MsnSlpLink *slplink
 	slpmsg->ack_id     = msg->msnslp_header.id;
 	slpmsg->ack_sub_id = msg->msnslp_header.ack_id;
 	slpmsg->ack_size   = msg->msnslp_header.total_size;
-
-#ifdef MSN_DEBUG_SLP
 	slpmsg->info = "SLP ACK";
-#endif
 
 	msn_slplink_send_slpmsg(slplink, slpmsg);
 }
@@ -459,9 +453,8 @@ send_file_cb(MsnSlpCall *slpcall)
 	slpmsg = msn_slpmsg_new(slpcall->slplink);
 	slpmsg->slpcall = slpcall;
 	slpmsg->flags = 0x1000030;
-#ifdef MSN_DEBUG_SLP
 	slpmsg->info = "SLP FILE";
-#endif
+
 	xfer = (PurpleXfer *)slpcall->xfer;
 	purple_xfer_start(slpcall->xfer, 0, NULL, 0);
 	slpmsg->fp = xfer->dest_fp;
@@ -496,9 +489,8 @@ msn_slplink_process_msg(MsnSlpLink *slpl
 	guint64 offset;
 	gsize len;
 
-#ifdef MSN_DEBUG_SLP
-	msn_slpmsg_show(msg);
-#endif
+	if (purple_debug_is_verbose())
+		msn_slpmsg_show(msg);
 
 #ifdef MSN_DEBUG_SLP_FILES
 	debug_msg_to_file(msg, FALSE);


More information about the Commits mailing list