fixed upnp so that it doesn't overwrite valid ports with 0

This commit is contained in:
Arvid Norberg 2007-04-02 19:17:08 +00:00
parent 10b5f538b1
commit 2fc73e9aeb
1 changed files with 2 additions and 2 deletions

View File

@ -190,8 +190,8 @@ void upnp::discover_device()
void upnp::set_mappings(int tcp, int udp)
{
if (m_disabled) return;
m_udp_local_port = udp;
m_tcp_local_port = tcp;
if (udp != 0) m_udp_local_port = udp;
if (tcp != 0) m_tcp_local_port = tcp;
boost::mutex::scoped_lock l(m_mutex);
for (std::set<rootdevice>::iterator i = m_devices.begin()