# HG changeset patch # User Elliott Sales de Andrade # Date 1220067785 0 # Node ID 8691534526f1a45ba9d06f1841091e9d213b5fee # Parent c0c82c50897f62b32bb957d5347d8700e32b2a59# Parent cb60838756e701bc11bae6936cc22647fe51df9c merge of '0c4505a67ab2e90bf634a3d235022d369302e129' and '8aa307315f59dbc296ed3c18f7e87375d5f9bb30' diff -r c0c82c50897f -r 8691534526f1 libpurple/protocols/msn/soap.c --- a/libpurple/protocols/msn/soap.c Sat Aug 30 02:30:04 2008 +0000 +++ b/libpurple/protocols/msn/soap.c Sat Aug 30 03:43:05 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) {