Changeset 2625d6d


Ignore:
Timestamp:
2008-02-20T20:55:38Z (12 years ago)
Author:
ulim <a.sporto+bee@…>
Branches:
master
Children:
6cac643
Parents:
506e61b
Message:

some fixes related to connection timeout

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/jabber/s5bytestream.c

    r506e61b r2625d6d  
    101101        jabber_streamhost_t *sh;
    102102
     103        if ( bt->connect_timeout )
     104        {
     105                b_event_remove( bt->connect_timeout );
     106                bt->connect_timeout = 0;
     107        }
     108
    103109        if ( tf->watch_in )
    104110                b_event_remove( tf->watch_in );
     
    348354        short revents;
    349355
    350         if ( !jabber_bs_poll( bt, fd, &revents ) )
     356        if ( ( fd != 0 ) && !jabber_bs_poll( bt, fd, &revents ) )
    351357                return FALSE;
    352358       
     
    724730        } else
    725731        {
    726                 /* using a proxy */
     732                /* using a proxy, abort listen */
     733
     734                closesocket( tf->fd );
     735                tf->fd = 0;
     736
     737                if ( bt->connect_timeout )
     738                {
     739                        b_event_remove( bt->connect_timeout );
     740                        bt->connect_timeout = 0;
     741                }
     742
    727743                GSList *shlist;
    728744                for( shlist = jd->streamhosts ; shlist ; shlist = g_slist_next( shlist ) )
     
    888904{
    889905        struct jabber_transfer *tf = bt->tf;
     906        struct jabber_data *jd = tf->ic->proto_data;
    890907
    891908        /* TODO: did the receiver get here somehow??? */
     
    894911                  error );
    895912
    896         imcb_file_canceled( tf->ft, error );
     913        if( jd->streamhosts==NULL ) /* we're done here unless we have a proxy to try */
     914                imcb_file_canceled( tf->ft, error );
    897915
    898916        return FALSE;
Note: See TracChangeset for help on using the changeset viewer.