Merge pull request #858 from MW0MWZ/fix/json-always-emit-source-info

Always emit source_info and reflector fields in JSON output
This commit is contained in:
Jonathan Naylor 2026-03-17 16:00:56 +00:00 committed by GitHub
commit 67aafc9db3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 12 additions and 11 deletions

View file

@ -2519,8 +2519,7 @@ void CDMRSlot::writeJSON(nlohmann::json& json, const char* source, const char* a
json["destination_id"] = int(dstId);
json["destination_type"] = grp ? "group" : "individual";
if (!srcInfo.empty())
json["source_info"] = srcInfo;
json["source_info"] = srcInfo;
}
#endif

View file

@ -1499,8 +1499,9 @@ void CDStarControl::writeJSONRF(const char* action, const unsigned char* my1, co
json["source_ext"] = convertBuffer(my2, DSTAR_SHORT_CALLSIGN_LENGTH);
json["destination_cs"] = convertBuffer(your, DSTAR_LONG_CALLSIGN_LENGTH);
json["source"] = "rf";
json["action"] = action;
json["source"] = "rf";
json["action"] = action;
json["reflector"] = "";
WriteJSON("D-Star", json);
}
@ -1554,6 +1555,8 @@ void CDStarControl::writeJSONNet(const char* action, const unsigned char* my1, c
if (reflector != nullptr)
json["reflector"] = convertBuffer(reflector, DSTAR_LONG_CALLSIGN_LENGTH);
else
json["reflector"] = "";
WriteJSON("D-Star", json);
}

View file

@ -1284,8 +1284,7 @@ void CNXDNControl::writeJSON(nlohmann::json& json, const char* source, const cha
json["destination_id"] = int(dstId);
json["destination_type"] = grp ? "group" : "individual";
if (!srcInfo.empty())
json["source_info"] = srcInfo;
json["source_info"] = srcInfo;
}
#endif

View file

@ -1383,8 +1383,7 @@ void CP25Control::writeJSON(nlohmann::json& json, const char* source, const char
json["destination_id"] = int(dstId);
json["destination_type"] = grp ? "group" : "individual";
if (!srcInfo.empty())
json["source_info"] = srcInfo;
json["source_info"] = srcInfo;
}
#endif

View file

@ -1343,9 +1343,10 @@ void CYSFControl::writeJSONRF(nlohmann::json& json, const char* action, const un
json["source_cs"] = convertBuffer(source);
json["source"] = "rf";
json["action"] = action;
json["dg-id"] = int(dgid);
json["source"] = "rf";
json["action"] = action;
json["dg-id"] = int(dgid);
json["reflector"] = "";
}
void CYSFControl::writeJSONNet(nlohmann::json& json, const char* action)