Remove zeroconf deadcode

This commit is contained in:
Gioacchino Mazzurco 2019-04-23 11:57:30 +02:00
parent bff3cd6845
commit 5dda6eb771
No known key found for this signature in database
GPG key ID: A1FBCA3872E87051
8 changed files with 15 additions and 2362 deletions

View file

@ -26,18 +26,16 @@
#include <zlib.h>
#ifdef NO_SQLCIPHER
#include <sqlite3.h>
# include <sqlite3.h>
#else
#include <sqlcipher/sqlite3.h>
# include <sqlcipher/sqlite3.h>
#endif
#ifndef RS_ENABLE_ZCNATASSIST
#ifdef RS_USE_LIBUPNP
#include "upnp/upnpconfig.h"
#else
#include "miniupnpc/miniupnpc.h"
#endif // RS_USE_LIBUPNP
#endif // RS_ENABLE_ZCNATASSIST
# include "upnp/upnpconfig.h"
#else // def RS_USE_LIBUPNP
# include "miniupnpc/miniupnpc.h"
#endif // def RS_USE_LIBUPNP
std::string RsServer::getSQLCipherVersion()
{
@ -88,12 +86,12 @@ void RsServer::getLibraries(std::list<RsLibraryInfo> &libraries)
#ifndef NO_SQLCIPHER
libraries.push_back(RsLibraryInfo("SQLCipher", getSQLCipherVersion()));
#endif
#ifndef RS_ENABLE_ZCNATASSIST
#ifdef RS_USE_LIBUPNP
libraries.push_back(RsLibraryInfo("UPnP (libupnp)", UPNP_VERSION_STRING));
#else
#else // def RS_USE_LIBUPNP
libraries.push_back(RsLibraryInfo("UPnP (MiniUPnP)", MINIUPNPC_VERSION));
#endif // RS_USE_LIBUPNP
#endif // RS_ENABLE_ZCNATASSIST
#endif // def RS_USE_LIBUPNP
libraries.push_back(RsLibraryInfo("Zlib", ZLIB_VERSION));
}

View file

@ -728,19 +728,11 @@ RsGRouter *rsGRouter = NULL ;
#include "util/rsdir.h"
#include "util/rsrandom.h"
#ifdef RS_ENABLE_ZEROCONF
#include "zeroconf/p3zeroconf.h"
#endif
#ifdef RS_ENABLE_ZCNATASSIST
#include "zeroconf/p3zcnatassist.h"
#else
#ifdef RS_USE_LIBUPNP
#include "upnp/upnphandler_linux.h"
#else
#include "upnp/upnphandler_miniupnp.h"
#endif
#endif
#ifdef RS_USE_LIBUPNP
# include "upnp/upnphandler_linux.h"
#else // def RS_USE_LIBUPNP
# include "upnp/upnphandler_miniupnp.h"
#endif // def RS_USE_LIBUPNP
#include "services/autoproxy/p3i2pbob.h"
#include "services/autoproxy/rsautoproxymonitor.h"
@ -1583,23 +1575,9 @@ int RsServer::StartupRetroShare()
mNetMgr->addNetListener(mProxyStack);
#endif
#ifdef RS_ENABLE_ZEROCONF
p3ZeroConf *mZeroConf = new p3ZeroConf(
AuthGPG::getAuthGPG()->getGPGOwnId(), ownId,
mLinkMgr, mNetMgr, mPeerMgr);
mNetMgr->addNetAssistConnect(2, mZeroConf);
mNetMgr->addNetListener(mZeroConf);
#endif
#ifdef RS_ENABLE_ZCNATASSIST
// Apple's UPnP & NAT-PMP assistance.
p3zcNatAssist *mZcNatAssist = new p3zcNatAssist();
mNetMgr->addNetAssistFirewall(1, mZcNatAssist);
#else
// Original UPnP Interface.
pqiNetAssistFirewall *mUpnpMgr = new upnphandler();
mNetMgr->addNetAssistFirewall(1, mUpnpMgr);
#endif
}
/**************************************************************************/