# HG changeset patch # User Daniel Atallah # Date 1139868200 0 # Node ID 0c50401679d3db66bce0277b3ae00d7c0f73ecc2 # Parent c7cf6912c98212f4074bec3d853b90fb9f5e0487 [gaim-migrate @ 15645] This is Greg Hudson's original fix to read the entire waiting ssl buffer so that we don't get stuck in a situation where the input function isn't triggered and there is still data that could be read. This is bug #1048535. committer: Tailor Script diff -r c7cf6912c982 -r 0c50401679d3 src/protocols/jabber/jabber.c --- a/src/protocols/jabber/jabber.c Mon Feb 13 21:34:34 2006 +0000 +++ b/src/protocols/jabber/jabber.c Mon Feb 13 22:03:20 2006 +0000 @@ -343,15 +343,16 @@ return; } - if((len = gaim_ssl_read(gsc, buf, sizeof(buf) - 1)) > 0) { + while((len = gaim_ssl_read(gsc, buf, sizeof(buf) - 1)) > 0) { buf[len] = '\0'; gaim_debug(GAIM_DEBUG_INFO, "jabber", "Recv (ssl)(%d): %s\n", len, buf); jabber_parser_process(js, buf, len); - } else if(errno == EAGAIN) + } + + if(errno == EAGAIN) return; - else { + else gaim_connection_error(gc, _("Read Error")); - } } static void