Changeset c6fc24a


Ignore:
Timestamp:
2012-09-17T21:42:27Z (12 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
9c77fbf
Parents:
a325ebd (diff), daf544a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/jabber/io.c

    ra325ebd rc6fc24a  
    453453{
    454454        struct im_connection *ic = data;
     455        struct jabber_data *jd = ic->proto_data;
    455456        int allow_reconnect = TRUE;
    456457        struct jabber_error *err;
     458        struct xt_node *host;
     459       
     460        if( !( ic->flags & OPT_LOGGED_IN ) &&
     461            ( host = xt_find_node( node->children, "see-other-host" ) ) &&
     462            host->text )
     463        {
     464                char *s;
     465                int port = set_getint( &ic->acc->set, "port" );
     466               
     467                /* Let's try to obey this request, if we're not logged
     468                   in yet (i.e. not have too much state yet). */
     469                if( jd->ssl )
     470                        ssl_disconnect( jd->ssl );
     471                closesocket( jd->fd );
     472                b_event_remove( jd->r_inpa );
     473                b_event_remove( jd->w_inpa );
     474               
     475                jd->ssl = NULL;
     476                jd->r_inpa = jd->w_inpa = 0;
     477                jd->flags &= JFLAG_XMLCONSOLE;
     478               
     479                s = strchr( host->text, ':' );
     480                if( s != NULL )
     481                        sscanf( s + 1, "%d", &port );
     482               
     483                imcb_log( ic, "Redirected to %s", host->text );
     484                jd->fd = proxy_connect( host->text, port, jabber_connected_plain, ic );
     485               
     486                return XT_ABORT;
     487        }
    457488       
    458489        err = jabber_error_parse( node, XMLNS_STREAM_ERROR );
Note: See TracChangeset for help on using the changeset viewer.