pidgin: 66b0effb: jabber: Convert to purple_debug_* conven...

darkrain42 at pidgin.im darkrain42 at pidgin.im
Fri Nov 6 05:00:56 EST 2009


-----------------------------------------------------------------
Revision: 66b0effb2ec6ae19730c68703c5b4d91fdba5d51
Ancestor: 0c09582896a2b233709e1186c22da593dc6591ac
Author: darkrain42 at pidgin.im
Date: 2009-11-06T08:39:49
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/66b0effb2ec6ae19730c68703c5b4d91fdba5d51

Modified files:
        libpurple/protocols/jabber/auth.c
        libpurple/protocols/jabber/buddy.c
        libpurple/protocols/jabber/google.c
        libpurple/protocols/jabber/jabber.c
        libpurple/protocols/jabber/message.c
        libpurple/protocols/jabber/oob.c
        libpurple/protocols/jabber/si.c
        libpurple/protocols/jabber/useravatar.c

ChangeLog: 

jabber: Convert to purple_debug_* convenience functions.

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/auth.c	2582339652b9b85d482ea6187b7a549f1fc1b2c4
+++ libpurple/protocols/jabber/auth.c	7138ade357627765efeae5298b678d286ab53c99
@@ -877,7 +877,7 @@ jabber_auth_handle_challenge(JabberStrea
 		}
 
 		dec_in = (char *)purple_base64_decode(enc_in, NULL);
