Changeset 7439


Ignore:
Timestamp:
Dec 20, 2008, 8:51:32 AM (12 years ago)
Author:
jhujhiti
Message:

(trunk libT) Don't log two "errors" we expect to see from time-to-time.

EAFNOSUPPORT: On OS X, socket() incorrectly throws EAFNOSUPPORT for certain
IP/Port combinations. There is nothing we can do about this.

ENETUNREACH: #1606 is evidence that some trackers return IPv6 peers when
contacted over IPv4. This code will silently ignore "network unreachable"
errors for IPv6 connections.

Location:
trunk/libtransmission
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/fdlimit.c

    r7397 r7439  
    460460        if( ( s = socket( domain, type, 0 ) ) < 0 )
    461461        {
     462#ifdef SYS_DARWIN
     463            if( sockerrno != EAFNOSUPPORT )
     464#endif
    462465            tr_err( _( "Couldn't create socket: %s" ),
    463466                   tr_strerror( sockerrno ) );
  • trunk/libtransmission/net.c

    r7436 r7439  
    403403    {
    404404        int tmperrno;
    405         tr_err( _( "Couldn't connect socket %d to %s, port %d (errno %d - %s)" ),
    406                s, tr_ntop_non_ts( addr ), (int)port, sockerrno, tr_strerror( sockerrno ) );
    407405        tmperrno = sockerrno;
     406        if( tmperrno != ENETUNREACH || addr->type == TR_AF_INET )
     407            tr_err( _( "Couldn't connect socket %d to %s, port %d (errno %d - %s)" ),
     408                    s, tr_ntop_non_ts( addr ), (int)port, tmperrno,
     409                    tr_strerror( tmperrno ) );
    408410        tr_netClose( s );
    409411        s = -tmperrno;
Note: See TracChangeset for help on using the changeset viewer.