Ignore:
Timestamp:
Oct 27, 2009, 8:27:27 PM (12 years ago)
Author:
charles
Message:

(trunk libT) add a wrapper function, tr_netCloseSocket(), around EVUTIL_CLOSESOCKET() so that not all of our code has to #include evutil

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/net.c

    r9387 r9417  
    369369    if( evutil_make_socket_nonblocking( fd ) < 0 ) {
    370370        *errOut = sockerrno;
    371         EVUTIL_CLOSESOCKET( fd );
     371        tr_netCloseSocket( fd );
    372372        return -1;
    373373    }
     
    392392            tr_err( _( "Couldn't bind port %d on %s: %s" ),
    393393                    port, tr_ntop_non_ts( addr ), tr_strerror( err ) );
    394         EVUTIL_CLOSESOCKET( fd );
     394        tr_netCloseSocket( fd );
    395395        *errOut = err;
    396396        return -1;
     
    402402    if( listen( fd, 128 ) == -1 ) {
    403403        *errOut = sockerrno;
    404         EVUTIL_CLOSESOCKET( fd );
     404        tr_netCloseSocket( fd );
    405405        return -1;
    406406    }
     
    429429            result = TRUE;
    430430        if( fd >= 0 )
    431             EVUTIL_CLOSESOCKET( fd );
     431            tr_netCloseSocket( fd );
    432432        alreadyDone = TRUE;
    433433    }
     
    453453
    454454void
     455tr_netCloseSocket( int fd )
     456{
     457    EVUTIL_CLOSESOCKET( fd );
     458}
     459
     460void
    455461tr_netClose( tr_session * session, int s )
    456462{
Note: See TracChangeset for help on using the changeset viewer.