-		purple_debug(PURPLE_DEBUG_MISC, "jabber", "decoded challenge (%"
+		purple_debug_misc("jabber", "decoded challenge (%"
 				G_GSIZE_FORMAT "): %s\n", strlen(dec_in), dec_in);
 
 		parts = parse_challenge(dec_in);
============================================================
--- libpurple/protocols/jabber/buddy.c	ffe60fdaf2eaf7ba230b59239c92080dc7ba9392
+++ libpurple/protocols/jabber/buddy.c	51ae69fb1a591ca8a38b7fb828970c4b86d13ec0
@@ -581,8 +581,7 @@ jabber_format_info(PurpleConnection *gc,
 		if (text != NULL && *text != '\0') {
 			xmlnode *xp;
 
-			purple_debug(PURPLE_DEBUG_INFO, "jabber",
-					"Setting %s to '%s'\n", vc_tp->tag, text);
+			purple_debug_info("jabber", "Setting %s to '%s'\n", vc_tp->tag, text);
 
 			if ((xp = insert_tag_to_parent_tag(vc_node,
 											   NULL, vc_tp->tag)) != NULL) {
============================================================
--- libpurple/protocols/jabber/google.c	c13e8e9e8c1544036464abaae7fec1a383731938
+++ libpurple/protocols/jabber/google.c	b9561388f6873e969ddb95ae032dab20e18ebb06
@@ -910,7 +910,7 @@ jabber_gmail_poke(JabberStream *js, cons
 	xmlnode_set_attrib(iq->node, "id", id);
 	jabber_iq_send(iq);
 
-	purple_debug(PURPLE_DEBUG_MISC, "jabber",
+	purple_debug_misc("jabber",
 		   "Got new mail notification. Sending request for more info\n");
 
 	iq = jabber_iq_new_query(js, JABBER_IQ_GET, "google:mail:notify");
@@ -1094,12 +1094,13 @@ void jabber_google_roster_add_deny(Purpl
 			jbr = l->data;
 			if (jbr && jbr->name)
 			{
-				purple_debug(PURPLE_DEBUG_MISC, "jabber", "Removing resource %s\n", jbr->name);
+				purple_debug_misc("jabber", "Removing resource %s\n", jbr->name);
 				jabber_buddy_remove_resource(jb, jbr->name);
 			}
 			l = l->next;
 		}
 	}
+
 	purple_prpl_got_user_status(purple_connection_get_account(gc), who, "offline", NULL);
 }
 
============================================================
--- libpurple/protocols/jabber/jabber.c	4f12de1576fbd3b806d9c1b7ce3c2572a73dbb51
+++ libpurple/protocols/jabber/jabber.c	df7f5b3680774b0f3c0af64522eae6ff51363417
@@ -294,8 +294,7 @@ void jabber_process_packet(JabberStream 
 		else
 			purple_debug_warning("jabber", "Ignoring spurious <proceed/>\n");
 	} else {
-		purple_debug(PURPLE_DEBUG_WARNING, "jabber", "Unknown packet: %s\n",
-				(*packet)->name);
+		purple_debug_warning("jabber", "Unknown packet: %s\n", (*packet)->name);
 	}
 }
 
@@ -531,7 +530,7 @@ jabber_recv_cb_ssl(gpointer data, Purple
 	while((len = purple_ssl_read(gsc, buf, sizeof(buf) - 1)) > 0) {
 		gc->last_received = time(NULL);
 		buf[len] = '\0';
-		purple_debug(PURPLE_DEBUG_INFO, "jabber", "Recv (ssl)(%d): %s\n", len, buf);
+		purple_debug_info("jabber", "Recv (ssl)(%d): %s\n", len, buf);
 		jabber_parser_process(js, buf, len);
 		if(js->reinit)
 			jabber_stream_init(js);
@@ -571,7 +570,7 @@ jabber_recv_cb(gpointer data, gint sourc
 			unsigned int olen;
 			sasl_decode(js->sasl, buf, len, &out, &olen);
 			if (olen>0) {
-				purple_debug(PURPLE_DEBUG_INFO, "jabber", "RecvSASL (%u): %s\n", olen, out);
+				purple_debug_info("jabber", "RecvSASL (%u): %s\n", olen, out);
 				jabber_parser_process(js,out,olen);
 				if(js->reinit)
 					jabber_stream_init(js);
@@ -580,7 +579,7 @@ jabber_recv_cb(gpointer data, gint sourc
 		}
 #endif
 		buf[len] = '\0';
-		purple_debug(PURPLE_DEBUG_INFO, "jabber", "Recv (%d): %s\n", len, buf);
+		purple_debug_info("jabber", "Recv (%d): %s\n", len, buf);
 		jabber_parser_process(js, buf, len);
 		if(js->reinit)
 			jabber_stream_init(js);
============================================================
--- libpurple/protocols/jabber/message.c	7dcf7918d32cd1c64bf9f0c184a4f8dec8e78885
+++ libpurple/protocols/jabber/message.c	762e96afab799c10137fc842befb6fefce65cd96
@@ -812,7 +812,7 @@ void jabber_message_parse(JabberStream *
 
 	switch(jm->type) {
 		case JABBER_MESSAGE_OTHER:
-			purple_debug(PURPLE_DEBUG_INFO, "jabber",
+			purple_debug_info("jabber",
 					"Received message of unknown type: %s\n", type);
 			/* Fall-through is intentional */
 		case JABBER_MESSAGE_NORMAL:
@@ -1103,7 +1103,7 @@ void jabber_message_send(JabberMessage *
 		if ((child = xmlnode_from_str(jm->xhtml, -1))) {
 			xmlnode_insert_child(message, child);
 		} else {
-			purple_debug(PURPLE_DEBUG_ERROR, "jabber",
+			purple_debug_error("jabber",
 					"XHTML translation/validation failed, returning: %s\n",
 					jm->xhtml);
 		}
============================================================
--- libpurple/protocols/jabber/oob.c	2dd195dcff4e7e0cc183e090ef92ab53f20604e0
+++ libpurple/protocols/jabber/oob.c	7789039f4c6c2f45c55c0c9d623e6478bf072753
@@ -95,7 +95,7 @@ static void jabber_oob_xfer_request_send
 	if(len < 0 && errno == EAGAIN)
 		return;
 	else if(len < 0) {
-		purple_debug(PURPLE_DEBUG_ERROR, "jabber", "Write error on oob xfer!\n");
+		purple_debug_error("jabber", "Write error on oob xfer!\n");
 		purple_input_remove(jox->writeh);
 		purple_xfer_cancel_local(xfer);
 	}
@@ -150,7 +150,7 @@ static gssize jabber_oob_xfer_read(gucha
 		}
 		return 0;
 	} else if (errno != EAGAIN) {
-		purple_debug(PURPLE_DEBUG_ERROR, "jabber", "Read error on oob xfer!\n");
+		purple_debug_error("jabber", "Read error on oob xfer!\n");
 		purple_xfer_cancel_local(xfer);
 	}
 
============================================================
--- libpurple/protocols/jabber/si.c	90609b8a58493beeea0b2b02ec3648f8d0a9a075
+++ libpurple/protocols/jabber/si.c	bb7944ad0868418c44c4f287228ca213db77c112
@@ -1349,7 +1349,7 @@ static void jabber_si_xfer_cancel_send(P
 		jabber_ibb_session_close(jsx->ibb_session);
 	}
 	jabber_si_xfer_free(xfer);
-	purple_debug(PURPLE_DEBUG_INFO, "jabber", "in jabber_si_xfer_cancel_send\n");
+	purple_debug_info("jabber", "in jabber_si_xfer_cancel_send\n");
 }
 
 
@@ -1381,7 +1381,7 @@ static void jabber_si_xfer_request_denie
 	}
 
 	jabber_si_xfer_free(xfer);
-	purple_debug(PURPLE_DEBUG_INFO, "jabber", "in jabber_si_xfer_request_denied\n");
+	purple_debug_info("jabber", "in jabber_si_xfer_request_denied\n");
 }
 
 
@@ -1393,7 +1393,7 @@ static void jabber_si_xfer_cancel_recv(P
 		jabber_ibb_session_close(jsx->ibb_session);
 	}
 	jabber_si_xfer_free(xfer);
-	purple_debug(PURPLE_DEBUG_INFO, "jabber", "in jabber_si_xfer_cancel_recv\n");
+	purple_debug_info("jabber", "in jabber_si_xfer_cancel_recv\n");
 }
 
 
============================================================
--- libpurple/protocols/jabber/useravatar.c	249a195cb669b7137133848d17a4050013855d56
+++ libpurple/protocols/jabber/useravatar.c	a6fbf9ca37be81d191d3ae8f54d7f4a4c62c689e
@@ -262,7 +262,7 @@ do_buddy_avatar_update_fromurl(PurpleUti
 	gpointer icon_data;
 
 	if(!url_text) {
-		purple_debug(PURPLE_DEBUG_ERROR, "jabber",
+		purple_debug_error("jabber",
 		             "do_buddy_avatar_update_fromurl got error \"%s\"",
 		             error_message);
 		goto out;


More information about the Commits mailing list