]> granicus.if.org Git - transmission/commitdiff
(trunk libT) #2892 "changing port number doesn't actually change until program restar...
authorCharles Kerr <charles@transmissionbt.com>
Thu, 11 Feb 2010 14:28:40 +0000 (14:28 +0000)
committerCharles Kerr <charles@transmissionbt.com>
Thu, 11 Feb 2010 14:28:40 +0000 (14:28 +0000)
libtransmission/port-forwarding.c

index a8ee9d3411aa8540a9bd7dee32ae4a4dad7bb62c..1fadc9a62129039006fecd621a3986a5dc06cf93 100644 (file)
@@ -175,10 +175,15 @@ stop_forwarding( tr_shared * s )
 {
     tr_ninf( getKey( ), "%s", _( "Stopped" ) );
     natPulse( s, FALSE );
+
     tr_natpmpClose( s->natpmp );
     s->natpmp = NULL;
+    s->natpmpStatus = TR_PORT_UNMAPPED;
+
     tr_upnpClose( s->upnp );
     s->upnp = NULL;
+    s->upnpStatus = TR_PORT_UNMAPPED;
+
     stop_timer( s );
 }
 
@@ -217,7 +222,7 @@ tr_sharedPortChanged( tr_session * session )
 
     if( s->isEnabled )
     {
-        stop_timer( s );
+        stop_forwarding( s );
         start_timer( s );
     }
 }