Ignore:
Timestamp:
Dec 15, 2007, 6:10:24 AM (14 years ago)
Author:
charles
Message:

try to make the natpmp error messages yet more helpful. thanks to m1b and Lacrocivious

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/natpmp.c

    r4175 r4176  
    106106}
    107107
     108static void
     109setErrorState( struct tr_natpmp * nat )
     110{
     111    tr_err( KEY "If your router supports NAT-PMP, please make sure NAT-PMP is enabled!" );
     112    tr_err( KEY "NAT-PMP port forwarding unsuccessful, trying UPnP next" );
     113    nat->state = TR_NATPMP_ERR;
     114}
     115
    108116int
    109117tr_natpmpPulse( struct tr_natpmp * nat, int port, int isEnabled )
     
    131139            nat->state = TR_NATPMP_IDLE;
    132140        } else if( val != NATPMP_TRYAGAIN ) {
    133             tr_err( KEY "If your router supports NAT-PMP, please make sure NAT-PMP is enabled!" );
    134             nat->state = TR_NATPMP_ERR;
     141            setErrorState( nat );
    135142        }
    136143    }
     
    161168            nat->isMapped = 0;
    162169        } else if( val != NATPMP_TRYAGAIN ) {
    163             tr_err( KEY "If your router supports NAT-PMP, please make sure NAT-PMP is enabled!" );
    164             nat->state = TR_NATPMP_ERR;
     170            setErrorState( nat );
    165171        }
    166172    }
     
    195201            tr_inf( KEY "port %d mapped successfully", nat->port );
    196202        } else if( val != NATPMP_TRYAGAIN ) {
    197             nat->state = TR_NATPMP_ERR;
     203            setErrorState( nat );
    198204        }
    199205    }
Note: See TracChangeset for help on using the changeset viewer.