Browse Source

moved ETH_MINIUPNPC to props on windows; fixed style

cl-refactor
arkpar 10 years ago
parent
commit
9d29f7d4be
  1. 4
      libp2p/Host.cpp
  2. 4
      libp2p/_libp2p.cpp
  3. 2
      windows/LibEthereum.props

4
libp2p/Host.cpp

@ -210,12 +210,10 @@ void Host::determinePublic(string const& _publicAddress, bool _upnp)
if (m_upnp && m_upnp->isValid() && m_peerAddresses.size())
{
clog(NetNote) << "External addr:" << m_upnp->externalIP();
int p = 0;
int p;
for (auto const& addr : m_peerAddresses)
{
if (p = m_upnp->addRedirect(addr.to_string().c_str(), m_listenPort))
break;
}
if (p)
clog(NetNote) << "Punched through NAT and mapped local port" << m_listenPort << "onto external port" << p << ".";
else

4
libp2p/_libp2p.cpp

@ -1,11 +1,9 @@
#ifdef _MSC_VER
#define ETH_MINIUPNPC 1
#include "All.h"
#include "Capability.cpp"
#include "Common.cpp"
#include "Host.cpp"
#include "HostCapability.cpp"
#undef clogS
#include "Session.cpp"
#include "UPnP.cpp"
#endif
#endif

2
windows/LibEthereum.props

@ -15,7 +15,7 @@
<TreatWarningAsError>true</TreatWarningAsError>
<MinimalRebuild>false</MinimalRebuild>
<AdditionalIncludeDirectories>include/$(ProjectName);$(IntDir);../../cryptopp;..;../libethcore;../libethereum;../libethsupport;$(BoostDir);../../leveldb/include;../secp256k1;../../miniupnp</AdditionalIncludeDirectories>
<PreprocessorDefinitions>ETH_BUILD_PLATFORM=Windows/VS2013;ETH_BUILD_TYPE=$(Configuration)-$(Platform);STATICLIB;LEVELDB_PLATFORM_WINDOWS;USE_NUM_BOOST;USE_FIELD_10X26;USE_FIELD_INV_BUILTIN;_WIN32_WINNT=0x0501;WIN32;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>ETH_BUILD_PLATFORM=Windows/VS2013;ETH_BUILD_TYPE=$(Configuration)-$(Platform);ETH_MINIUPNPC=1;STATICLIB;LEVELDB_PLATFORM_WINDOWS;USE_NUM_BOOST;USE_FIELD_10X26;USE_FIELD_INV_BUILTIN;_WIN32_WINNT=0x0501;WIN32;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<WarningLevel>Level3</WarningLevel>

Loading…
Cancel
Save