Changeset 7729


Ignore:
Timestamp:
Jan 16, 2009, 11:17:30 PM (12 years ago)
Author:
charles
Message:

(1.5x libT) fix IPv6 reported & solved by erdgeist. add debugging message to help track down any future problems.

Location:
branches/1.5x/libtransmission
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/1.5x/libtransmission/net.c

    r7722 r7729  
    478478    if( addr->type == TR_AF_INET && IN_MULTICAST( htonl( addr->addr.addr4.s_addr ) ) )
    479479        return -EINVAL;
    480     if( addr->type == TR_AF_INET6 && ( addr->addr.addr6.s6_addr[0] & 0xff ) )
     480    if( addr->type == TR_AF_INET6 && ( addr->addr.addr6.s6_addr[0] == 0xff ) )
    481481        return -EINVAL;
    482482
    483     if( ( s = createSocket( ( addr->type == TR_AF_INET ? AF_INET : AF_INET6 ),
    484                             type ) ) < 0 )
     483    if( ( s = createSocket( ( addr->type == TR_AF_INET ? AF_INET : AF_INET6 ), type ) ) < 0 )
    485484        return s;
    486485
  • branches/1.5x/libtransmission/peer-io.c

    r7664 r7729  
    396396
    397397    socket = tr_netOpenTCP( session, addr, port );
     398    dbgmsg( NULL, "tr_netOpenTCP returned fd %d", socket );
    398399
    399400    return socket < 0
  • branches/1.5x/libtransmission/peer-io.h

    r7664 r7729  
    160160static TR_INLINE const char* tr_peerIoGetAddrStr( const tr_peerIo * io )
    161161{
    162     return tr_peerIoAddrStr( &io->addr, io->port );
     162    return tr_isPeerIo( io ) ? tr_peerIoAddrStr( &io->addr, io->port ) : "error";
    163163}
    164164
Note: See TracChangeset for help on using the changeset viewer.