# HG changeset patch # User Elliott Sales de Andrade # Date 1220067678 0 # Node ID cb60838756e701bc11bae6936cc22647fe51df9c # Parent 4830c1ec13793dd60ee2fe8f93350d80c706d011 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. diff -r 4830c1ec1379 -r cb60838756e7 libpurple/protocols/msn/soap.c --- a/libpurple/protocols/msn/soap.c Sat Aug 30 00:28:34 2008 +0000 +++ b/libpurple/protocols/msn/soap.c Sat Aug 30 03:41:18 2008 +0000 @@ -268,6 +268,7 @@ (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 @@ 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 @@ 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) {