mirror of
https://github.com/g4klx/DMRGateway.git
synced 2025-12-06 05:32:01 +01:00
Don't use default arguments for closing the network connection.
This commit is contained in:
parent
a962971b11
commit
daa54d3d32
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2015-2020 by Jonathan Naylor G4KLX
|
* Copyright (C) 2015-2021 by Jonathan Naylor G4KLX
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -1300,32 +1300,32 @@ int CDMRGateway::run()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_dmrNetwork1 != NULL) {
|
if (m_dmrNetwork1 != NULL) {
|
||||||
m_dmrNetwork1->close();
|
m_dmrNetwork1->close(true);
|
||||||
delete m_dmrNetwork1;
|
delete m_dmrNetwork1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_dmrNetwork2 != NULL) {
|
if (m_dmrNetwork2 != NULL) {
|
||||||
m_dmrNetwork2->close();
|
m_dmrNetwork2->close(true);
|
||||||
delete m_dmrNetwork2;
|
delete m_dmrNetwork2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_dmrNetwork3 != NULL) {
|
if (m_dmrNetwork3 != NULL) {
|
||||||
m_dmrNetwork3->close();
|
m_dmrNetwork3->close(true);
|
||||||
delete m_dmrNetwork3;
|
delete m_dmrNetwork3;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_dmrNetwork4 != NULL) {
|
if (m_dmrNetwork4 != NULL) {
|
||||||
m_dmrNetwork4->close();
|
m_dmrNetwork4->close(true);
|
||||||
delete m_dmrNetwork4;
|
delete m_dmrNetwork4;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_dmrNetwork5 != NULL) {
|
if (m_dmrNetwork5 != NULL) {
|
||||||
m_dmrNetwork5->close();
|
m_dmrNetwork5->close(true);
|
||||||
delete m_dmrNetwork5;
|
delete m_dmrNetwork5;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_xlxNetwork != NULL) {
|
if (m_xlxNetwork != NULL) {
|
||||||
m_xlxNetwork->close();
|
m_xlxNetwork->close(true);
|
||||||
delete m_xlxNetwork;
|
delete m_xlxNetwork;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2308,7 +2308,7 @@ bool CDMRGateway::linkXLX(unsigned int number)
|
||||||
|
|
||||||
if (m_xlxNetwork != NULL) {
|
if (m_xlxNetwork != NULL) {
|
||||||
LogMessage("XLX, Disconnecting from XLX%03u", m_xlxNumber);
|
LogMessage("XLX, Disconnecting from XLX%03u", m_xlxNumber);
|
||||||
m_xlxNetwork->close();
|
m_xlxNetwork->close(true);
|
||||||
delete m_xlxNetwork;
|
delete m_xlxNetwork;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2345,7 +2345,7 @@ bool CDMRGateway::linkXLX(unsigned int number)
|
||||||
void CDMRGateway::unlinkXLX()
|
void CDMRGateway::unlinkXLX()
|
||||||
{
|
{
|
||||||
if (m_xlxNetwork != NULL) {
|
if (m_xlxNetwork != NULL) {
|
||||||
m_xlxNetwork->close();
|
m_xlxNetwork->close(true);
|
||||||
delete m_xlxNetwork;
|
delete m_xlxNetwork;
|
||||||
m_xlxNetwork = NULL;
|
m_xlxNetwork = NULL;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2015,2016,2017,2018,2020 by Jonathan Naylor G4KLX
|
* Copyright (C) 2015,2016,2017,2018,2020,2021 by Jonathan Naylor G4KLX
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -370,7 +370,7 @@ void CDMRNetwork::clock(unsigned int ms)
|
||||||
the Network sometimes times out and reaches here.
|
the Network sometimes times out and reaches here.
|
||||||
We want it to reconnect so... */
|
We want it to reconnect so... */
|
||||||
LogError("%s, Login to the master has failed, retrying network ...", m_name.c_str());
|
LogError("%s, Login to the master has failed, retrying network ...", m_name.c_str());
|
||||||
close();
|
close(false);
|
||||||
open();
|
open();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2015,2016,2017,2018,2020 by Jonathan Naylor G4KLX
|
* Copyright (C) 2015,2016,2017,2018,2020.2021 by Jonathan Naylor G4KLX
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -57,7 +57,7 @@ public:
|
||||||
|
|
||||||
bool isConnected() const;
|
bool isConnected() const;
|
||||||
|
|
||||||
void close(bool sayGoodbye = true);
|
void close(bool sayGoodbye);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
sockaddr_storage m_addr;
|
sockaddr_storage m_addr;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2015-2020 by Jonathan Naylor G4KLX
|
* Copyright (C) 2015-2021 by Jonathan Naylor G4KLX
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -19,6 +19,6 @@
|
||||||
#if !defined(VERSION_H)
|
#if !defined(VERSION_H)
|
||||||
#define VERSION_H
|
#define VERSION_H
|
||||||
|
|
||||||
const char* VERSION = "20201031";
|
const char* VERSION = "20210409";
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue