From ce66f2e260a5e3a4c1b5c741276c706ec6e71e39 Mon Sep 17 00:00:00 2001 From: Tom Early Date: Mon, 3 Apr 2023 11:11:25 -0700 Subject: [PATCH] another rename --- reflector/Reflector.cpp | 8 ++++---- reflector/urfd-dht-values.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/reflector/Reflector.cpp b/reflector/Reflector.cpp index 2c1e30b..dd75b10 100644 --- a/reflector/Reflector.cpp +++ b/reflector/Reflector.cpp @@ -619,7 +619,7 @@ void CReflector::PutDHTUsers() void CReflector::PutDHTConfig() { const std::string cs(g_Configure.GetString(g_Keys.names.callsign)); - SUrfdConfig0 cfg; + SUrfdConfig1 cfg; time(&cfg.timestamp); cfg.cs.assign(cs); cfg.ipv4.assign(g_Configure.GetString(g_Keys.ip.ipv4address)); @@ -668,7 +668,7 @@ void CReflector::PutDHTConfig() void CReflector::GetDHTConfig(const std::string &cs) { - static SUrfdConfig0 cfg; + static SUrfdConfig1 cfg; cfg.timestamp = 0; // every time this is called, zero the timestamp auto item = g_GateKeeper.GetInterlinkMap()->FindMapItem(cs); g_GateKeeper.ReleaseInterlinkMap(); @@ -688,11 +688,11 @@ void CReflector::GetDHTConfig(const std::string &cs) [](const std::shared_ptr &v) { if (0 == v->user_type.compare("mrefd-config-1")) { - auto rdat = dht::Value::unpack(*v); + auto rdat = dht::Value::unpack(*v); if (rdat.timestamp > cfg.timestamp) { // the time stamp is the newest so far, so put it in the static cfg struct - cfg = dht::Value::unpack(*v); + cfg = dht::Value::unpack(*v); } } else diff --git a/reflector/urfd-dht-values.h b/reflector/urfd-dht-values.h index 7c79bab..ee147e6 100644 --- a/reflector/urfd-dht-values.h +++ b/reflector/urfd-dht-values.h @@ -74,7 +74,7 @@ enum class EUrfdPorts : unsigned { dcs, dextra, dmrplus, dplus, m17, mmdvm, nxdn enum class EUrfdAlMod : unsigned { nxdn, p25, ysf, SIZE }; enum class EUrfdTxRx : unsigned { rx, tx, SIZE }; enum class EUrfdRefId : unsigned { nxdn, p25, SIZE }; -struct SUrfdConfig0 +struct SUrfdConfig1 { std::time_t timestamp; std::string cs, ipv4, ipv6, mods, tcmods, url, email, sponsor, country, version;