Changeset 7281


Ignore:
Timestamp:
Dec 5, 2008, 3:50:42 PM (14 years ago)
Author:
charles
Message:

(1.3x libT) backport #1402: constantly maps and unmaps the NAT-PMP port

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.3x/libtransmission/natpmp.c

    r6332 r7281  
    157157        logVal( "readnatpmpresponseorretry", val );
    158158        if( val >= 0 ) {
     159            const int port = resp.pnu.newportmapping.privateport;
    159160            tr_ninf( getKey(), _( "no longer forwarding port %d" ), nat->port );
    160             nat->state = TR_NATPMP_IDLE;
    161             nat->port = -1;
    162             nat->isMapped = 0;
     161            if( nat->port == port )
     162            {
     163                nat->state = TR_NATPMP_IDLE;
     164                nat->port = -1;
     165                nat->isMapped = 0;
     166            }
    163167        } else if( val != NATPMP_TRYAGAIN ) {
    164168            nat->state = TR_NATPMP_ERR;
Note: See TracChangeset for help on using the changeset viewer.