changeset 30441:24579d001831

This DC stuff seems a bit verbose.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Sun, 11 Apr 2010 05:25:54 +0000
parents 264c76d29ab0
children ca7dec8303cb
files libpurple/protocols/msn/directconn.c
diffstat 1 files changed, 27 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/directconn.c	Thu Mar 18 04:30:27 2010 +0000
+++ b/libpurple/protocols/msn/directconn.c	Sun Apr 11 05:25:54 2010 +0000
@@ -79,7 +79,7 @@
 }
 
 static MsnDirectConnPacket*
-msn_dc_new_packet()
+msn_dc_new_packet(void)
 {
 	MsnDirectConnPacket	*p;
 
@@ -103,17 +103,18 @@
 	g_free(p);
 }
 
-MsnDirectConn*
+MsnDirectConn *
 msn_dc_new(MsnSlpCall *slpcall)
 {
 	MsnDirectConn *dc;
 
-	purple_debug_info("msn", "msn_dc_new\n");
-
 	g_return_val_if_fail(slpcall != NULL, NULL);
 
 	dc = g_new0(MsnDirectConn, 1);
 
+	if (purple_debug_if_verbose())
+		purple_debug_info("msn", "msn_dc_new %p\n", dc);
+
 	dc->slplink = slpcall->slplink;
 	dc->slpcall = slpcall;
 
@@ -152,7 +153,8 @@
 {
 	MsnSlpLink *slplink;
 
-	purple_debug_info("msn", "msn_dc_destroy\n");
+	if (purple_debug_is_verbose())
+		purple_debug_info("msn", "msn_dc_destroy %p\n", dc);
 
 	g_return_if_fail(dc != NULL);
 
@@ -270,7 +272,8 @@
 	MsnSlpMessage *msg;
 	gchar *header;
 
-	purple_debug_info("msn", "msn_dc_send_invite\n");
+	if (purple_debug_is_verbose())
+		purple_debug_info("msn", "msn_dc_send_invite %p\n", dc);
 
 	g_return_if_fail(dc != NULL);
 
@@ -300,7 +303,8 @@
 void
 msn_dc_send_ok(MsnDirectConn *dc)
 {
-	purple_debug_info("msn", "msn_dc_send_ok\n");
+	if (purple_debug_is_verbose())
+		purple_debug_info("msn", "msn_dc_send_ok %p\n", dc);
 
 	g_return_if_fail(dc != NULL);
 
@@ -321,7 +325,7 @@
 	MsnSlpCall *slpcall;
 	PurpleXfer *xfer;
 
-	purple_debug_info("msn", "msn_dc_try_fallback_to_p2p\n");
+	purple_debug_info("msn", "msn_dc_try_fallback_to_p2p %p\n", dc);
 
 	g_return_if_fail(dc != NULL);
 
@@ -424,7 +428,8 @@
 	char *body;
 	int body_len;
 
-	purple_debug_info("msn", "msn_dc_send_bye\n");
+	if (purple_debug_is_verbose())
+		purple_debug_info("msn", "msn_dc_send_bye %p\n", dc);
 
 	g_return_if_fail(dc != NULL);
 	g_return_if_fail(dc->slpcall != NULL);
@@ -623,7 +628,8 @@
 {
 	MsnDirectConnPacket	*p;
 
-	purple_debug_info("msn", "msn_dc_send_foo\n");
+	if (purple_debug_is_verbose())
+		purple_debug_info("msn", "msn_dc_send_foo %p\n", dc);
 
 	g_return_if_fail(dc != NULL);
 
@@ -1126,13 +1132,12 @@
 void
 msn_dc_connected_to_peer_cb(gpointer data, gint fd, const gchar *error_msg)
 {
-	MsnDirectConn *dc;
-
-	purple_debug_info("msn", "msn_dc_connected_to_peer_cb\n");
+	MsnDirectConn *dc = data;
 
-	g_return_if_fail(data != NULL);
+	if (purple_debug_is_verbose())
+		purple_debug_info("msn", "msn_dc_connected_to_peer_cb %p\n", dc);
 
-	dc = data;
+	g_return_if_fail(dc != NULL);
 
 	dc->connect_data = NULL;
 	purple_timeout_remove(dc->connect_timeout_handle);
@@ -1156,9 +1161,9 @@
 	MsnDirectConn *dc = data;
 	MsnSlpCall *slpcall = dc->slpcall;
 
-	purple_debug_info("msn", "msn_dc_incoming_connection_timeout_cb\n");
+	if (purple_debug_is_verbose())
+		purple_debug_info("msn", "msn_dc_incoming_connection_timeout_cb %p\n", dc);
 
-	dc = data;
 	g_return_val_if_fail(dc != NULL, FALSE);
 
 	slpcall = dc->slpcall;
@@ -1196,7 +1201,7 @@
 {
 	MsnDirectConn *dc = data;
 
-	purple_debug_info("msn", "msn_dc_outgoing_connection_timeout_cb\n");
+	purple_debug_info("msn", "msn_dc_outgoing_connection_timeout_cb %p\n", dc);
 
 	g_return_val_if_fail(dc != NULL, FALSE);
 
@@ -1256,7 +1261,8 @@
 {
 	MsnDirectConn *dc = data;
 
-	purple_debug_info("msn", "msn_dc_incoming_connection_cb\n");
+	if (purple_debug_is_verbose())
+		purple_debug_info("msn", "msn_dc_incoming_connection_cb %p\n", dc);
 
 	g_return_if_fail(dc != NULL);
 
@@ -1287,7 +1293,8 @@
 {
 	MsnDirectConn *dc = data;
 
-	purple_debug_info("msn", "msn_dc_listen_socket_created_cb\n");
+	if (purple_debug_is_verbose())
+		purple_debug_info("msn", "msn_dc_listen_socket_created_cb %p\n", dc);
 
 	g_return_if_fail(dc != NULL);