1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-12 09:04:33 +02:00

* Properly detect the correct UPnP InternetGateway device.

This commit is contained in:
Christian Muehlhaeuser
2013-02-14 19:10:59 +01:00
parent b6361abdd7
commit 78e0475b9e

View File

@@ -25,6 +25,7 @@
#include <winsock2.h>
#endif
Portfwd::Portfwd()
: m_urls( 0 )
, m_data( 0 )
@@ -93,7 +94,7 @@ Portfwd::init( unsigned int timeout )
continue;
}
if ( strstr( dev->st, "InternetGatewayDevice" ) )
if ( strstr( dev->descURL, "InternetGatewayDevice" ) )
break;
dev = dev->pNext;
@@ -165,6 +166,7 @@ Portfwd::add( unsigned short port, unsigned short internal_port )
{
char port_str[16], port_str_internal[16];
int r;
printf( "Portfwd::add (%s, %d)\n", m_lanip.c_str(), port );
if ( m_urls->controlURL[0] == '\0' )
{
@@ -190,6 +192,7 @@ bool
Portfwd::remove( unsigned short port )
{
char port_str[16];
printf( "Portfwd::remove(%d)\n", port );
if ( m_urls->controlURL[0] == '\0' )
{