Ignore:
Timestamp:
Dec 1, 2008, 8:21:06 PM (13 years ago)
Author:
charles
Message:

(libT) #252: revert r7195 (jhujhiti's IPv6 test patch). It seems to be the culprit in a `thrashing' issue reported by Waldorf and m1b in irc -- the behavior appeared between r7183 and r7187 -- so this commit is to trigger off a nightly build w/o the patch to test with in irc.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/fdlimit.c

    r7195 r7223  
    472472
    473473int
    474 tr_fdSocketAccept( int          b,
    475                    tr_address * addr,
    476                    tr_port_t  * port )
    477 {
    478     int                     s = -1;
    479     unsigned int            len;
    480     struct sockaddr_storage sock;
     474tr_fdSocketAccept( int              b,
     475                   struct in_addr * addr,
     476                   tr_port_t *      port )
     477{
     478    int                s = -1;
     479    unsigned int       len;
     480    struct sockaddr_in sock;
    481481
    482482    assert( addr );
     
    486486    if( gFd->socketCount < getSocketMax( gFd ) )
    487487    {
    488         len = sizeof( struct sockaddr );
     488        len = sizeof( sock );
    489489        s = accept( b, (struct sockaddr *) &sock, &len );
    490490    }
    491491    if( s > -1 )
    492492    {
    493         /* "The ss_family field of the sockaddr_storage structure will always
    494          * align with the family field of any protocol-specific structure." */
    495         if( sock.ss_family == AF_INET )
    496         {
    497             struct sockaddr_in * sock4 = (struct sockaddr_in *)&sock;
    498             addr->type = TR_AF_INET;
    499             addr->addr.addr4.s_addr = sock4->sin_addr.s_addr;
    500             *port = sock4->sin_port;
    501         }
    502         else
    503         {
    504             struct sockaddr_in6 * sock6 = (struct sockaddr_in6 *)&sock;
    505             addr->type = TR_AF_INET6;
    506             memcpy( &addr->addr, &sock6->sin6_addr,
    507                    sizeof( struct sockaddr_in6 ) );
    508             *port = sock6->sin6_port;
    509         }
     493        *addr = sock.sin_addr;
     494        *port = sock.sin_port;
    510495        ++gFd->socketCount;
    511496    }
Note: See TracChangeset for help on using the changeset viewer.