1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-10 16:14:40 +02:00

TWK-216: reset the proper view mode toggle when changing to a different view mode automatically

This commit is contained in:
Leo Franchi
2011-08-14 17:44:43 -04:00
parent 7d2c284a3e
commit ae32b0b368
2 changed files with 17 additions and 4 deletions

View File

@@ -99,7 +99,7 @@ Portfwd::init(unsigned int timeout)
return false;
}
m_lanip = std::string(lanaddr);
freeUPNPDevlist(devlist);
get_status();
return true;
@@ -117,8 +117,8 @@ Portfwd::get_status()
// get external IP adress
char ip[16];
if( 0 != UPNP_GetExternalIPAddress( urls->controlURL,
data->CIF.servicetype,
if( 0 != UPNP_GetExternalIPAddress( urls->controlURL,
data->CIF.servicetype,
(char*)&ip ) )
{
m_externalip = ""; //failed
@@ -141,7 +141,7 @@ Portfwd::add( unsigned short port, unsigned short internal_port )
sprintf(port_str, "%d", port);
sprintf(port_str_internal, "%d", internal_port);
r = UPNP_AddPortMapping(urls->controlURL, data->CIF.servicetype,
r = UPNP_AddPortMapping(urls->controlURL, data->first.servicetype,
port_str, port_str_internal, m_lanip.c_str(), "tomahawk", "TCP", NULL);
if(r!=0)
{