mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-26 02:45:25 +02:00
travis-ci cmake fix [3]
This commit is contained in:
parent
c5bf275bc8
commit
e302734ffa
1 changed files with 3 additions and 3 deletions
|
@ -79,10 +79,10 @@ namespace transport
|
|||
|
||||
void UPnP::Discover ()
|
||||
{
|
||||
#if (MINIUPNPC_API_VERSION >= 14)
|
||||
#if MINIUPNPC_API_VERSION >= 14
|
||||
int nerror = 0;
|
||||
m_Devlist = upnpDiscover (2000, m_MulticastIf, m_Minissdpdpath, 0, 0, 2, &nerror);
|
||||
#elif (MINIUPNPC_API_VERSION >= 8)
|
||||
#elif ( MINIUPNPC_API_VERSION >= 8 || defined(UPNPDISCOVER_SUCCESS) )
|
||||
int nerror = 0;
|
||||
m_Devlist = upnpDiscover (2000, m_MulticastIf, m_Minissdpdpath, 0, 0, &nerror);
|
||||
#else
|
||||
|
@ -158,7 +158,7 @@ namespace transport
|
|||
std::string strType (GetProto (address)), strPort (std::to_string (address->port));
|
||||
int r;
|
||||
std::string strDesc; i2p::config::GetOption("upnp.name", strDesc);
|
||||
#if (MINIUPNPC_API_VERSION >= 8)
|
||||
#ifdef UPNPDISCOVER_SUCCESS
|
||||
r = UPNP_AddPortMapping (m_upnpUrls.controlURL, m_upnpData.first.servicetype, strPort.c_str (), strPort.c_str (), m_NetworkAddr, strDesc.c_str (), strType.c_str (), 0, "0");
|
||||
#else
|
||||
r = UPNP_AddPortMapping (m_upnpUrls.controlURL, m_upnpData.first.servicetype, strPort.c_str (), strPort.c_str (), m_NetworkAddr, strDesc.c_str (), strType.c_str (), 0);
|
||||
|
|
Loading…
Add table
Reference in a new issue