diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2010-03-14 16:56:00 +0000 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2010-03-14 16:56:00 +0000 |
commit | af7f046b85694db45d670054e28960e4a0d79232 (patch) | |
tree | 71a8fe95b97e4e5eba3bf9f3d534b32945a3aa7c /protocols/jabber/io.c | |
parent | 435f55271b09102e21228a7add1b897025cdb078 (diff) |
Don't send a <?xml> stream start after starttls since it upsets certain
jabberd's including Zimbra's. Thanks to jMCg and balzar in #bitlbee for
helping with figuring this out.
Diffstat (limited to 'protocols/jabber/io.c')
-rw-r--r-- | protocols/jabber/io.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/protocols/jabber/io.c b/protocols/jabber/io.c index 10efad37..9534ff1a 100644 --- a/protocols/jabber/io.c +++ b/protocols/jabber/io.c @@ -440,6 +440,7 @@ static xt_status jabber_pkt_proceed_tls( struct xt_node *node, gpointer data ) imcb_log( ic, "Converting stream to TLS" ); + jd->flags |= JFLAG_STARTTLS_DONE; jd->ssl = ssl_starttls( jd->fd, jabber_connected_ssl, ic ); return XT_HANDLED; @@ -530,9 +531,10 @@ gboolean jabber_start_stream( struct im_connection *ic ) if( jd->r_inpa <= 0 ) jd->r_inpa = b_input_add( jd->fd, GAIM_INPUT_READ, jabber_read_callback, ic ); - greet = g_strdup_printf( "<?xml version='1.0' ?>" - "<stream:stream to=\"%s\" xmlns=\"jabber:client\" " - "xmlns:stream=\"http://etherx.jabber.org/streams\" version=\"1.0\">", jd->server ); + greet = g_strdup_printf( "%s<stream:stream to=\"%s\" xmlns=\"jabber:client\" " + "xmlns:stream=\"http://etherx.jabber.org/streams\" version=\"1.0\">", + ( jd->flags & JFLAG_STARTTLS_DONE ) ? "" : "<?xml version='1.0' ?>", + jd->server ); st = jabber_write( ic, greet, strlen( greet ) ); |