pidgin: 1cd362f7: make this toggleable via env instead of ...
khc at pidgin.im
khc at pidgin.im
Sun Jan 11 17:36:05 EST 2009
-----------------------------------------------------------------
Revision: 1cd362f7d2e8144f2924786bf7aa101adb3938fd
Ancestor: ce98e96edd94dfe8e6e95f4fc2067b6016512d69
Author: khc at pidgin.im
Date: 2009-01-11T22:31:01
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/1cd362f7d2e8144f2924786bf7aa101adb3938fd
Modified files:
libpurple/protocols/msn/soap.c
ChangeLog:
make this toggleable via env instead of #define
-------------- next part --------------
============================================================
--- libpurple/protocols/msn/soap.c 40430f70e32880ef814c3f116e692f4e638b7fb6
+++ libpurple/protocols/msn/soap.c 6c780dac5c26608bb814d2a783acd4e510203fd5
@@ -68,6 +68,7 @@ typedef struct _MsnSoapConnection {
GQueue *queue;
MsnSoapRequest *current_request;
+ gboolean unsafe_debug;
} MsnSoapConnection;
static gboolean msn_soap_connection_run(gpointer data);
@@ -79,6 +80,7 @@ msn_soap_connection_new(MsnSession *sess
conn->session = session;
conn->host = g_strdup(host);
conn->queue = g_queue_new();
+ conn->unsafe_debug = g_getenv("PURPLE_MSN_UNSAFE_DEBUG") != NULL;
return conn;
}
@@ -504,12 +506,10 @@ msn_soap_read_cb(gpointer data, gint fd,
if (cnt < 0 && perrno != EAGAIN)
purple_debug_info("soap", "read: %s\n", g_strerror(perrno));
-#ifndef MSN_UNSAFE_DEBUG
- if (conn->current_request && conn->current_request->secure)
+ if (conn->current_request && conn->current_request->secure &&
+ !conn->unsafe_debug)
purple_debug_misc("soap", "Received secure request.\n");
- else
-#endif
- if (count != 0)
+ else if (count != 0)
purple_debug_misc("soap", "current %s\n", conn->buf->str + cursor);
/* && count is necessary for Adium, on OS X the last read always
@@ -657,12 +657,10 @@ msn_soap_connection_run(gpointer data)
g_string_append(conn->buf, "\r\n");
g_string_append(conn->buf, body);
-#ifndef MSN_UNSAFE_DEBUG
- if (req->secure)
+ if (req->secure && !conn->unsafe_debug)
purple_debug_misc("soap", "Sending secure request.\n");
else
-#endif
- purple_debug_misc("soap", "%s\n", conn->buf->str);
+ purple_debug_misc("soap", "%s\n", conn->buf->str);
conn->handled_len = 0;
conn->current_request = req;
More information about the Commits
mailing list