Changeset 7009


Ignore:
Timestamp:
Nov 1, 2008, 4:39:57 PM (12 years ago)
Author:
charles
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/natpmp.c

    r6944 r7009  
    168168        if( val >= 0 )
    169169        {
    170             tr_ninf( getKey( ), _(
    171                          "no longer forwarding port %d" ), nat->port );
    172             nat->state = TR_NATPMP_IDLE;
    173             nat->port = -1;
    174             nat->isMapped = 0;
     170            const int port = resp.pnu.newportmapping.privateport;
     171            tr_ninf( getKey( ), _( "no longer forwarding port %d" ), port );
     172            if( nat->port == port )
     173            {
     174                nat->port = -1;
     175                nat->state = TR_NATPMP_IDLE;
     176                nat->isMapped = 0;
     177            }
    175178        }
    176179        else if( val != NATPMP_TRYAGAIN )
Note: See TracChangeset for help on using the changeset viewer.