pidgin: 0c095828: jabber: Print account name on sent stanz...
darkrain42 at pidgin.im
darkrain42 at pidgin.im
Fri Nov 6 03:20:40 EST 2009
-----------------------------------------------------------------
Revision: 0c09582896a2b233709e1186c22da593dc6591ac
Ancestor: b767b82c6c4b62cc5055fa34d9d74f2d4ae8ac4b
Author: darkrain42 at pidgin.im
Date: 2009-11-06T08:14:53
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/0c09582896a2b233709e1186c22da593dc6591ac
Modified files:
libpurple/protocols/jabber/jabber.c
ChangeLog:
jabber: Print account name on sent stanzas in the debug log.
-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/jabber.c 5e3eea432a01ca36cfeaf85b2d1280c01b334546
+++ libpurple/protocols/jabber/jabber.c 4f12de1576fbd3b806d9c1b7ce3c2572a73dbb51
@@ -377,9 +377,9 @@ void jabber_send_raw(JabberStream *js, c
void jabber_send_raw(JabberStream *js, const char *data, int len)
{
-
/* because printing a tab to debug every minute gets old */
if(strcmp(data, "\t")) {
+ const char *username;
char *text = NULL, *last_part = NULL, *tag_start = NULL;
/* Because debug logs with plaintext passwords make me sad */
@@ -404,8 +404,13 @@ void jabber_send_raw(JabberStream *js, c
*data_start = '\0';
}
- purple_debug(PURPLE_DEBUG_MISC, "jabber", "Sending%s: %s%s%s\n",
- jabber_stream_is_ssl(js) ? " (ssl)" : "", text ? text : data,
+ username = purple_connection_get_display_name(js->gc);
+ if (!username)
+ username = purple_account_get_username(purple_connection_get_account(js->gc));
+
+ purple_debug_misc("jabber", "Sending%s (%s): %s%s%s\n",
+ jabber_stream_is_ssl(js) ? " (ssl)" : "", username,
+ text ? text : data,
last_part ? "password removed" : "",
last_part ? last_part : "");
More information about the Commits
mailing list