Ignore:
Timestamp:
2010-03-14T16:56:00Z (15 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
8fb1263
Parents:
435f552
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/jabber/io.c

    r435f552 raf7f046  
    441441        imcb_log( ic, "Converting stream to TLS" );
    442442       
     443        jd->flags |= JFLAG_STARTTLS_DONE;
    443444        jd->ssl = ssl_starttls( jd->fd, jabber_connected_ssl, ic );
    444445       
     
    531532                jd->r_inpa = b_input_add( jd->fd, GAIM_INPUT_READ, jabber_read_callback, ic );
    532533       
    533         greet = g_strdup_printf( "<?xml version='1.0' ?>"
    534                                  "<stream:stream to=\"%s\" xmlns=\"jabber:client\" "
    535                                   "xmlns:stream=\"http://etherx.jabber.org/streams\" version=\"1.0\">", jd->server );
     534        greet = g_strdup_printf( "%s<stream:stream to=\"%s\" xmlns=\"jabber:client\" "
     535                                  "xmlns:stream=\"http://etherx.jabber.org/streams\" version=\"1.0\">",
     536                                  ( jd->flags & JFLAG_STARTTLS_DONE ) ? "" : "<?xml version='1.0' ?>",
     537                                  jd->server );
    536538       
    537539        st = jabber_write( ic, greet, strlen( greet ) );
Note: See TracChangeset for help on using the changeset viewer.