mirror of
https://github.com/g4klx/DMRGateway
synced 2025-12-28 18:15:37 +08:00
Add DMR Master logging-in to the JSON status messages.
This commit is contained in:
@@ -384,7 +384,7 @@ int CDMRGateway::run()
|
||||
LogInfo("DMRGateway-%s is starting", VERSION);
|
||||
LogInfo("Built %s %s (GitID #%.7s)", __TIME__, __DATE__, gitversion);
|
||||
|
||||
writeJSONStatus("DMRGateway is starting");
|
||||
WriteJSONStatus("DMRGateway is starting");
|
||||
|
||||
ret = createMMDVM();
|
||||
if (!ret)
|
||||
@@ -1267,7 +1267,7 @@ int CDMRGateway::run()
|
||||
}
|
||||
|
||||
LogInfo("DMRGateway is stopping");
|
||||
writeJSONStatus("DMRGateway is stopping");
|
||||
WriteJSONStatus("DMRGateway is stopping");
|
||||
|
||||
delete m_xlxVoice;
|
||||
|
||||
@@ -2648,16 +2648,6 @@ void CDMRGateway::buildNetworkHostNetworkString(std::string &str, const std::str
|
||||
}
|
||||
}
|
||||
|
||||
void CDMRGateway::writeJSONStatus(const std::string& status)
|
||||
{
|
||||
nlohmann::json json;
|
||||
|
||||
json["timestamp"] = CUtils::createTimestamp();
|
||||
json["message"] = status;
|
||||
|
||||
WriteJSON("status", json);
|
||||
}
|
||||
|
||||
void CDMRGateway::onDynamic(const unsigned char* message, unsigned int length)
|
||||
{
|
||||
assert(gateway != NULL);
|
||||
|
||||
Reference in New Issue
Block a user