aboutsummaryrefslogtreecommitdiffstats
path: root/protocols
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2010-04-11 20:12:25 +0200
committerWilmer van der Gaast <wilmer@gaast.net>2010-04-11 20:12:25 +0200
commit3ab1d317831a6c1830bb648a1a8d63a41c92f651 (patch)
tree39a37eb2fc60e707c4e75be88c605619a876c2c2 /protocols
parentba7d16f3c90de2744243efe6373ccebe51cfcb5a (diff)
Fixing a bug in s5bytestream code to deal with incomplete SOCKS5 messages
and my rewrite of the bs_peek function.
Diffstat (limited to 'protocols')
-rw-r--r--protocols/jabber/s5bytestream.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/protocols/jabber/s5bytestream.c b/protocols/jabber/s5bytestream.c
index 58a6c2e4..36a2e438 100644
--- a/protocols/jabber/s5bytestream.c
+++ b/protocols/jabber/s5bytestream.c
@@ -481,10 +481,11 @@ gboolean jabber_bs_recv_handshake( gpointer data, gint fd, b_input_condition con
return TRUE;
else if( ret < sizeof( struct socks5_message ) )
{
- /* Either a buggy proxy or just one that doesnt regard the SHOULD in XEP-0065
- * saying the reply SHOULD contain the address */
-
- ASSERTSOCKOP( ret = recv( fd, &socks5_reply, ret, 0 ), "Dequeuing after MSG_PEEK" );
+ /* Either a buggy proxy or just one that doesnt regard
+ * the SHOULD in XEP-0065 saying the reply SHOULD
+ * contain the address. We'll take it, so make sure the
+ * next jabber_bs_peek starts with an empty buffer. */
+ bt->peek_buf_len = 0;
}
if( !( socks5_reply.ver == 5 ) ||