mirror of
https://github.com/g4klx/DMRGateway
synced 2025-12-22 06:05:36 +08:00
Allow for a clean exit when waiting for the MMDVM connect.
This commit is contained in:
@@ -253,7 +253,7 @@ int CDMRGateway::run()
|
|||||||
|
|
||||||
LogMessage("Waiting for MMDVM to connect.....");
|
LogMessage("Waiting for MMDVM to connect.....");
|
||||||
|
|
||||||
for (;;) {
|
while (!m_killed) {
|
||||||
unsigned char config[400U];
|
unsigned char config[400U];
|
||||||
unsigned int len = m_repeater->getConfig(config);
|
unsigned int len = m_repeater->getConfig(config);
|
||||||
if (len > 0U)
|
if (len > 0U)
|
||||||
@@ -264,6 +264,13 @@ int CDMRGateway::run()
|
|||||||
CThread::sleep(10U);
|
CThread::sleep(10U);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_killed) {
|
||||||
|
LogMessage("DMRGateway-%s is exiting on receipt of SIGHUP1", VERSION);
|
||||||
|
m_repeater->close();
|
||||||
|
delete m_repeater;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
LogMessage("MMDVM has connected");
|
LogMessage("MMDVM has connected");
|
||||||
|
|
||||||
if (m_conf.getDMRNetwork1Enabled()) {
|
if (m_conf.getDMRNetwork1Enabled()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user