diff --git a/config/urfd.ini b/config/urfd.ini
index 77148a1..07d049e 100644
--- a/config/urfd.ini
+++ b/config/urfd.ini
@@ -37,7 +37,7 @@ IPv4Binding = 0.0.0.0
# Modules = ABCDEFGHIJKLMNOPQRSTUVWXYZ
Modules = ADMSZ
# Create Descriptions as needed...
-DescriptionA = Transcoded
+DescriptionA = All Modes
DescriptionD = DMR Chat
DescriptionM = M17 Chat
DescriptionS = DStar Chat
@@ -91,7 +91,7 @@ Port = 10017
[USRP]
Enable = false
-Callsign = ALLSTAR # set to NONE if you don't want to create this client
+Callsign = ALLSTAR
IPAddress = 1.2.3.4 # the IP address of the USRP client (the Allstar node)
RxPort = 34000
TxPort = 32000
diff --git a/dashboard/index.php b/dashboard/index.php
index f44a3d6..b3289ea 100644
--- a/dashboard/index.php
+++ b/dashboard/index.php
@@ -86,7 +86,7 @@ if ($CallingHome['Active']) {
-
GetReflectorName()); ?>Universal Reflector
+ GetReflectorName()); ?> Universal Reflector
@@ -152,7 +152,7 @@ if ($CallingHome['Active']) {
- GetReflectorName(); ?> Multiprotocol Reflector
+ GetReflectorName()); ?> Universal Reflector
diff --git a/radmin b/radmin
index ba8f9be..8d76743 100755
--- a/radmin
+++ b/radmin
@@ -35,7 +35,7 @@ UninstallReflector () {
}
InstallReflector () {
- if [ "$tcaddress" != none ]; then
+ if [ "$tcport" != 0 ]; then
pushd ../tcd
sudo make install || read -p " to continue: " ans
popd
@@ -63,22 +63,19 @@ InstallReflector () {
urfserv='/etc/systemd/system/urfd.service'
tcdserv='/etc/systemd/system/tcd.service'
-# default values, we only need a few
-tcaddress='none'
-
if [[ $# -eq 1 ]]; then
if [ -e $1 ]; then
echo $1 found
- callsign=$(awk '$1 == "Callsign"{print $3}' $1)
- tcaddress=$(awk '$1 == "Transcoder"{print $3}' $1)
+ callsign=$(awk '$1 == "Callsign"{print $3; exit}' $1)
+ tcport=$(awk '$1 == "Port"{print $3; exit}' $1)
else
echo "$1 not found"
exit 1
fi
else
if [[ -e reflector/urfd.ini ]]; then
- callsign=$(awk '$1 == "Callsign"{print $3}' reflector/urfd.ini)
- tcaddress=$(awk '$1 == "Transcoder"{print $3}' reflector/urfd.ini)
+ callsign=$(awk '$1 == "Callsign"{print $3; exit}' reflector/urfd.ini)
+ tcport=$(awk '$1 == "Port"{print $3; exit}' reflector/urfd.ini)
else
echo "ERROR: could not find reflector/urfd.ini! You'll have to specify it."
echo "Usage: ./radmin PATH-TO-INI-FILE"
@@ -97,7 +94,7 @@ do
ps -aux | grep -e urfd -e tcd | grep -v grep | grep -v radmin
fi
echo
- echo " Reflector Administration, Version #230308"
+ echo " Reflector Administration, Version #240808"
echo
git status | head -1
echo
@@ -116,13 +113,17 @@ do
else
if [[ "$callsign" == URF* ]]; then
if [ -e reflector/urfd ]; then
- if [[ "$tcaddress" == none ]]; then
+ if [[ "$tcport" == 0 ]]; then
echo "is : Install URF reflector without transcoder"
else
if [ -e ../tcd/tcd ]; then
echo "is : Install URF reflector and transcoder"
+ else
+ echo "HELP! Transcoder port is set, but tcd executable not found!"
fi
fi
+ else
+ echo "HELP! urfd executable not found!"
fi
fi
fi
diff --git a/reflector/Client.cpp b/reflector/Client.cpp
index f026463..881a920 100644
--- a/reflector/Client.cpp
+++ b/reflector/Client.cpp
@@ -85,11 +85,11 @@ void CClient::WriteXml(std::ofstream &xmlFile)
xmlFile << "\t" << m_ReflectorModule << "" << std::endl;
xmlFile << "\t" << GetProtocolName() << "" << std::endl;
char mbstr[100];
- if (std::strftime(mbstr, sizeof(mbstr), "%A %c", std::localtime(&m_ConnectTime)))
+ if (std::strftime(mbstr, sizeof(mbstr), "%FT%TZ", std::gmtime(&m_ConnectTime)))
{
xmlFile << "\t" << mbstr << "" << std::endl;
}
- if (std::strftime(mbstr, sizeof(mbstr), "%A %c", std::localtime(&m_LastHeardTime)))
+ if (std::strftime(mbstr, sizeof(mbstr), "%FT%TZ", std::gmtime(&m_LastHeardTime)))
{
xmlFile << "\t" << mbstr << "" << std::endl;
}
diff --git a/reflector/Configure.cpp b/reflector/Configure.cpp
index 75e28d8..445e953 100644
--- a/reflector/Configure.cpp
+++ b/reflector/Configure.cpp
@@ -819,21 +819,19 @@ bool CConfigure::isDefined(ErrorLevel level, const std::string §ion, const s
return false;
}
-void CConfigure::checkAutoLink(const std::string §ion, const std::string &pname, const std::string &key, bool &rval)
+void CConfigure::checkAutoLink(const std::string §ion, const std::string &pname, const std::string &key, bool &rval) const
{
- if (data.contains(key))
+ const auto autolinkModule = GetAutolinkModule(key);
+ if (' ' != autolinkModule)
{
auto ismods = data.contains(g_Keys.modules.modules);
const auto mods(ismods ? data[g_Keys.modules.modules].get() : "");
- const auto c = data[key].get().at(0);
- if (std::string::npos == mods.find(c))
+ if (std::string::npos == mods.find(autolinkModule))
{
- std::cerr << "ERROR: [" << section << ']' << pname << " module '" << c << "' not a configured module" << std::endl;
+ std::cerr << "ERROR: [" << section << ']' << pname << " module '" << autolinkModule << "' not a configured module" << std::endl;
rval = true;
}
}
- else
- data[key] = nullptr;
}
std::string CConfigure::getDataRefreshType(ERefreshType type) const
@@ -865,7 +863,7 @@ void CConfigure::badParam(const std::string &key) const
bool CConfigure::checkModules(std::string &m) const
{
bool rval = false; // return true on error
- for(unsigned i=0; i(Callsign, Ip);
// aautolink, if enabled
- if (m_AutolinkModule)
+ if (' ' != m_AutolinkModule)
newclient->SetReflectorModule(m_AutolinkModule);
// and append
diff --git a/reflector/P25Protocol.cpp b/reflector/P25Protocol.cpp
index c83e33c..0c52204 100644
--- a/reflector/P25Protocol.cpp
+++ b/reflector/P25Protocol.cpp
@@ -122,7 +122,7 @@ void CP25Protocol::Task(void)
auto newclient = std::make_shared(Callsign, Ip);
// aautolink, if enabled
- if (m_AutolinkModule)
+ if (' ' != m_AutolinkModule)
newclient->SetReflectorModule(m_AutolinkModule);
// and append
diff --git a/reflector/Peer.cpp b/reflector/Peer.cpp
index 3a1638e..2333d0f 100644
--- a/reflector/Peer.cpp
+++ b/reflector/Peer.cpp
@@ -114,11 +114,11 @@ void CPeer::WriteXml(std::ofstream &xmlFile)
xmlFile << "\t" << m_ReflectorModules << "" << std::endl;
xmlFile << "\t" << GetProtocolName() << "" << std::endl;
char mbstr[100];
- if (std::strftime(mbstr, sizeof(mbstr), "%A %c", std::localtime(&m_ConnectTime)))
+ if (std::strftime(mbstr, sizeof(mbstr), "%FT%TZ", std::gmtime(&m_ConnectTime)))
{
xmlFile << "\t" << mbstr << "" << std::endl;
}
- if (std::strftime(mbstr, sizeof(mbstr), "%A %c", std::localtime(&m_LastHeardTime)))
+ if (std::strftime(mbstr, sizeof(mbstr), "%FT%TZ", std::gmtime(&m_LastHeardTime)))
{
xmlFile << "\t" << mbstr << "" << std::endl;
}
diff --git a/reflector/Protocols.cpp b/reflector/Protocols.cpp
index 5109b93..65709fe 100644
--- a/reflector/Protocols.cpp
+++ b/reflector/Protocols.cpp
@@ -94,7 +94,7 @@ bool CProtocols::Init(void)
if (g_Configure.GetBoolean(g_Keys.usrp.enable))
{
m_Protocols.emplace_back(std::unique_ptr(new CUSRPProtocol));
- if (! m_Protocols.back()->Initialize("USRP", EProtocol::usrp, uint16_t(g_Configure.GetUnsigned(g_Keys.usrp.rxport)), USRP_IPV4, USRP_IPV6))
+ if (! m_Protocols.back()->Initialize("USRP", EProtocol::usrp, uint16_t(g_Configure.GetUnsigned(g_Keys.usrp.rxport)), USRP_IPV4, USRP_IPV6))
return false;
}
diff --git a/reflector/Reflector.cpp b/reflector/Reflector.cpp
index 4861ae8..4c19087 100644
--- a/reflector/Reflector.cpp
+++ b/reflector/Reflector.cpp
@@ -532,9 +532,9 @@ void CReflector::PutDHTConfig()
std::ostringstream ss;
ss << g_Version;
cfg.version.assign(ss.str());
- cfg.almod[toUType(EUrfdAlMod::nxdn)] = g_Configure.GetString(g_Keys.nxdn.autolinkmod).at(0);
- cfg.almod[toUType(EUrfdAlMod::p25)] = g_Configure.GetString(g_Keys.p25.autolinkmod).at(0);
- cfg.almod[toUType(EUrfdAlMod::ysf)] = g_Configure.GetString(g_Keys.ysf.autolinkmod).at(0);
+ cfg.almod[toUType(EUrfdAlMod::nxdn)] = g_Configure.GetAutolinkModule(g_Keys.nxdn.autolinkmod);
+ cfg.almod[toUType(EUrfdAlMod::p25)] = g_Configure.GetAutolinkModule(g_Keys.p25.autolinkmod);
+ cfg.almod[toUType(EUrfdAlMod::ysf)] = g_Configure.GetAutolinkModule(g_Keys.ysf.autolinkmod);
cfg.ysffreq[toUType(EUrfdTxRx::rx)] = g_Configure.GetUnsigned(g_Keys.ysf.defaultrxfreq);
cfg.ysffreq[toUType(EUrfdTxRx::tx)] = g_Configure.GetUnsigned(g_Keys.ysf.defaulttxfreq);
cfg.refid[toUType(EUrfdRefId::nxdn)] = g_Configure.GetUnsigned(g_Keys.nxdn.reflectorid);
diff --git a/reflector/TCSocket.h b/reflector/TCSocket.h
index f6ffaac..a22dc5b 100644
--- a/reflector/TCSocket.h
+++ b/reflector/TCSocket.h
@@ -37,7 +37,6 @@ public:
void Close(); // close all open sockets
void Close(char module); // close a specific module
void Close(int fd); // close a specific file descriptor
- bool receive(int fd, STCPacket *packet);
// All bool functions, except Server Receive, return true if there was an error
bool Send(const STCPacket *packet);
@@ -46,6 +45,7 @@ public:
char GetMod(int fd) const;
protected:
+ bool receive(int fd, STCPacket *packet);
std::vector m_Pfd;
std::string m_Modules;
};
diff --git a/reflector/User.cpp b/reflector/User.cpp
index 2110fdc..772e96e 100644
--- a/reflector/User.cpp
+++ b/reflector/User.cpp
@@ -70,7 +70,7 @@ void CUser::WriteXml(std::ofstream &xmlFile)
xmlFile << "\t" << m_Xlx << "" << std::endl;
char mbstr[100];
- if (std::strftime(mbstr, sizeof(mbstr), "%A %c", std::localtime(&m_LastHeardTime)))
+ if (std::strftime(mbstr, sizeof(mbstr), "%FT%TZ", std::gmtime(&m_LastHeardTime)))
{
xmlFile << "\t" << mbstr << "" << std::endl;
}
diff --git a/reflector/YSFProtocol.cpp b/reflector/YSFProtocol.cpp
index 9439716..a3f6db6 100644
--- a/reflector/YSFProtocol.cpp
+++ b/reflector/YSFProtocol.cpp
@@ -164,7 +164,7 @@ void CYsfProtocol::Task(void)
auto newclient = std::make_shared(Callsign, Ip);
// aautolink, if enabled
- if (m_AutolinkModule)
+ if (' ' != m_AutolinkModule)
newclient->SetReflectorModule(m_AutolinkModule);
// and append