moved UPnP instance to Transports. Use actual port from RouterContext

This commit is contained in:
orignal 2015-05-06 12:19:20 -04:00
parent 7c13194d5a
commit 2442d0e910
5 changed files with 33 additions and 33 deletions

8
UPnP.h
View file

@ -19,7 +19,7 @@
namespace i2p
{
namespace UPnP
namespace transport
{
class UPnP
{
@ -33,8 +33,8 @@ namespace UPnP
void Stop ();
void Discover ();
void TryPortMapping (int type);
void CloseMapping (int type);
void TryPortMapping (int type, int port);
void CloseMapping (int type, int port);
private:
void Run ();
@ -49,14 +49,12 @@ namespace UPnP
char m_NetworkAddr[64];
char m_externalIPAddress[40];
bool m_IsModuleLoaded;
std::string m_Port = std::to_string (util::config::GetArg ("-port", 17070));
#ifndef _WIN32
void *m_Module;
#else
HINSTANCE *m_Module;
#endif
};
extern UPnP upnpc;
}
}