pidgin: 8aa30731: Print out SOAP response data as it's rec...
qulogic at pidgin.im
qulogic at pidgin.im
Fri Aug 29 23:50:34 EDT 2008
-----------------------------------------------------------------
Revision: 8aa307315f59dbc296ed3c18f7e87375d5f9bb30
Ancestor: 7a017af11c71c9d4919e6a387ac090b9f4a2dd9f
Author: qulogic at pidgin.im
Date: 2008-08-30T03:41:18
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/8aa307315f59dbc296ed3c18f7e87375d5f9bb30
Modified files:
libpurple/protocols/msn/soap.c
ChangeLog:
Print out SOAP response data as it's received in chunks. Sure, that
means more work when debugging, but at least we aren't printing out the
same stuff over and over. Unfortunately, that 16K buffer because of OS X
still sucks for word wrap performance.
-------------- next part --------------
============================================================
--- libpurple/protocols/msn/soap.c 40dbab047960016ae96c77ffa8efc059eac0f40c
+++ libpurple/protocols/msn/soap.c 3ef84ca988e9d979d34a76b687b1ba1a92755f95
@@ -268,6 +268,7 @@ msn_soap_read_cb(gpointer data, gint fd,
(something weird with the login.live.com server). With NSS it works
fine, so I believe it's some bug with OS X */
char buf[16 * 1024];
+ gsize cursor;
if (conn->message == NULL) {
conn->message = msn_soap_message_new(NULL, NULL);
@@ -276,12 +277,20 @@ msn_soap_read_cb(gpointer data, gint fd,
if (conn->buf == NULL) {
conn->buf = g_string_new_len(buf, 0);
}
-
+
+ cursor = conn->buf->len;
while ((cnt = purple_ssl_read(conn->ssl, buf, sizeof(buf))) > 0) {
purple_debug_info("soap", "read %d bytes\n", cnt);
count += cnt;
g_string_append_len(conn->buf, buf, cnt);
}
+#ifndef MSN_UNSAFE_DEBUG
+ if (conn->current_request->secure)
+ purple_debug_misc("soap", "Received secure request.\n");
+ else
+#endif
+ 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
return an error, so we want to proceed anyway. See #5212 for
@@ -310,13 +319,6 @@ msn_soap_process(MsnSoapConnection *conn
char *cursor;
char *linebreak;
-#ifndef MSN_UNSAFE_DEBUG
- if (conn->current_request->secure)
- purple_debug_misc("soap", "Received secure request.\n");
- else
-#endif
- purple_debug_misc("soap", "current %s\n", conn->buf->str);
-
cursor = conn->buf->str + conn->handled_len;
if (!conn->headers_done) {
More information about the Commits
mailing list