added bootstrap string to config

pull/2/head
Tom Early 3 years ago
parent 53238c5961
commit 25cb3edeb0

@ -12,6 +12,11 @@ Country = GB
Sponsor = My Home Club
# Bootstrap is the internet address of any existing DHT client.
# Usually, choose a frequented, or close, reflector if it's already a DHT
# client. If that's not possible, you can use xrf757.openquad.net
Bootstrap = xrf757.openquad.net
[IP Addresses]
# Binding addresses are usually the 'any' address
IPv4Binding = 0.0.0.0

@ -4,3 +4,6 @@ BINDIR = /usr/local/bin
# besides making an executable that gdb can use,
# this will also provide some additional log messsage
debug = false
# To disable DHT support, set DHT to false.
DHT = true

@ -33,6 +33,7 @@
// ini file keywords
#define JAUTOLINKMODULE "AutoLinkModule"
#define JBLACKLISTPATH "BlacklistPath"
#define JBOOTSTRAP "Bootstrap"
#define JBRANDMEISTER "Brandmeister"
#define JCALLSIGN "Callsign"
#define JCOUNTRY "Country"
@ -250,6 +251,8 @@ bool CConfigure::ReadData(const std::string &path)
case ESection::names:
if (0 == key.compare(JCALLSIGN))
data[g_Keys.names.callsign] = value;
else if (0 == key.compare(JBOOTSTRAP))
data[g_Keys.names.bootstrap] = value;
else if (0 == key.compare(JSYSOPEMAIL))
data[g_Keys.names.email] = value;
else if (0 == key.compare(JCOUNTRY))
@ -506,6 +509,9 @@ bool CConfigure::ReadData(const std::string &path)
}
}
#ifndef NO_DHT
isDefined(ErrorLevel::fatal, JNAMES, JBOOTSTRAP, g_Keys.names.bootstrap, rval);
#endif
isDefined(ErrorLevel::mild, JNAMES, JSYSOPEMAIL, g_Keys.names.email, rval);
isDefined(ErrorLevel::mild, JNAMES, JCOUNTRY, g_Keys.names.country, rval);
isDefined(ErrorLevel::mild, JNAMES, JSPONSOR, g_Keys.names.sponsor, rval);

@ -39,8 +39,8 @@ struct SJsonKeys {
struct MMDVM { const std::string port, defaultid; }
mmdvm { "MMDVMPort", "mmdvmdefaultid" };
struct NAMES { const std::string callsign, email, country, sponsor; }
names { "Callsign", "SysopEmail", "Country", "Sponsor" };
struct NAMES { const std::string callsign, bootstrap, email, country, sponsor; }
names { "Callsign", "bootstrap", "SysopEmail", "Country", "Sponsor" };
struct IP { const std::string ipv4bind, ipv4address, ipv6bind, ipv6address, transcoder; }
ip { "ipv4bind", "IPv4Address", "ipv6bind", "IPv6Address", "tcaddress" };

@ -34,6 +34,12 @@ endif
LDFLAGS=-pthread -lcurl
ifeq ($(DHT), true)
LDFLAGS += -lopendht
else
CFLAGS += -DNO_DHT
endif
SRCS = $(wildcard *.cpp)
OBJS = $(SRCS:.cpp=.o)
DEPS = $(SRCS:.cpp=.d)

Loading…
Cancel
Save

Powered by TurnKey Linux.