Ignore:
Timestamp:
Jan 21, 2008, 2:11:57 AM (14 years ago)
Author:
charles
Message:

finish the trunk/1.0x libT merge: router death & portability

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/fdlimit.c

    r4734 r4777  
    168168    }
    169169
    170     return 0;
     170    return TR_OK;
    171171}
    172172
     
    374374}
    375375
     376static int
     377getSocketMax( struct tr_fd_s * gFd )
     378{
     379#if 0
     380    return gFd->normalMax;
     381#else
     382    return MIN( gFd->normalMax, 200 );
     383#endif
     384}
     385
    376386int
    377387tr_fdSocketCreate( int type, int isReserved )
     
    380390    tr_lockLock( gFd->lock );
    381391
    382     if( isReserved || ( gFd->normal < gFd->normalMax ) )
     392    if( isReserved || ( gFd->normal < getSocketMax( gFd ) ) )
    383393        if( ( s = socket( AF_INET, type, 0 ) ) < 0 )
    384394            tr_err( "Couldn't create socket (%s)", strerror( sockerrno ) );
     
    412422
    413423    tr_lockLock( gFd->lock );
    414     if( gFd->normal < gFd->normalMax )
     424    if( gFd->normal < getSocketMax( gFd ) )
    415425    {
    416426        len = sizeof( sock );
Note: See TracChangeset for help on using the changeset viewer.