aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/jabber/io.c
diff options
context:
space:
mode:
authorSven Moritz Hallberg <pesco@khjk.org>2008-07-17 01:22:52 +0200
committerSven Moritz Hallberg <pesco@khjk.org>2008-07-17 01:22:52 +0200
commit6738a676c7a3895988de4bd9eacfe8fa0ef73cc3 (patch)
treed95d913484cf79ff4a3c6d920a4d9b92ecd66de9 /protocols/jabber/io.c
parent9730d7250bb9e938ca00b72efdd8e8b3c03b2753 (diff)
parent6a78c0eed44820a2fefe1e96516e335eddc9c70b (diff)
merge in latest trunk
Diffstat (limited to 'protocols/jabber/io.c')
-rw-r--r--protocols/jabber/io.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/protocols/jabber/io.c b/protocols/jabber/io.c
index 86c216ef..10efad37 100644
--- a/protocols/jabber/io.c
+++ b/protocols/jabber/io.c
@@ -240,8 +240,13 @@ static gboolean jabber_read_callback( gpointer data, gint fd, b_input_condition
return FALSE;
}
- /* EAGAIN/etc or a successful read. */
- return TRUE;
+ if( ssl_pending( jd->ssl ) )
+ /* OpenSSL empties the TCP buffers completely but may keep some
+ data in its internap buffers. select() won't see that, but
+ ssl_pending() does. */
+ return jabber_read_callback( data, fd, cond );
+ else
+ return TRUE;
}
gboolean jabber_connected_plain( gpointer data, gint source, b_input_condition cond )
@@ -520,8 +525,7 @@ gboolean jabber_start_stream( struct im_connection *ic )
/* We'll start our stream now, so prepare everything to receive one
from the server too. */
xt_free( jd->xt ); /* In case we're RE-starting. */
- jd->xt = xt_new( ic );
- jd->xt->handlers = (struct xt_handler_entry*) jabber_handlers;
+ jd->xt = xt_new( jabber_handlers, ic );
if( jd->r_inpa <= 0 )
jd->r_inpa = b_input_add( jd->fd, GAIM_INPUT_READ, jabber_read_callback, ic );