Ignore:
Timestamp:
May 30, 2008, 3:43:10 PM (14 years ago)
Author:
charles
Message:

refactor out some dead code in net.c, and probably give jhujhiti fits

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/net.c

    r5957 r5977  
    119119}
    120120
    121 static int
    122 tr_netOpen( const struct in_addr * addr, tr_port_t port,
    123             int type, int priority )
     121int
     122tr_netOpenTCP( const struct in_addr * addr, tr_port_t port, int priority )
    124123{
    125124    int s;
    126125    struct sockaddr_in sock;
     126    const int type = SOCK_STREAM;
    127127
    128128    if( ( s = createSocket( type, priority ) ) < 0 )
     
    152152    return s;
    153153}
    154  
    155 int
    156 tr_netOpenTCP( const struct in_addr * addr, tr_port_t port, int priority )
    157 {
    158     return tr_netOpen( addr, port, SOCK_STREAM, priority );
    159 }
    160 
    161 static int
    162 tr_netBind( int port, int type )
     154
     155int
     156tr_netBindTCP( int port )
    163157{
    164158    int s;
    165159    struct sockaddr_in sock;
     160    const int type = SOCK_STREAM;
    166161#if defined( SO_REUSEADDR ) || defined( SO_REUSEPORT )
    167162    int optval;
     
    194189
    195190int
    196 tr_netBindTCP( int port )
    197 {
    198     return tr_netBind( port, SOCK_STREAM );
    199 }
    200 
    201 int
    202191tr_netAccept( int b, struct in_addr * addr, tr_port_t * port )
    203192{
Note: See TracChangeset for help on using the changeset viewer.