diff --git a/libtransmission/natpmp.c b/libtransmission/natpmp.c index a36a08782..008498d06 100644 --- a/libtransmission/natpmp.c +++ b/libtransmission/natpmp.c @@ -256,6 +256,11 @@ tr_natpmpPulse( tr_natpmp_t * pmp, int * publicPort ) mcastpulse( pmp ); } + if( NULL != publicPort ) + { + *publicPort = -1; + } + if( pmp->active || PMP_STATE_DELETING == pmp->state ) { switch( pmp->state ) @@ -419,11 +424,6 @@ tr_natpmpPulse( tr_natpmp_t * pmp, int * publicPort ) break; } } - - if( NULL != publicPort ) - { - *publicPort = -1; - } } void