Changeset 19ac9c5


Ignore:
Timestamp:
2006-05-13T19:44:59Z (18 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
0356ae3
Parents:
782d988
Message:

Timeouts are now persistent.

Location:
protocols
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • protocols/events_libevent.c

    r782d988 r19ac9c5  
    5050        guint id;
    5151        struct event evinfo;
     52        gint timeout;
    5253        b_event_handler function;
    5354        void *data;
     
    101102                event_debug( "Handler returned FALSE: " );
    102103                b_event_remove( id );
     104        }
     105        else if( fd == -1 )
     106        {
     107                struct timeval tv;
     108               
     109                tv.tv_sec = b_ev->timeout / 1000;
     110                tv.tv_usec = ( b_ev->timeout % 1000 ) * 1000;
     111               
     112                evtimer_add( &b_ev->evinfo, &tv );
    103113        }
    104114}
     
    159169       
    160170        b_ev->id = id_next++;
     171        b_ev->timeout = timeout;
    161172        b_ev->function = function;
    162173        b_ev->data = data;
  • protocols/proxy.c

    r782d988 r19ac9c5  
    126126
    127127        sock_make_nonblocking(fd);
    128 
     128       
     129        event_debug("proxy_connect_none( \"%s\", %d ) = %d\n", host, port, fd);
     130       
    129131        if (connect(fd, (struct sockaddr *)sin, sizeof(*sin)) < 0) {
    130132                if (sockerr_again()) {
  • protocols/ssl_openssl.c

    r782d988 r19ac9c5  
    115115        int st;
    116116       
    117         if( 0 && conn->inpa != -1 )
    118         {
    119                 b_event_remove( conn->inpa );
    120                 conn->inpa = -1;
    121         }
    122        
    123117        if( ( st = SSL_connect( conn->ssl ) ) < 0 )
    124118        {
Note: See TracChangeset for help on using the changeset viewer.