pidgin: e3e84c2d: This DC stuff seems a bit verbose.

qulogic at pidgin.im qulogic at pidgin.im
Fri May 21 18:05:52 EDT 2010


-----------------------------------------------------------------
Revision: e3e84c2d23cd244ea4f22b0db71c35db978fb118
Ancestor: 15ca023e9c60620a8828c7ec15ad13fae390ef33
Author: qulogic at pidgin.im
Date: 2010-04-11T05:25:54
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/e3e84c2d23cd244ea4f22b0db71c35db978fb118

Modified files:
        libpurple/protocols/msn/directconn.c

ChangeLog: 

This DC stuff seems a bit verbose.

-------------- next part --------------
============================================================
--- libpurple/protocols/msn/directconn.c	9478fdcde9618b90ed9b8ffbb2472593a41907cf
+++ libpurple/protocols/msn/directconn.c	3e904021be53e948eec7ef4d691394ddedecc9d5
@@ -79,7 +79,7 @@ static MsnDirectConnPacket*
 }
 
 static MsnDirectConnPacket*
-msn_dc_new_packet()
+msn_dc_new_packet(void)
 {
 	MsnDirectConnPacket	*p;
 
@@ -103,17 +103,18 @@ msn_dc_destroy_packet(MsnDirectConnPacke
 	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 @@ msn_dc_destroy(MsnDirectConn *dc)
 {
 	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 @@ msn_dc_send_invite(MsnDirectConn *dc)
 	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 @@ msn_dc_send_ok(MsnDirectConn *dc)
 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 @@ msn_dc_fallback_to_p2p(MsnDirectConn *dc
 	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 @@ msn_dc_send_bye(MsnDirectConn *dc)
 	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 @@ msn_dc_send_foo(MsnDirectConn *dc)
 {
 	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,14 +1132,13 @@ msn_dc_connected_to_peer_cb(gpointer dat
 void
 msn_dc_connected_to_peer_cb(gpointer data, gint fd, const gchar *error_msg)
 {
-	MsnDirectConn *dc;
+	MsnDirectConn *dc = data;
 
-	purple_debug_info("msn", "msn_dc_connected_to_peer_cb\n");
+	if (purple_debug_is_verbose())
+		purple_debug_info("msn", "msn_dc_connected_to_peer_cb %p\n", dc);
 
-	g_return_if_fail(data != NULL);
+	g_return_if_fail(dc != NULL);
 
-	dc = data;
-
 	dc->connect_data = NULL;
 	purple_timeout_remove(dc->connect_timeout_handle);
 	dc->connect_timeout_handle = 0;
@@ -1156,9 +1161,9 @@ msn_dc_incoming_connection_timeout_cb(gp
 	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 @@ msn_dc_outgoing_connection_timeout_cb(gp
 {
 	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 @@ msn_dc_incoming_connection_cb(gpointer d
 {
 	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 @@ msn_dc_listen_socket_created_cb(int list
 {
 	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);
 


More information about the Commits mailing list