mirror of
https://github.com/g4klx/MMDVMHost.git
synced 2026-03-20 12:04:40 +01:00
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:
commit
67aafc9db3
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue