]> granicus.if.org Git - transmission/commitdiff
(trunk libT) don't try to port forward through your cablebox just because it's hooked...
authorCharles Kerr <charles@transmissionbt.com>
Sun, 27 Jun 2010 15:29:23 +0000 (15:29 +0000)
committerCharles Kerr <charles@transmissionbt.com>
Sun, 27 Jun 2010 15:29:23 +0000 (15:29 +0000)
libtransmission/upnp.c

index d6ff611819f75dd11c2be959e812f7bcb8b1fa6f..00e8e7745eb13d8c6d927698030482c5f438c0c5 100644 (file)
@@ -77,6 +77,14 @@ tr_upnpClose( tr_upnp * handle )
 ***
 **/
 
+enum
+{
+  UPNP_IGD_NONE = 0,
+  UPNP_IGD_VALID_CONNECTED = 1,
+  UPNP_IGD_VALID_NOT_CONNECTED = 2,
+  UPNP_IGD_INVALID = 3
+};
+
 int
 tr_upnpPulse( tr_upnp * handle,
               int       port,
@@ -98,7 +106,7 @@ tr_upnpPulse( tr_upnp * handle,
         }
         errno = 0;
         if( UPNP_GetValidIGD( devlist, &handle->urls, &handle->data,
-                             handle->lanaddr, sizeof( handle->lanaddr ) ) )
+                             handle->lanaddr, sizeof( handle->lanaddr ) ) == UPNP_IGD_VALID_CONNECTED )
         {
             tr_ninf( getKey( ), _(
                          "Found Internet Gateway Device \"%s\"" ),