mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-22 16:25:45 +08:00
Use a random id for MQTT and change the order of some startup messages.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2015-2021,2023,2024 by Jonathan Naylor G4KLX
|
||||
* Copyright (C) 2015-2021,2023,2024,2025 by Jonathan Naylor G4KLX
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -76,7 +76,7 @@ static CMMDVMHost* host = NULL;
|
||||
const char* HEADER1 = "This software is for use on amateur radio networks only,";
|
||||
const char* HEADER2 = "it is to be used for educational purposes only. Its use on";
|
||||
const char* HEADER3 = "commercial networks is strictly prohibited.";
|
||||
const char* HEADER4 = "Copyright(C) 2015-2024 by Jonathan Naylor, G4KLX and others";
|
||||
const char* HEADER4 = "Copyright(C) 2015-2025 by Jonathan Naylor, G4KLX and others";
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
@@ -391,6 +391,8 @@ int CMMDVMHost::run()
|
||||
LogInfo("MMDVMHost-%s is starting", VERSION);
|
||||
LogInfo("Built %s %s (GitID #%.7s)", __TIME__, __DATE__, gitversion);
|
||||
|
||||
writeJSONMessage("MMDVMHost is starting");
|
||||
|
||||
readParams();
|
||||
|
||||
ret = createModem();
|
||||
@@ -902,11 +904,6 @@ int CMMDVMHost::run()
|
||||
|
||||
setMode(MODE_IDLE);
|
||||
|
||||
LogInfo("MMDVMHost-%s is starting", VERSION);
|
||||
LogInfo("Built %s %s (GitID #%.7s)", __TIME__, __DATE__, gitversion);
|
||||
|
||||
writeJSONMessage("MMDVMHost is starting");
|
||||
|
||||
while (!m_killed) {
|
||||
bool lockout = m_modem->hasLockout();
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2022,2023 by Jonathan Naylor G4KLX
|
||||
* Copyright (C) 2022,2023,2025 by Jonathan Naylor G4KLX
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -51,7 +51,7 @@ CMQTTConnection::~CMQTTConnection()
|
||||
|
||||
bool CMQTTConnection::open()
|
||||
{
|
||||
m_mosq = ::mosquitto_new(m_name.c_str(), true, this);
|
||||
m_mosq = ::mosquitto_new(NULL, true, this);
|
||||
if (m_mosq == NULL) {
|
||||
::fprintf(stderr, "MQTT Error newing: Out of memory.\n");
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user