# HG changeset patch # User Paul Aurich # Date 1242951709 0 # Node ID a667ba19244975ed4b9544997a69a89da3a393c8 # Parent f82f3dc29f9b02284291ef06f60c8aa62cd9754d# Parent 401f580d56d4f3d11df9edcefbe63d7a1bd1cd2f merge of '2d746b537f7c15aca747b7df2e1eedb540eb0baf' and 'e09226ff43686401f45368b4047b907c205abfba' diff -r 401f580d56d4 -r a667ba192449 libpurple/protocols/jabber/bosh.c --- a/libpurple/protocols/jabber/bosh.c Fri May 22 00:13:38 2009 +0000 +++ b/libpurple/protocols/jabber/bosh.c Fri May 22 00:21:49 2009 +0000 @@ -301,7 +301,7 @@ return; } - packet = g_string_new(""); + packet = g_string_new(NULL); g_string_printf(packet, "buf) - conn->buf = g_string_new(""); + conn->buf = g_string_new(NULL); /* Read once to prime cnt before the loop */ if (conn->psc) @@ -705,7 +705,8 @@ if (cnt == 0 || (cnt < 0 && errno != EAGAIN)) { if (cnt < 0) - purple_debug_info("jabber", "bosh read=%d, errno=%d\n", cnt, errno); + purple_debug_info("jabber", "bosh read=%d, errno=%d, error=%s\n", + cnt, errno, g_strerror(errno)); else purple_debug_info("jabber", "bosh server closed the connection\n"); @@ -718,8 +719,8 @@ /* Process what we do have */ } - - jabber_bosh_http_connection_process(conn); + if (conn->buf->len > 0) + jabber_bosh_http_connection_process(conn); } static void