(libT) #1402: T constantly maps and unmaps the NAT-PMP port

This commit is contained in:
Charles Kerr 2008-11-01 16:39:57 +00:00
parent c2519b3e97
commit d207fff71f
1 changed files with 8 additions and 5 deletions

View File

@ -167,11 +167,14 @@ tr_natpmpPulse( struct tr_natpmp * nat,
logVal( "readnatpmpresponseorretry", val );
if( val >= 0 )
{
tr_ninf( getKey( ), _(
"no longer forwarding port %d" ), nat->port );
nat->state = TR_NATPMP_IDLE;
nat->port = -1;
nat->isMapped = 0;
const int port = resp.pnu.newportmapping.privateport;
tr_ninf( getKey( ), _( "no longer forwarding port %d" ), port );
if( nat->port == port )
{
nat->port = -1;
nat->state = TR_NATPMP_IDLE;
nat->isMapped = 0;
}
}
else if( val != NATPMP_TRYAGAIN )
{