mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-13 00:25:48 -04:00
fixed retrotor compilation when removing dht and udp
This commit is contained in:
parent
c00a236004
commit
da5253059a
8 changed files with 47 additions and 15 deletions
|
@ -1,7 +1,7 @@
|
|||
!include("../../retroshare.pri"): error("Could not include file ../../retroshare.pri")
|
||||
|
||||
TEMPLATE = lib
|
||||
CONFIG += staticlib bitdht
|
||||
CONFIG += staticlib
|
||||
CONFIG += create_prl
|
||||
CONFIG -= qt
|
||||
TARGET = retroshare
|
||||
|
@ -12,8 +12,12 @@ DESTDIR = lib
|
|||
|
||||
retrotor {
|
||||
DEFINES *= RETROTOR
|
||||
CONFIG -= bitdht
|
||||
} else {
|
||||
CONFIG += bitdht
|
||||
}
|
||||
# the dht stunner is used to obtain RS' external ip addr. when it is natted
|
||||
|
||||
# the dht stunner is used to obtain RS external ip addr. when it is natted
|
||||
# this system is unreliable and rs supports a newer and better one (asking connected peers)
|
||||
# CONFIG += useDhtStunner
|
||||
|
||||
|
@ -93,6 +97,7 @@ HEADERS += tcponudp/udppeer.h \
|
|||
tcponudp/tcpstream.h \
|
||||
tcponudp/tou.h \
|
||||
tcponudp/udprelay.h \
|
||||
pqi/pqissludp.h \
|
||||
|
||||
SOURCES += tcponudp/udppeer.cc \
|
||||
tcponudp/tcppacket.cc \
|
||||
|
@ -100,6 +105,7 @@ SOURCES += tcponudp/udppeer.cc \
|
|||
tcponudp/tou.cc \
|
||||
tcponudp/bss_tou.c \
|
||||
tcponudp/udprelay.cc \
|
||||
pqi/pqissludp.cc \
|
||||
|
||||
useDhtStunner {
|
||||
HEADERS += dht/stunaddrassist.h \
|
||||
|
@ -437,7 +443,6 @@ HEADERS += pqi/authssl.h \
|
|||
pqi/pqissllistener.h \
|
||||
pqi/pqisslpersongrp.h \
|
||||
pqi/pqissli2pbob.h \
|
||||
pqi/pqissludp.h \
|
||||
pqi/pqisslproxy.h \
|
||||
pqi/pqistore.h \
|
||||
pqi/pqistreamer.h \
|
||||
|
@ -593,7 +598,6 @@ SOURCES += pqi/authgpg.cc \
|
|||
pqi/pqissllistener.cc \
|
||||
pqi/pqisslpersongrp.cc \
|
||||
pqi/pqissli2pbob.cpp \
|
||||
pqi/pqissludp.cc \
|
||||
pqi/pqisslproxy.cc \
|
||||
pqi/pqistore.cc \
|
||||
pqi/pqistreamer.cc \
|
||||
|
|
|
@ -4,7 +4,9 @@
|
|||
#include "pqi/pqinetstatebox.h"
|
||||
#include "time.h"
|
||||
|
||||
#ifdef RS_USE_BITDHT
|
||||
#include "bitdht/bdiface.h"
|
||||
#endif
|
||||
|
||||
// External Interface.
|
||||
|
||||
|
|
|
@ -36,6 +36,9 @@ static struct RsLog::logInfo pqipersongrpzoneInfo = {RsLog::Default, "pqipersong
|
|||
/****
|
||||
* #define PQI_DISABLE_UDP 1
|
||||
***/
|
||||
#ifdef RETROTOR
|
||||
#define PQI_DISABLE_UDP 1
|
||||
#endif
|
||||
|
||||
/********************************** SSL Specific features ***************************/
|
||||
|
||||
|
|
|
@ -65,6 +65,11 @@
|
|||
#include <sys/param.h>
|
||||
#endif
|
||||
|
||||
// This needs to be defined here, because when USE_BITDHT is unset, the variable, that is defined in libbitdht (not compiled!) will be missing.
|
||||
#ifndef RS_USE_BITDHT
|
||||
RsDht *rsDht = NULL ;
|
||||
#endif
|
||||
|
||||
// for blocking signals
|
||||
#include <signal.h>
|
||||
|
||||
|
@ -825,9 +830,10 @@ RsGRouter *rsGRouter = NULL ;
|
|||
#include "pqi/p3linkmgr.h"
|
||||
#include "pqi/p3netmgr.h"
|
||||
|
||||
|
||||
#ifndef RETROTOR
|
||||
#include "tcponudp/tou.h"
|
||||
#include "tcponudp/rsudpstack.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef RS_USE_BITDHT
|
||||
|
@ -1155,9 +1161,9 @@ int RsServer::StartupRetroShare()
|
|||
#ifdef RS_USE_DHT_STUNNER
|
||||
mNetMgr->setAddrAssist(new stunAddrAssist(mDhtStunner), new stunAddrAssist(mProxyStunner));
|
||||
#endif // RS_USE_DHT_STUNNER
|
||||
#else //RS_USE_BITDHT
|
||||
/* install NULL Pointer for rsDht Interface */
|
||||
rsDht = NULL;
|
||||
// #else //RS_USE_BITDHT
|
||||
// /* install NULL Pointer for rsDht Interface */
|
||||
// rsDht = NULL;
|
||||
#endif //RS_USE_BITDHT
|
||||
|
||||
|
||||
|
@ -1474,7 +1480,11 @@ int RsServer::StartupRetroShare()
|
|||
interfaces.mMsgs = rsMsgs;
|
||||
interfaces.mTurtle = rsTurtle;
|
||||
interfaces.mDisc = rsDisc;
|
||||
#ifdef RS_USE_BITDHT
|
||||
interfaces.mDht = rsDht;
|
||||
#else
|
||||
interfaces.mDht = NULL;
|
||||
#endif
|
||||
interfaces.mNotify = mNotify;
|
||||
interfaces.mServiceControl = serviceCtrl;
|
||||
interfaces.mPluginHandler = mPluginsManager;
|
||||
|
@ -1511,7 +1521,9 @@ int RsServer::StartupRetroShare()
|
|||
p3BanList *mBanList = new p3BanList(serviceCtrl, mNetMgr);
|
||||
rsBanList = mBanList ;
|
||||
pqih -> addService(mBanList, true);
|
||||
#ifdef RS_USE_BITDHT
|
||||
mBitDht->setupPeerSharer(mBanList);
|
||||
#endif
|
||||
|
||||
p3BandwidthControl *mBwCtrl = new p3BandwidthControl(pqih);
|
||||
pqih -> addService(mBwCtrl, true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue