/cpw/tomkiewicz/gg11: 8446175c6c08: Gadu-Gadu: make gg prpl less...

Tomasz Wasilczyk tomkiewicz at cpw.pidgin.im
Tue Mar 12 01:51:06 EDT 2013


Changeset: 8446175c6c088622969dc9b32a4e3d5af121dd9e
Author:	 Tomasz Wasilczyk <tomkiewicz at cpw.pidgin.im>
Date:	 2013-03-12 06:50 +0100
Branch:	 default
URL: https://hg.pidgin.im/cpw/tomkiewicz/gg11/rev/8446175c6c08

Description:

Gadu-Gadu: make gg prpl less verbose in non-verbose mode

diffstat:

 libpurple/protocols/gg/avatar.c |  20 +++++++++++++-------
 libpurple/protocols/gg/status.c |   2 +-
 2 files changed, 14 insertions(+), 8 deletions(-)

diffs (56 lines):

diff --git a/libpurple/protocols/gg/avatar.c b/libpurple/protocols/gg/avatar.c
--- a/libpurple/protocols/gg/avatar.c
+++ b/libpurple/protocols/gg/avatar.c
@@ -155,8 +155,10 @@ void ggp_avatar_buddy_update(PurpleConne
 	ggp_avatar_buddy_update_req *pending_update =
 		g_new(ggp_avatar_buddy_update_req, 1); //TODO: leak?
 
-	purple_debug_misc("gg", "ggp_avatar_buddy_update(%p, %u, %lu)\n", gc,
-		uin, timestamp);
+	if (purple_debug_is_verbose()) {
+		purple_debug_misc("gg", "ggp_avatar_buddy_update(%p, %u, %lu)\n", gc,
+			uin, timestamp);
+	}
 
 	pending_update->uin = uin;
 	pending_update->timestamp = timestamp;
@@ -167,7 +169,9 @@ void ggp_avatar_buddy_update(PurpleConne
 
 void ggp_avatar_buddy_remove(PurpleConnection *gc, uin_t uin)
 {
-	purple_debug_info("gg", "ggp_avatar_buddy_remove(%p, %u)\n", gc, uin);
+	if (purple_debug_is_verbose()) {
+		purple_debug_misc("gg", "ggp_avatar_buddy_remove(%p, %u)\n", gc, uin);
+	}
 
 	purple_buddy_icons_set_for_user(purple_connection_get_account(gc),
 		ggp_uin_to_str(uin), NULL, 0, NULL);
@@ -220,10 +224,12 @@ static gboolean ggp_avatar_buddy_update_
 		old_timestamp_str, NULL, 10) : 0;
 	if (old_timestamp == pending_update->timestamp)
 	{
-		purple_debug_misc("gg",
-			"ggp_avatar_buddy_update_next(%p): "
-			"%u have up to date avatar with ts=%lu\n", gc,
-			pending_update->uin, pending_update->timestamp);
+		if (purple_debug_is_verbose()) {
+			purple_debug_misc("gg",
+				"ggp_avatar_buddy_update_next(%p): "
+				"%u have up to date avatar with ts=%lu\n", gc,
+				pending_update->uin, pending_update->timestamp);
+		}
 		return FALSE;
 	}
 	if (old_timestamp > pending_update->timestamp)
diff --git a/libpurple/protocols/gg/status.c b/libpurple/protocols/gg/status.c
--- a/libpurple/protocols/gg/status.c
+++ b/libpurple/protocols/gg/status.c
@@ -439,7 +439,7 @@ void ggp_status_got_others_buddy(PurpleC
 			"own status changed to %s [%s]\n",
 			purple_status, status_message ? status_message : "");
 	}
-	else
+	else if (purple_debug_is_verbose())
 	{
 		purple_debug_misc("gg", "ggp_status_got_others_buddy: "
 			"status of %u changed to %s [%s]\n", uin,



More information about the Commits mailing list