Ignore:
Timestamp:
Apr 12, 2008, 9:47:10 PM (14 years ago)
Author:
charles
Message:

#848: UPnP users always have to wait for NAT-PMP to fail first

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/natpmp.c

    r5592 r5600  
    7070        tr_ninf( getKey(), _( "%s succeeded (%d)" ), func, ret );
    7171    else
    72         tr_ninf( getKey(), _( "%s failed (%d): %s (%d)" ), func, ret, tr_strerror(errno), errno );
     72        tr_ndbg( getKey(), "%s failed (%d): %s (%d)", func, ret, tr_strerror(errno), errno );
    7373}
    7474
     
    103103{
    104104    nat->commandTime = time(NULL) + COMMAND_WAIT_SECS;
    105 }
    106 
    107 static void
    108 setErrorState( struct tr_natpmp * nat )
    109 {
    110     tr_ninf( getKey(), _( "If your router supports NAT-PMP, please make sure NAT-PMP is enabled!" ) );
    111     tr_ninf( getKey(), _( "NAT-PMP port forwarding unsuccessful, trying UPnP next" ) );
    112     nat->state = TR_NATPMP_ERR;
    113105}
    114106
     
    138130            nat->state = TR_NATPMP_IDLE;
    139131        } else if( val != NATPMP_TRYAGAIN ) {
    140             setErrorState( nat );
     132            nat->state = TR_NATPMP_ERR;
    141133        }
    142134    }
     
    167159            nat->isMapped = 0;
    168160        } else if( val != NATPMP_TRYAGAIN ) {
    169             setErrorState( nat );
     161            nat->state = TR_NATPMP_ERR;
    170162        }
    171163    }
     
    198190            nat->renewTime = time( NULL ) + LIFETIME_SECS;
    199191            nat->port = resp.newportmapping.privateport;
    200             tr_ninf( getKey(), _( "port %d forwarded successfully" ), nat->port );
     192            tr_ninf( getKey(), _( "Port %d forwarded successfully" ), nat->port );
    201193        } else if( val != NATPMP_TRYAGAIN ) {
    202             setErrorState( nat );
     194            nat->state = TR_NATPMP_ERR;
    203195        }
    204196    }
Note: See TracChangeset for help on using the changeset viewer.