trunk: ship rich per-client status blob in MsgTrunkNodeList (fixes #3)
Extends type 121 with a parallel string vector carrying each local client's m_status["nodes"][callsign] verbatim. Receivers parse, recursively sanitize (depth/length bounded), and surface the rich blob under /status.trunks[*].nodes (and /status.twin.nodes), MQTT nodes/<peer> and Redis live:peer_node:<peer>:<callsign>.status — bringing partner nodes to parity with local-client status entries (monitoredTGs, restrictedTG, qth, rx/tx config, protoVer, ...). isTalker is derived on the receive side from the live trunk-talker map (MsgTrunkTalkerStart/Stop) rather than carried in the blob, since blob cadence is event-debounced login/logout/TG-change. Lockstep wire bump: peers running an older fork build that knows type 121 with the original 5-vector shape will fail to unpack and silently empty their partner roster until upgraded. Pre-jayReflector peers (no type 121 at all) keep ignoring it as before.
This commit is contained in:
1 parent
69c3c2eea3
commit
a3757ca634
9 files changed
+217
-10
No files matched your search
@@ -334,7 +334,10 @@ static Json::Value nodeListToJson(
|
||||
Json::Value arr(Json::arrayValue);
|
||||
for (const auto& n : nodes)
|
||||
{
|
||||
Json::Value e;
|
||||
// Prefer the rich per-client status blob; fall back to the flat
|
||||
// wire fields if the source didn't ship one (older fork builds).
|
||||
Json::Value e = n.status.isObject() ? n.status
|
||||
: Json::Value(Json::objectValue);
|
||||
e["callsign"] = n.callsign;
|
||||
e["tg"] = n.tg;
|
||||
if (n.lat != 0.0f || n.lon != 0.0f)
|
||||
|
||||
Reference in new issue
Block a user