|
|
@ -1,18 +1,9 @@ |
|
|
|
/*
|
|
|
|
|
|
|
|
* Copyright (c) 2013-2020, The PurpleI2P Project |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* This file is part of Purple i2pd project and licensed under BSD3 |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* See full license text in LICENSE file at top of project tree |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef USE_UPNP |
|
|
|
#ifdef USE_UPNP |
|
|
|
#include <string> |
|
|
|
#include <string> |
|
|
|
#include <thread> |
|
|
|
#include <thread> |
|
|
|
|
|
|
|
|
|
|
|
#include <boost/thread/thread.hpp> |
|
|
|
#include <boost/thread/thread.hpp> |
|
|
|
#include <boost/asio.hpp> |
|
|
|
#include <boost/asio.hpp> |
|
|
|
#include <boost/bind.hpp> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "Log.h" |
|
|
|
#include "Log.h" |
|
|
|
|
|
|
|
|
|
|
@ -118,7 +109,7 @@ namespace transport |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
err = UPNP_GetValidIGD (m_Devlist, &m_upnpUrls, &m_upnpData, m_NetworkAddr, sizeof (m_NetworkAddr)); |
|
|
|
err = UPNP_GetValidIGD (m_Devlist, &m_upnpUrls, &m_upnpData, m_NetworkAddr, sizeof (m_NetworkAddr)); |
|
|
|
m_upnpUrlsInitialized = err != 0; |
|
|
|
m_upnpUrlsInitialized=err!=0; |
|
|
|
if (err == UPNP_IGD_VALID_CONNECTED) |
|
|
|
if (err == UPNP_IGD_VALID_CONNECTED) |
|
|
|
{ |
|
|
|
{ |
|
|
|
err = UPNP_GetExternalIPAddress (m_upnpUrls.controlURL, m_upnpData.first.servicetype, m_externalIPAddress); |
|
|
|
err = UPNP_GetExternalIPAddress (m_upnpUrls.controlURL, m_upnpData.first.servicetype, m_externalIPAddress); |
|
|
|