From 083b4fd279c32e6312592b9251eafe40ea4cde23 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Tue, 26 Jun 2018 22:04:05 +0100 Subject: [PATCH 001/166] Initial version for handling TH-D74E D-PRS data. --- Common/APRSCollector.cpp | 403 +++++++++++++++++++++++---------------- Common/APRSCollector.h | 22 ++- 2 files changed, 254 insertions(+), 171 deletions(-) diff --git a/Common/APRSCollector.cpp b/Common/APRSCollector.cpp index 1973427..e59f8a4 100644 --- a/Common/APRSCollector.cpp +++ b/Common/APRSCollector.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010,2012,2013,2014 by Jonathan Naylor G4KLX + * Copyright (C) 2010,2012,2013,2014,2018 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 @@ -32,6 +32,9 @@ m_ggaValid(false), m_rmcData(NULL), m_rmcLength(0U), m_rmcValid(false), +m_csData(NULL), +m_csLength(0U), +m_csValid(false), m_crcData(NULL), m_crcLength(0U), m_crcValid(false), @@ -39,10 +42,12 @@ m_txtData(NULL), m_txtLength(0U), m_txtValid(false), m_buffer(NULL), -m_slowData(SS_FIRST) +m_slowData(SS_FIRST), +m_collector() { m_ggaData = new unsigned char[APRS_DATA_LENGTH]; m_rmcData = new unsigned char[APRS_DATA_LENGTH]; + m_csData = new unsigned char[APRS_DATA_LENGTH]; m_crcData = new unsigned char[APRS_DATA_LENGTH]; m_txtData = new unsigned char[APRS_DATA_LENGTH]; m_buffer = new unsigned char[SLOW_DATA_BLOCK_LENGTH]; @@ -52,6 +57,7 @@ CAPRSCollector::~CAPRSCollector() { delete[] m_ggaData; delete[] m_rmcData; + delete[] m_csData; delete[] m_crcData; delete[] m_txtData; delete[] m_buffer; @@ -77,11 +83,17 @@ bool CAPRSCollector::writeData(const unsigned char* data) break; } - // Is it GPS data, or are we collecting data already? - if ((m_buffer[0U] & SLOW_DATA_TYPE_MASK) != SLOW_DATA_TYPE_GPS) - return false; + CUtils::dump(wxT("Slow data received"), m_buffer, 6U); - return addData(m_buffer + 1U); + // Is it slow text data? + if ((m_buffer[0U] & SLOW_DATA_TYPE_MASK) == SLOW_DATA_TYPE_TEXT) + addTextData(m_buffer); + + // Is it GPS data? + if ((m_buffer[0U] & SLOW_DATA_TYPE_MASK) == SLOW_DATA_TYPE_GPS) + return addGPSData(m_buffer + 1U); + + return false; } void CAPRSCollector::reset() @@ -91,11 +103,14 @@ void CAPRSCollector::reset() m_ggaValid = false; m_rmcLength = 0U; m_rmcValid = false; + m_csLength = 0U; + m_csValid = false; m_crcLength = 0U; m_crcValid = false; m_txtLength = 0U; m_txtValid = false; m_slowData = SS_FIRST; + m_collector.Clear(); } void CAPRSCollector::sync() @@ -103,11 +118,25 @@ void CAPRSCollector::sync() m_slowData = SS_FIRST; } -bool CAPRSCollector::addData(const unsigned char* data) +bool CAPRSCollector::addGPSData(const unsigned char* data) { wxASSERT(data != NULL); - if (::memcmp(data, "$GPGG", 5U) == 0) { + m_collector.Append((char*)data, 5U); + + if (m_state == AS_GGA) { + addGGAData(); + return false; + } else if (m_state == AS_RMC) { + addRMCData(); + return false; + } else if (m_state == AS_CS) { + return addCSData(); + } else if (m_state == AS_CRC) { + return addCRCData(); + } + + if (m_state != AS_GGA && m_collector.Find(wxT("$GPGGA")) != wxNOT_FOUND) { m_state = AS_GGA; m_ggaLength = 0U; m_ggaValid = false; @@ -115,183 +144,210 @@ bool CAPRSCollector::addData(const unsigned char* data) m_rmcValid = false; m_txtLength = 0U; m_txtValid = false; - addGGAData(data); return false; - } else if (::memcmp(data, "$GPRM", 5U) == 0) { + } else if (m_state != AS_RMC && m_collector.Find(wxT("$GPRMC")) != wxNOT_FOUND) { m_state = AS_RMC; m_rmcLength = 0U; m_rmcValid = false; m_txtLength = 0U; m_txtValid = false; - addRMCData(data); return false; - } else if (::memcmp(data, "$$CRC", 5U) == 0) { + } else if (m_state != AS_CRC && m_collector.Find(wxT("$$CRC")) != wxNOT_FOUND) { m_state = AS_CRC; m_crcLength = 0U; m_crcValid = false; - return addCRCData(data); - } else if (m_state == AS_RMC && m_rmcLength == 0U) { - m_state = AS_TXT; - m_txtLength = 0U; - m_txtValid = false; - addTXTData(data); - return false; - } else if (m_state == AS_GGA) { - addGGAData(data); - return false; - } else if (m_state == AS_RMC) { - addRMCData(data); - return false; - } else if (m_state == AS_CRC) { - return addCRCData(data); - } else if (m_state == AS_TXT) { - return addTXTData(data); } return false; } -void CAPRSCollector::addGGAData(const unsigned char* data) +void CAPRSCollector::addGGAData() { - for (unsigned int i = 0U; i < 5U; i++) { - unsigned char c = data[i]; + int n2 = m_collector.Find(wxT('\x0A'), true); + if (n2 == wxNOT_FOUND) + return; - m_ggaData[m_ggaLength] = c & 0x7FU; + int n1 = m_collector.Find(wxT("$GPGGA")); + if (n1 == wxNOT_FOUND) + return; + + if (n2 < n1) + return; + + unsigned int len = n2 - n1; + + if (len >= APRS_DATA_LENGTH) { + m_ggaLength = 0U; + m_ggaValid = false; + m_state = AS_NONE; + return; + } + + m_ggaLength = 0U; + for (int i = n1; i <= n2; i++) { + m_ggaData[m_ggaLength] = m_collector.GetChar(i); + m_ggaData[m_ggaLength] &= 0x7FU; m_ggaLength++; - - if (m_ggaLength >= APRS_DATA_LENGTH) { - // CUtils::dump(wxT("Missed end of $GPGGA data"), m_ggaData, m_ggaLength); - m_ggaLength = 0U; - m_ggaValid = false; - m_state = AS_NONE; - return; - } - - if (c == 0x0AU) { - bool ret = checkXOR(m_ggaData + 1U, m_ggaLength - 1U); - if (ret) { - // CUtils::dump(wxT("$GPGGA Valid"), m_ggaData, m_ggaLength); - m_ggaValid = true; - m_state = AS_RMC; - return; - } else { - // CUtils::dump(wxT("$GPGGA Bad checksum"), m_ggaData, m_ggaLength); - m_ggaLength = 0U; - m_ggaValid = false; - m_state = AS_RMC; - return; - } - } } + + bool ret = checkXOR(m_ggaData + 1U, m_ggaLength - 1U); + if (ret) { + CUtils::dump(wxT("$GPGGA Valid"), m_ggaData, m_ggaLength); + m_ggaValid = true; + m_state = AS_RMC; + } else { + CUtils::dump(wxT("$GPGGA Bad checksum"), m_ggaData, m_ggaLength); + m_ggaLength = 0U; + m_ggaValid = false; + m_state = AS_RMC; + } + + m_collector = m_collector.Mid(n2); } -void CAPRSCollector::addRMCData(const unsigned char* data) +void CAPRSCollector::addRMCData() { - for (unsigned int i = 0U; i < 5U; i++) { - unsigned char c = data[i]; + int n2 = m_collector.Find(wxT('\x0A'), true); + if (n2 == wxNOT_FOUND) + return; - m_rmcData[m_rmcLength] = c & 0x7FU; + int n1 = m_collector.Find(wxT("$GPRMC")); + if (n1 == wxNOT_FOUND) + return; + + if (n2 < n1) + return; + + unsigned int len = n2 - n1; + + if (len >= APRS_DATA_LENGTH) { + m_rmcLength = 0U; + m_rmcValid = false; + m_state = AS_NONE; + return; + } + + m_rmcLength = 0U; + for (int i = n1; i <= n2; i++) { + m_rmcData[m_rmcLength] = m_collector.GetChar(i); + m_rmcData[m_rmcLength] &= 0x7FU; m_rmcLength++; + } - if (m_rmcLength >= APRS_DATA_LENGTH) { - // CUtils::dump(wxT("Missed end of $GPRMC data"), m_rmcData, m_rmcLength); - m_rmcLength = 0U; - m_rmcValid = false; + bool ret = checkXOR(m_rmcData + 1U, m_rmcLength - 1U); + if (ret) { + CUtils::dump(wxT("$GPRMC Valid"), m_rmcData, m_rmcLength); + m_rmcValid = true; + m_state = AS_CS; + } else { + CUtils::dump(wxT("$GPRMC Bad checksum"), m_rmcData, m_rmcLength); + m_rmcLength = 0U; + m_rmcValid = false; + m_state = AS_CS; + } + + m_collector = m_collector.Mid(n2); +} + +bool CAPRSCollector::addCSData() +{ + int n = m_collector.Find(wxT(' ')); + if (n == wxNOT_FOUND) + return false; + + if (n >= APRS_DATA_LENGTH) { + m_csLength = 0U; + m_csValid = false; + m_state = AS_NONE; + return false; + } + + m_csLength = 0U; + for (int i = 1; i < n; i++) { + m_csData[m_csLength] = m_collector.GetChar(i); + m_csData[m_csLength] &= 0x7FU; + m_csLength++; + } + + CUtils::dump(wxT("Callsign Valid"), m_csData, m_csLength); + m_csValid = true; + m_state = AS_NONE; + + m_collector = m_collector.Mid(n); + + return true; +} + +bool CAPRSCollector::addCRCData() +{ + int n2 = m_collector.Find(wxT('\x0D'), true); + if (n2 == wxNOT_FOUND) + return false; + + int n1 = m_collector.Find(wxT("$$CRC")); + if (n1 == wxNOT_FOUND) + return false; + + if (n2 < n1) + return false; + + unsigned int len = n2 - n1; + + if (len >= APRS_DATA_LENGTH) { + m_crcLength = 0U; + m_crcValid = false; + m_state = AS_NONE; + return false; + } + + m_crcLength = 0U; + for (int i = n1; i <= n2; i++) { + m_crcData[m_rmcLength] = m_collector.GetChar(i); + m_crcLength++; + } + + bool ret = checkCRC(m_crcData, m_crcLength); + if (ret) { + CUtils::dump(wxT("$$CRC Valid"), m_crcData, m_crcLength); + m_crcValid = true; + m_state = AS_NONE; + m_collector = m_collector.Mid(n2); + return true; + } else { + CUtils::dump(wxT("$$CRC Bad checksum"), m_crcData, m_crcLength); + m_crcLength = 0U; + m_crcValid = false; + m_state = AS_NONE; + m_collector = m_collector.Mid(n2); + return false; + } +} + +void CAPRSCollector::addTextData(const unsigned char* data) +{ + unsigned char pos = data[0U] & 0x0FU; + if (pos > 3U) + return; + + pos *= 5U; + + for (unsigned int i = 1U; i < 6U; i++) { + unsigned char c = data[i]; + + m_txtData[pos] = c & 0x7FU; + pos++; + + bool ret = checkXOR(m_txtData, 20U); + if (ret) { + CUtils::dump(wxT("Text Valid"), m_txtData, 20U); m_state = AS_NONE; + m_txtValid = true; + m_txtLength = 20U; return; } - - if (c == 0x0AU) { - bool ret = checkXOR(m_rmcData + 1U, m_rmcLength - 1U); - if (ret) { - // CUtils::dump(wxT("$GPRMC Valid"), m_rmcData, m_rmcLength); - m_rmcValid = true; - m_state = AS_TXT; - return; - } else { - // CUtils::dump(wxT("$GPRMC Bad checksum"), m_rmcData, m_rmcLength); - m_rmcLength = 0U; - m_rmcValid = false; - m_state = AS_TXT; - return; - } - } } } -bool CAPRSCollector::addCRCData(const unsigned char* data) -{ - for (unsigned int i = 0U; i < 5U; i++) { - unsigned char c = data[i]; - - // m_crcData[m_crcLength] = c & 0x7FU; // XXX - m_crcData[m_crcLength] = c; - m_crcLength++; - - if (m_crcLength >= APRS_DATA_LENGTH) { - // CUtils::dump(wxT("Missed end of $$CRC data"), m_crcData, m_crcLength); - m_state = AS_NONE; - m_crcLength = 0U; - m_crcValid = false; - return false; - } - - if (c == 0x0DU) { - bool ret = checkCRC(m_crcData, m_crcLength); - if (ret) { - // CUtils::dump(wxT("$$CRC Valid"), m_crcData, m_crcLength); - m_state = AS_NONE; - m_crcValid = true; - return true; - } else { - // CUtils::dump(wxT("$$CRC Bad checksum"), m_crcData, m_crcLength); - m_state = AS_NONE; - m_crcLength = 0U; - m_crcValid = false; - return false; - } - } - } - - return false; -} - -bool CAPRSCollector::addTXTData(const unsigned char* data) -{ - for (unsigned int i = 0U; i < 5U; i++) { - unsigned char c = data[i]; - - m_txtData[m_txtLength] = c & 0x7FU; - m_txtLength++; - - if (m_txtLength >= APRS_DATA_LENGTH) { - // CUtils::dump(wxT("Missed end of TEXT data"), m_txtData, m_txtLength); - m_state = AS_NONE; - m_txtLength = 0U; - m_txtValid = false; - return false; - } - - if (c == 0x0AU) { - bool ret = checkXOR(m_txtData, m_txtLength); - if (ret) { - // CUtils::dump(wxT("TEXT Valid"), m_txtData, m_txtLength); - m_state = AS_NONE; - m_txtValid = true; - return true; - } else { - // CUtils::dump(wxT("TEXT Bad checksum"), m_txtData, m_txtLength); - m_state = AS_NONE; - m_txtLength = 0U; - m_txtValid = false; - return false; - } - } - } - - return false; -} - unsigned int CAPRSCollector::getData(unsigned char* data, unsigned int length) { wxASSERT(data != NULL); @@ -316,9 +372,11 @@ unsigned int CAPRSCollector::getData(unsigned char* data, unsigned int length) m_ggaLength = 0U; m_rmcLength = 0U; + m_csLength = 0U; m_txtLength = 0U; m_ggaValid = false; m_rmcValid = false; + m_csValid = false; m_txtValid = false; return len; @@ -330,9 +388,11 @@ unsigned int CAPRSCollector::getData(unsigned char* data, unsigned int length) m_ggaLength = 0U; m_rmcLength = 0U; + m_csLength = 0U; m_txtLength = 0U; m_ggaValid = false; m_rmcValid = false; + m_csValid = false; m_txtValid = false; return len; @@ -556,20 +616,37 @@ unsigned int CAPRSCollector::convertNMEA2(unsigned char* data, unsigned int) ::sprintf((char*)data + ::strlen((char*)data), "%03d/%03d", bearing, speed); } - if (m_txtData[13U] != '*') + if (m_txtLength == 20U) { ::strcat((char*)data, " "); - // Insert the message text - unsigned int j = ::strlen((char*)data); - for (unsigned int i = 13U; i < 29U; i++) { - unsigned char c = m_txtData[i]; + // Insert the message text + unsigned int j = ::strlen((char*)data); + for (unsigned int i = 2U; i < 20U; i++) { + unsigned char c = m_txtData[i]; - if (c == '*') { - data[j] = '\0'; - break; + if (c == '*') { + data[j] = '\0'; + break; + } + + data[j++] = c; } + } else { + if (m_txtData[13U] != '*') + ::strcat((char*)data, " "); - data[j++] = c; + // Insert the message text + unsigned int j = ::strlen((char*)data); + for (unsigned int i = 13U; i < 29U; i++) { + unsigned char c = m_txtData[i]; + + if (c == '*') { + data[j] = '\0'; + break; + } + + data[j++] = c; + } } return ::strlen((char*)data); diff --git a/Common/APRSCollector.h b/Common/APRSCollector.h index 8c79c1a..7c8261f 100644 --- a/Common/APRSCollector.h +++ b/Common/APRSCollector.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010,2012 by Jonathan Naylor G4KLX + * Copyright (C) 2010,2012,2018 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 @@ -27,8 +27,8 @@ enum APRS_STATE { AS_NONE, AS_GGA, AS_RMC, - AS_CRC, - AS_TXT + AS_CS, + AS_CRC }; class CAPRSCollector { @@ -52,6 +52,9 @@ private: unsigned char* m_rmcData; unsigned int m_rmcLength; bool m_rmcValid; + unsigned char* m_csData; + unsigned int m_csLength; + bool m_csValid; unsigned char* m_crcData; unsigned int m_crcLength; bool m_crcValid; @@ -60,12 +63,15 @@ private: bool m_txtValid; unsigned char* m_buffer; SLOWDATA_STATE m_slowData; + wxString m_collector; - bool addData(const unsigned char* data); - void addGGAData(const unsigned char* data); - void addRMCData(const unsigned char* data); - bool addCRCData(const unsigned char* data); - bool addTXTData(const unsigned char* data); + bool addGPSData(const unsigned char* data); + void addTextData(const unsigned char* data); + + void addGGAData(); + void addRMCData(); + bool addCSData(); + bool addCRCData(); bool checkXOR(const unsigned char* data, unsigned int length) const; unsigned char calcXOR(const unsigned char* buffer, unsigned int length) const; From 8696548f3e6141d105a95fac775baed8337e82c2 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Wed, 27 Jun 2018 06:31:33 +0100 Subject: [PATCH 002/166] Complete the TH-D74E gatewaying and explicit APRS.FI password entry. --- Common/APRSCollector.cpp | 280 ++---------------- Common/APRSCollector.h | 16 +- Common/APRSWriter.cpp | 25 +- Common/APRSWriter.h | 7 +- Common/APRSWriterThread.cpp | 29 +- Common/APRSWriterThread.h | 8 +- Common/IRCDDBGatewayConfig.cpp | 26 +- Common/IRCDDBGatewayConfig.h | 7 +- GUICommon/DPRSSet.cpp | 20 +- GUICommon/DPRSSet.h | 6 +- ircDDBGateway/IRCDDBGatewayApp.cpp | 6 +- ircDDBGateway/IRCDDBGatewayFrame.cpp | 10 +- ircDDBGateway/IRCDDBGatewayThread.cpp | 12 +- .../IRCDDBGatewayConfigFrame.cpp | 9 +- 14 files changed, 111 insertions(+), 350 deletions(-) diff --git a/Common/APRSCollector.cpp b/Common/APRSCollector.cpp index e59f8a4..b44fc06 100644 --- a/Common/APRSCollector.cpp +++ b/Common/APRSCollector.cpp @@ -24,6 +24,9 @@ const unsigned int APRS_CSUM_LENGTH = 4U; const unsigned int APRS_DATA_LENGTH = 300U; const unsigned int SLOW_DATA_BLOCK_LENGTH = 6U; +const char APRS_OVERLAY = '\\'; +const char APRS_SYMBOL = 'K'; + CAPRSCollector::CAPRSCollector() : m_state(AS_NONE), m_ggaData(NULL), @@ -32,24 +35,17 @@ m_ggaValid(false), m_rmcData(NULL), m_rmcLength(0U), m_rmcValid(false), -m_csData(NULL), -m_csLength(0U), -m_csValid(false), m_crcData(NULL), m_crcLength(0U), m_crcValid(false), -m_txtData(NULL), -m_txtLength(0U), -m_txtValid(false), m_buffer(NULL), m_slowData(SS_FIRST), -m_collector() +m_collector(), +m_callsign() { m_ggaData = new unsigned char[APRS_DATA_LENGTH]; m_rmcData = new unsigned char[APRS_DATA_LENGTH]; - m_csData = new unsigned char[APRS_DATA_LENGTH]; m_crcData = new unsigned char[APRS_DATA_LENGTH]; - m_txtData = new unsigned char[APRS_DATA_LENGTH]; m_buffer = new unsigned char[SLOW_DATA_BLOCK_LENGTH]; } @@ -57,16 +53,16 @@ CAPRSCollector::~CAPRSCollector() { delete[] m_ggaData; delete[] m_rmcData; - delete[] m_csData; delete[] m_crcData; - delete[] m_txtData; delete[] m_buffer; } -bool CAPRSCollector::writeData(const unsigned char* data) +bool CAPRSCollector::writeData(const wxString& callsign, const unsigned char* data) { wxASSERT(data != NULL); + m_callsign = callsign; + switch (m_slowData) { case SS_FIRST: m_buffer[0U] = data[0U] ^ SCRAMBLER_BYTE1; @@ -83,12 +79,6 @@ bool CAPRSCollector::writeData(const unsigned char* data) break; } - CUtils::dump(wxT("Slow data received"), m_buffer, 6U); - - // Is it slow text data? - if ((m_buffer[0U] & SLOW_DATA_TYPE_MASK) == SLOW_DATA_TYPE_TEXT) - addTextData(m_buffer); - // Is it GPS data? if ((m_buffer[0U] & SLOW_DATA_TYPE_MASK) == SLOW_DATA_TYPE_GPS) return addGPSData(m_buffer + 1U); @@ -103,14 +93,11 @@ void CAPRSCollector::reset() m_ggaValid = false; m_rmcLength = 0U; m_rmcValid = false; - m_csLength = 0U; - m_csValid = false; m_crcLength = 0U; m_crcValid = false; - m_txtLength = 0U; - m_txtValid = false; m_slowData = SS_FIRST; m_collector.Clear(); + m_callsign.Clear(); } void CAPRSCollector::sync() @@ -128,10 +115,7 @@ bool CAPRSCollector::addGPSData(const unsigned char* data) addGGAData(); return false; } else if (m_state == AS_RMC) { - addRMCData(); - return false; - } else if (m_state == AS_CS) { - return addCSData(); + return addRMCData(); } else if (m_state == AS_CRC) { return addCRCData(); } @@ -142,15 +126,11 @@ bool CAPRSCollector::addGPSData(const unsigned char* data) m_ggaValid = false; m_rmcLength = 0U; m_rmcValid = false; - m_txtLength = 0U; - m_txtValid = false; return false; } else if (m_state != AS_RMC && m_collector.Find(wxT("$GPRMC")) != wxNOT_FOUND) { m_state = AS_RMC; m_rmcLength = 0U; m_rmcValid = false; - m_txtLength = 0U; - m_txtValid = false; return false; } else if (m_state != AS_CRC && m_collector.Find(wxT("$$CRC")) != wxNOT_FOUND) { m_state = AS_CRC; @@ -192,11 +172,11 @@ void CAPRSCollector::addGGAData() bool ret = checkXOR(m_ggaData + 1U, m_ggaLength - 1U); if (ret) { - CUtils::dump(wxT("$GPGGA Valid"), m_ggaData, m_ggaLength); + // CUtils::dump(wxT("$GPGGA Valid"), m_ggaData, m_ggaLength); m_ggaValid = true; m_state = AS_RMC; } else { - CUtils::dump(wxT("$GPGGA Bad checksum"), m_ggaData, m_ggaLength); + // CUtils::dump(wxT("$GPGGA Bad checksum"), m_ggaData, m_ggaLength); m_ggaLength = 0U; m_ggaValid = false; m_state = AS_RMC; @@ -205,18 +185,18 @@ void CAPRSCollector::addGGAData() m_collector = m_collector.Mid(n2); } -void CAPRSCollector::addRMCData() +bool CAPRSCollector::addRMCData() { int n2 = m_collector.Find(wxT('\x0A'), true); if (n2 == wxNOT_FOUND) - return; + return false; int n1 = m_collector.Find(wxT("$GPRMC")); if (n1 == wxNOT_FOUND) - return; + return false; if (n2 < n1) - return; + return false; unsigned int len = n2 - n1; @@ -224,7 +204,7 @@ void CAPRSCollector::addRMCData() m_rmcLength = 0U; m_rmcValid = false; m_state = AS_NONE; - return; + return false; } m_rmcLength = 0U; @@ -236,44 +216,17 @@ void CAPRSCollector::addRMCData() bool ret = checkXOR(m_rmcData + 1U, m_rmcLength - 1U); if (ret) { - CUtils::dump(wxT("$GPRMC Valid"), m_rmcData, m_rmcLength); + // CUtils::dump(wxT("$GPRMC Valid"), m_rmcData, m_rmcLength); m_rmcValid = true; - m_state = AS_CS; } else { - CUtils::dump(wxT("$GPRMC Bad checksum"), m_rmcData, m_rmcLength); + // CUtils::dump(wxT("$GPRMC Bad checksum"), m_rmcData, m_rmcLength); m_rmcLength = 0U; m_rmcValid = false; - m_state = AS_CS; } m_collector = m_collector.Mid(n2); -} -bool CAPRSCollector::addCSData() -{ - int n = m_collector.Find(wxT(' ')); - if (n == wxNOT_FOUND) - return false; - - if (n >= APRS_DATA_LENGTH) { - m_csLength = 0U; - m_csValid = false; - m_state = AS_NONE; - return false; - } - - m_csLength = 0U; - for (int i = 1; i < n; i++) { - m_csData[m_csLength] = m_collector.GetChar(i); - m_csData[m_csLength] &= 0x7FU; - m_csLength++; - } - - CUtils::dump(wxT("Callsign Valid"), m_csData, m_csLength); - m_csValid = true; - m_state = AS_NONE; - - m_collector = m_collector.Mid(n); + m_state = AS_NONE; return true; } @@ -308,13 +261,13 @@ bool CAPRSCollector::addCRCData() bool ret = checkCRC(m_crcData, m_crcLength); if (ret) { - CUtils::dump(wxT("$$CRC Valid"), m_crcData, m_crcLength); + // CUtils::dump(wxT("$$CRC Valid"), m_crcData, m_crcLength); m_crcValid = true; m_state = AS_NONE; m_collector = m_collector.Mid(n2); return true; } else { - CUtils::dump(wxT("$$CRC Bad checksum"), m_crcData, m_crcLength); + // CUtils::dump(wxT("$$CRC Bad checksum"), m_crcData, m_crcLength); m_crcLength = 0U; m_crcValid = false; m_state = AS_NONE; @@ -323,31 +276,6 @@ bool CAPRSCollector::addCRCData() } } -void CAPRSCollector::addTextData(const unsigned char* data) -{ - unsigned char pos = data[0U] & 0x0FU; - if (pos > 3U) - return; - - pos *= 5U; - - for (unsigned int i = 1U; i < 6U; i++) { - unsigned char c = data[i]; - - m_txtData[pos] = c & 0x7FU; - pos++; - - bool ret = checkXOR(m_txtData, 20U); - if (ret) { - CUtils::dump(wxT("Text Valid"), m_txtData, 20U); - m_state = AS_NONE; - m_txtValid = true; - m_txtLength = 20U; - return; - } - } -} - unsigned int CAPRSCollector::getData(unsigned char* data, unsigned int length) { wxASSERT(data != NULL); @@ -366,34 +294,26 @@ unsigned int CAPRSCollector::getData(unsigned char* data, unsigned int length) return len; } - // Have we got GGA and text data? - if (m_ggaValid && m_txtValid) { + // Have we got GGA data? + if (m_ggaValid) { unsigned int len = convertNMEA1(data, length); m_ggaLength = 0U; m_rmcLength = 0U; - m_csLength = 0U; - m_txtLength = 0U; m_ggaValid = false; m_rmcValid = false; - m_csValid = false; - m_txtValid = false; return len; } - // Have we got RMC and text data? - if (m_rmcValid && m_txtValid) { + // Have we got RMC data? + if (m_rmcValid) { unsigned int len = convertNMEA2(data, length); m_ggaLength = 0U; m_rmcLength = 0U; - m_csLength = 0U; - m_txtLength = 0U; m_ggaValid = false; m_rmcValid = false; - m_csValid = false; - m_txtValid = false; return len; } @@ -496,24 +416,14 @@ unsigned int CAPRSCollector::convertNMEA1(unsigned char* data, unsigned int) char callsign[10U]; ::memset(callsign, ' ', 10U); - ::strncpy(callsign, (char*)m_txtData, 7U); + for (unsigned int i = 0U; i < m_callsign.Len(); i++) + callsign[i] = m_callsign.GetChar(i); // This can't fail! char* p = ::strchr(callsign, ' '); - - if (m_txtData[6U] == ' ' && m_txtData[7U] != ' ') { - *p++ = '-'; - *p++ = m_txtData[7U]; - } else if (m_txtData[6U] != ' ' && m_txtData[7U] != ' ') { - *p++ = m_txtData[7U]; - } - *p = '\0'; - char symbol, overlay; - getSymbol(m_txtData + 9U, symbol, overlay); - - ::sprintf((char*)data, "%s>APDPRS,DSTAR*:!%.7s%s%c%.8s%s%c", callsign, pGGA[2U], pGGA[3U], overlay, pGGA[4U], pGGA[5U], symbol); + ::sprintf((char*)data, "%s>APDPRS,DSTAR*:!%.7s%s%c%.8s%s%c", callsign, pGGA[2U], pGGA[3U], APRS_OVERLAY, pGGA[4U], pGGA[5U], APRS_SYMBOL); // Get the bearing and speed from the RMC data if (m_rmcValid) { @@ -540,21 +450,6 @@ unsigned int CAPRSCollector::convertNMEA1(unsigned char* data, unsigned int) } } - ::strcat((char*)data, " "); - - // Insert the message text - unsigned int j = ::strlen((char*)data); - for (unsigned int i = 13U; i < 29U; i++) { - unsigned char c = m_txtData[i]; - - if (c == '*') { - data[j] = '\0'; - break; - } - - data[j++] = c; - } - if (pGGA[9U] != NULL && ::strlen(pGGA[9U]) > 0U) { // Convert altitude from metres to feet int altitude = ::atoi(pGGA[9U]); @@ -590,24 +485,14 @@ unsigned int CAPRSCollector::convertNMEA2(unsigned char* data, unsigned int) char callsign[10U]; ::memset(callsign, ' ', 10U); - ::strncpy(callsign, (char*)m_txtData, 7U); + for (unsigned int i = 0U; i < m_callsign.Len(); i++) + callsign[i] = m_callsign.GetChar(i); // This can't fail! char* p = ::strchr(callsign, ' '); - - if (m_txtData[6U] == ' ' && m_txtData[7U] != ' ') { - *p++ = '-'; - *p++ = m_txtData[7U]; - } else if (m_txtData[6U] != ' ' && m_txtData[7U] != ' ') { - *p++ = m_txtData[7U]; - } - *p = '\0'; - char symbol, overlay; - getSymbol(m_txtData + 9U, symbol, overlay); - - ::sprintf((char*)data, "%s>APDPRS,DSTAR*:!%.7s%s%c%.8s%s%c", callsign, pRMC[3U], pRMC[4U], overlay, pRMC[5U], pRMC[6U], symbol); + ::sprintf((char*)data, "%s>APDPRS,DSTAR*:!%.7s%s%c%.8s%s%c", callsign, pRMC[3U], pRMC[4U], APRS_OVERLAY, pRMC[5U], pRMC[6U], APRS_SYMBOL); if (pRMC[7U] != NULL && pRMC[8U] != NULL && ::strlen(pRMC[7U]) > 0U && ::strlen(pRMC[8U]) > 0U) { int bearing = ::atoi(pRMC[8U]); @@ -616,110 +501,9 @@ unsigned int CAPRSCollector::convertNMEA2(unsigned char* data, unsigned int) ::sprintf((char*)data + ::strlen((char*)data), "%03d/%03d", bearing, speed); } - if (m_txtLength == 20U) { - ::strcat((char*)data, " "); - - // Insert the message text - unsigned int j = ::strlen((char*)data); - for (unsigned int i = 2U; i < 20U; i++) { - unsigned char c = m_txtData[i]; - - if (c == '*') { - data[j] = '\0'; - break; - } - - data[j++] = c; - } - } else { - if (m_txtData[13U] != '*') - ::strcat((char*)data, " "); - - // Insert the message text - unsigned int j = ::strlen((char*)data); - for (unsigned int i = 13U; i < 29U; i++) { - unsigned char c = m_txtData[i]; - - if (c == '*') { - data[j] = '\0'; - break; - } - - data[j++] = c; - } - } - return ::strlen((char*)data); } -// Function taken from DPRSIntf.java from Pete Loveall AE5PL -void CAPRSCollector::getSymbol(const unsigned char* data, char& symbol, char& overlay) -{ - symbol = '.'; - - if (data[3U] == ' ') { - int offset = -1; - - switch (data[0U]) { - case 'B': - case 'O': - offset = -33; - break; - case 'P': - case 'A': - offset = 0; - break; - case 'M': - case 'N': - offset = -24; - break; - case 'H': - case 'D': - offset = 8; - break; - case 'L': - case 'S': - offset = 32; - break; - case 'J': - case 'Q': - offset = 74; - break; - default: - break; - } - - if (offset != -1 && ::isalnum(data[1U])) { - bool altIcons = false; - - // x is valid, lets get y - switch (data[0U]) { - case 'O': - case 'A': - case 'N': - case 'D': - case 'S': - case 'Q': - altIcons = true; - break; - } - - symbol = char(data[1U] + offset); - - overlay = '/'; - - if (altIcons) { - if (data[2] == ' ') - overlay = '\\'; - else if (::isalnum(data[2])) - overlay = data[2U]; - else - overlay = 0; - } - } - } -} - // Source found at char* CAPRSCollector::mystrsep(char** sp, const char* sep) const { diff --git a/Common/APRSCollector.h b/Common/APRSCollector.h index 7c8261f..85bd3da 100644 --- a/Common/APRSCollector.h +++ b/Common/APRSCollector.h @@ -27,7 +27,6 @@ enum APRS_STATE { AS_NONE, AS_GGA, AS_RMC, - AS_CS, AS_CRC }; @@ -36,7 +35,7 @@ public: CAPRSCollector(); ~CAPRSCollector(); - bool writeData(const unsigned char* data); + bool writeData(const wxString& callsign, const unsigned char* data); void sync(); @@ -52,25 +51,18 @@ private: unsigned char* m_rmcData; unsigned int m_rmcLength; bool m_rmcValid; - unsigned char* m_csData; - unsigned int m_csLength; - bool m_csValid; unsigned char* m_crcData; unsigned int m_crcLength; bool m_crcValid; - unsigned char* m_txtData; - unsigned int m_txtLength; - bool m_txtValid; unsigned char* m_buffer; SLOWDATA_STATE m_slowData; wxString m_collector; + wxString m_callsign; bool addGPSData(const unsigned char* data); - void addTextData(const unsigned char* data); void addGGAData(); - void addRMCData(); - bool addCSData(); + bool addRMCData(); bool addCRCData(); bool checkXOR(const unsigned char* data, unsigned int length) const; @@ -82,8 +74,6 @@ private: unsigned int convertNMEA1(unsigned char* data, unsigned int length); unsigned int convertNMEA2(unsigned char* data, unsigned int length); - void getSymbol(const unsigned char* data, char& symbol, char& overlay); - char* mystrsep(char** sp, const char* sep) const; }; diff --git a/Common/APRSWriter.cpp b/Common/APRSWriter.cpp index ae5d6a0..d34ab3c 100644 --- a/Common/APRSWriter.cpp +++ b/Common/APRSWriter.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2014 by Jonathan Naylor G4KLX + * Copyright (C) 2010-2014,2018 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 @@ -118,9 +118,8 @@ bool CAPRSEntry::isOK() } } -CAPRSWriter::CAPRSWriter(const wxString& hostname, unsigned int port, const wxString& gateway, const wxString& address) : +CAPRSWriter::CAPRSWriter(const wxString& hostname, unsigned int port, const wxString& gateway, const wxString& password, const wxString& address) : m_thread(NULL), -m_enabled(false), m_idTimer(1000U, 20U * 60U), // 20 minutes m_gateway(), m_array() @@ -128,8 +127,9 @@ m_array() wxASSERT(!hostname.IsEmpty()); wxASSERT(port > 0U); wxASSERT(!gateway.IsEmpty()); + wxASSERT(!password.IsEmpty()); - m_thread = new CAPRSWriterThread(gateway, address, hostname, port); + m_thread = new CAPRSWriterThread(gateway, password, address, hostname, port); m_gateway = gateway; m_gateway.Truncate(LONG_CALLSIGN_LENGTH - 1U); @@ -179,15 +179,10 @@ void CAPRSWriter::writeData(const wxString& callsign, const CAMBEData& data) unsigned char buffer[400U]; data.getData(buffer, DV_FRAME_MAX_LENGTH_BYTES); - bool complete = collector->writeData(buffer + VOICE_FRAME_LENGTH_BYTES); + bool complete = collector->writeData(callsign, buffer + VOICE_FRAME_LENGTH_BYTES); if (!complete) return; - if (!m_enabled) { - collector->reset(); - return; - } - if (!m_thread->isConnected()) { collector->reset(); return; @@ -246,16 +241,6 @@ void CAPRSWriter::reset(const wxString& callsign) entry->reset(); } -void CAPRSWriter::setEnabled(bool enabled) -{ - m_enabled = enabled; - - if (m_enabled) { - sendIdFrames(); - m_idTimer.start(); - } -} - void CAPRSWriter::clock(unsigned int ms) { m_idTimer.clock(ms); diff --git a/Common/APRSWriter.h b/Common/APRSWriter.h index 8eb1bf6..bf7f607 100644 --- a/Common/APRSWriter.h +++ b/Common/APRSWriter.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010,2011,2012 by Jonathan Naylor G4KLX + * Copyright (C) 2010,2011,2012,2018 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 @@ -66,7 +66,7 @@ WX_DECLARE_STRING_HASH_MAP(CAPRSEntry*, CEntry_t); class CAPRSWriter { public: - CAPRSWriter(const wxString& hostname, unsigned int port, const wxString& gateway, const wxString& address); + CAPRSWriter(const wxString& hostname, unsigned int port, const wxString& gateway, const wxString& password, const wxString& address); ~CAPRSWriter(); bool open(); @@ -77,8 +77,6 @@ public: void reset(const wxString& callsign); - void setEnabled(bool enable); - bool isConnected() const; void clock(unsigned int ms); @@ -87,7 +85,6 @@ public: private: CAPRSWriterThread* m_thread; - bool m_enabled; CTimer m_idTimer; wxString m_gateway; CEntry_t m_array; diff --git a/Common/APRSWriterThread.cpp b/Common/APRSWriterThread.cpp index dfaf250..6c97d62 100644 --- a/Common/APRSWriterThread.cpp +++ b/Common/APRSWriterThread.cpp @@ -25,9 +25,10 @@ const unsigned int APRS_TIMEOUT = 10U; -CAPRSWriterThread::CAPRSWriterThread(const wxString& callsign, const wxString& address, const wxString& hostname, unsigned int port) : +CAPRSWriterThread::CAPRSWriterThread(const wxString& callsign, const wxString& password, const wxString& address, const wxString& hostname, unsigned int port) : wxThread(wxTHREAD_JOINABLE), m_username(callsign), +m_password(password), m_ssid(callsign), m_socket(hostname, port, address), m_queue(20U), @@ -38,6 +39,7 @@ m_filter(wxT("")), m_clientName(wxT("ircDDBGateway")) { wxASSERT(!callsign.IsEmpty()); + wxASSERT(!password.IsEmpty()); wxASSERT(!hostname.IsEmpty()); wxASSERT(port > 0U); @@ -48,9 +50,10 @@ m_clientName(wxT("ircDDBGateway")) m_ssid = m_ssid.SubString(LONG_CALLSIGN_LENGTH - 1U, 1); } -CAPRSWriterThread::CAPRSWriterThread(const wxString& callsign, const wxString& address, const wxString& hostname, unsigned int port, const wxString& filter, const wxString& clientName) : +CAPRSWriterThread::CAPRSWriterThread(const wxString& callsign, const wxString& password, const wxString& address, const wxString& hostname, unsigned int port, const wxString& filter, const wxString& clientName) : wxThread(wxTHREAD_JOINABLE), m_username(callsign), +m_password(password), m_ssid(callsign), m_socket(hostname, port, address), m_queue(20U), @@ -61,6 +64,7 @@ m_filter(filter), m_clientName(clientName) { wxASSERT(!callsign.IsEmpty()); + wxASSERT(!password.IsEmpty()); wxASSERT(!hostname.IsEmpty()); wxASSERT(port > 0U); @@ -74,6 +78,7 @@ m_clientName(clientName) CAPRSWriterThread::~CAPRSWriterThread() { m_username.Clear(); + m_password.Clear(); } bool CAPRSWriterThread::start() @@ -198,8 +203,6 @@ void CAPRSWriterThread::stop() bool CAPRSWriterThread::connect() { - unsigned int password = getAPRSPassword(m_username); - bool ret = m_socket.open(); if (!ret) return false; @@ -217,7 +220,7 @@ bool CAPRSWriterThread::connect() wxString filter(m_filter); if (filter.Length() > 0) filter.Prepend(wxT(" filter ")); - wxString connectString = wxString::Format(wxT("user %s-%s pass %u vers %s%s\n"), m_username.c_str(), m_ssid.c_str(), password, + wxString connectString = wxString::Format(wxT("user %s-%s pass %s vers %s%s\n"), m_username.c_str(), m_ssid.c_str(), m_password.c_str(), (m_clientName.Length() ? m_clientName : wxT("ircDDBGateway")).c_str(), filter.c_str()); //wxLogMessage(wxT("Connect String : ") + connectString); @@ -227,7 +230,6 @@ bool CAPRSWriterThread::connect() return false; } - length = m_socket.readLine(serverResponse, APRS_TIMEOUT); if (length == 0) { wxLogError(wxT("No reply from the APRS server after %u seconds"), APRS_TIMEOUT); @@ -246,18 +248,3 @@ bool CAPRSWriterThread::connect() return true; } - -unsigned int CAPRSWriterThread::getAPRSPassword(wxString callsign) const -{ - unsigned int len = callsign.Length(); - - wxUint16 hash = 0x73E2U; - - for (unsigned int i = 0U; i < len; i += 2U) { - hash ^= (char)callsign.GetChar(i) << 8; - if(i + 1 < len) - hash ^= (char)callsign.GetChar(i + 1); - } - - return hash & 0x7FFFU; -} diff --git a/Common/APRSWriterThread.h b/Common/APRSWriterThread.h index 1e31254..cdac160 100644 --- a/Common/APRSWriterThread.h +++ b/Common/APRSWriterThread.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010,2011,2012 by Jonathan Naylor G4KLX + * Copyright (C) 2010,2011,2012,2018 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 @@ -27,8 +27,8 @@ typedef void (*ReadAPRSFrameCallback)(const wxString&); class CAPRSWriterThread : public wxThread { public: - CAPRSWriterThread(const wxString& callsign, const wxString& address, const wxString& hostname, unsigned int port); - CAPRSWriterThread(const wxString& callsign, const wxString& address, const wxString& hostname, unsigned int port, const wxString& filter, const wxString& clientName); + CAPRSWriterThread(const wxString& callsign, const wxString& password, const wxString& address, const wxString& hostname, unsigned int port); + CAPRSWriterThread(const wxString& callsign, const wxString& password, const wxString& address, const wxString& hostname, unsigned int port, const wxString& filter, const wxString& clientName); virtual ~CAPRSWriterThread(); virtual bool start(); @@ -45,6 +45,7 @@ public: private: wxString m_username; + wxString m_password; wxString m_ssid; CTCPReaderWriterClient m_socket; CRingBuffer m_queue; @@ -55,7 +56,6 @@ private: wxString m_clientName; bool connect(); - unsigned int getAPRSPassword(wxString username) const; }; #endif diff --git a/Common/IRCDDBGatewayConfig.cpp b/Common/IRCDDBGatewayConfig.cpp index 9e97d14..cbcd5e6 100644 --- a/Common/IRCDDBGatewayConfig.cpp +++ b/Common/IRCDDBGatewayConfig.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2015 by Jonathan Naylor G4KLX + * Copyright (C) 2010-2015,2018 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 @@ -129,6 +129,7 @@ const wxString KEY_IRCDDB_HOSTNAME4 = wxT("ircddbHostname4"); const wxString KEY_IRCDDB_USERNAME4 = wxT("ircddbUsername4"); const wxString KEY_IRCDDB_PASSWORD4 = wxT("ircddbPassword4"); const wxString KEY_APRS_ENABLED = wxT("aprsEnabled"); +const wxString KEY_APRS_PASSWORD = wxT("aprsPassword"); const wxString KEY_APRS_HOSTNAME = wxT("aprsHostname"); const wxString KEY_APRS_PORT = wxT("aprsPort"); const wxString KEY_DEXTRA_ENABLED = wxT("dextraEnabled"); @@ -139,7 +140,7 @@ const wxString KEY_DPLUS_LOGIN = wxT("dplusLogin"); const wxString KEY_DCS_ENABLED = wxT("dcsEnabled"); const wxString KEY_CCS_ENABLED = wxT("ccsEnabled"); const wxString KEY_CCS_HOST = wxT("ccsHost"); -const wxString KEY_XLX_ENABLED = wxT("xlxEnabled"); +const wxString KEY_XLX_ENABLED = wxT("xlxEnabled"); const wxString KEY_XLX_OVERRIDE_LOCAL = wxT("xlxOverrideLocal"); const wxString KEY_XLX_HOSTS_FILE_URL = wxT("xlxHostsFileUrl"); const wxString KEY_STARNET_BAND1 = wxT("starNetBand1"); @@ -250,7 +251,8 @@ const bool DEFAULT_IRCDDB_ENABLED4 = false; const wxString DEFAULT_IRCDDB_HOSTNAME4 = wxEmptyString; const wxString DEFAULT_IRCDDB_USERNAME4 = wxEmptyString; const wxString DEFAULT_IRCDDB_PASSWORD4 = wxEmptyString; -const bool DEFAULT_APRS_ENABLED = true; +const bool DEFAULT_APRS_ENABLED = false; +const wxString DEFAULT_APRS_PASSWORD = wxT("00000"); const wxString DEFAULT_APRS_HOSTNAME = wxT("rotate.aprs2.net"); const unsigned int DEFAULT_APRS_PORT = 14580U; const bool DEFAULT_DEXTRA_ENABLED = true; @@ -261,8 +263,8 @@ const wxString DEFAULT_DPLUS_LOGIN = wxEmptyString; const bool DEFAULT_DCS_ENABLED = true; const bool DEFAULT_CCS_ENABLED = true; const wxString DEFAULT_CCS_HOST = wxT("CCS704 "); -const bool DEFAULT_XLX_ENABLED = true; -const bool DEFAULT_XLX_OVERRIDE_LOCAL = true; +const bool DEFAULT_XLX_ENABLED = true; +const bool DEFAULT_XLX_OVERRIDE_LOCAL = true; const wxString DEFAULT_XLX_HOSTS_FILE_URL = _T("http://xlxapi.rlx.lu/api.php?do=GetReflectorHostname"); const wxString DEFAULT_STARNET_BAND = wxEmptyString; const wxString DEFAULT_STARNET_CALLSIGN = wxEmptyString; @@ -402,6 +404,7 @@ m_ircddbHostname4(DEFAULT_IRCDDB_HOSTNAME4), m_ircddbUsername4(DEFAULT_IRCDDB_USERNAME4), m_ircddbPassword4(DEFAULT_IRCDDB_PASSWORD4), m_aprsEnabled(DEFAULT_APRS_ENABLED), +m_aprsPassword(DEFAULT_APRS_PASSWORD), m_aprsHostname(DEFAULT_APRS_HOSTNAME), m_aprsPort(DEFAULT_APRS_PORT), m_dextraEnabled(DEFAULT_DEXTRA_ENABLED), @@ -723,6 +726,8 @@ m_y(DEFAULT_WINDOW_Y) m_config->Read(m_name + KEY_APRS_ENABLED, &m_aprsEnabled, DEFAULT_APRS_ENABLED); + m_config->Read(m_name + KEY_APRS_PASSWORD, &m_aprsPassword, DEFAULT_APRS_PASSWORD); + m_config->Read(m_name + KEY_APRS_HOSTNAME, &m_aprsHostname, DEFAULT_APRS_HOSTNAME); m_config->Read(m_name + KEY_APRS_PORT, &temp, long(DEFAULT_APRS_PORT)); @@ -1012,6 +1017,7 @@ m_ircddbHostname4(DEFAULT_IRCDDB_HOSTNAME4), m_ircddbUsername4(DEFAULT_IRCDDB_USERNAME4), m_ircddbPassword4(DEFAULT_IRCDDB_PASSWORD4), m_aprsEnabled(DEFAULT_APRS_ENABLED), +m_aprsPassword(DEFAULT_APRS_PASSWORD), m_aprsHostname(DEFAULT_APRS_HOSTNAME), m_aprsPort(DEFAULT_APRS_PORT), m_dextraEnabled(DEFAULT_DEXTRA_ENABLED), @@ -1381,6 +1387,8 @@ m_y(DEFAULT_WINDOW_Y) } else if (key.IsSameAs(KEY_APRS_ENABLED)) { val.ToLong(&temp1); m_aprsEnabled = temp1 == 1L; + } else if (key.IsSameAs(KEY_APRS_PASSWORD)) { + m_aprsPassword = val; } else if (key.IsSameAs(KEY_APRS_HOSTNAME)) { m_aprsHostname = val; } else if (key.IsSameAs(KEY_APRS_PORT)) { @@ -1877,16 +1885,18 @@ void CIRCDDBGatewayConfig::setIrcDDB4(bool enabled, const wxString& hostname, co m_ircddbPassword4 = password; } -void CIRCDDBGatewayConfig::getDPRS(bool& enabled, wxString& hostname, unsigned int& port) const +void CIRCDDBGatewayConfig::getDPRS(bool& enabled, wxString& password, wxString& hostname, unsigned int& port) const { enabled = m_aprsEnabled; + password = m_aprsPassword; hostname = m_aprsHostname; port = m_aprsPort; } -void CIRCDDBGatewayConfig::setDPRS(bool enabled, const wxString& hostname, unsigned int port) +void CIRCDDBGatewayConfig::setDPRS(bool enabled, const wxString& password, const wxString& hostname, unsigned int port) { m_aprsEnabled = enabled; + m_aprsPassword = password; m_aprsHostname = hostname; m_aprsPort = port; } @@ -2356,6 +2366,7 @@ bool CIRCDDBGatewayConfig::write() m_config->Write(m_name + KEY_IRCDDB_USERNAME4, m_ircddbUsername4); m_config->Write(m_name + KEY_IRCDDB_PASSWORD4, m_ircddbPassword4); m_config->Write(m_name + KEY_APRS_ENABLED, m_aprsEnabled); + m_config->Write(m_name + KEY_APRS_PASSWORD, m_aprsPassword); m_config->Write(m_name + KEY_APRS_HOSTNAME, m_aprsHostname); m_config->Write(m_name + KEY_APRS_PORT, long(m_aprsPort)); m_config->Write(m_name + KEY_DEXTRA_ENABLED, m_dextraEnabled); @@ -2563,6 +2574,7 @@ bool CIRCDDBGatewayConfig::write() buffer.Printf("%s=%s", KEY_IRCDDB_USERNAME4.c_str(), m_ircddbUsername4.c_str()); file.AddLine(buffer); buffer.Printf("%s=%s", KEY_IRCDDB_PASSWORD4.c_str(), m_ircddbPassword4.c_str()); file.AddLine(buffer); buffer.Printf(wxT("%s=%d"), KEY_APRS_ENABLED.c_str(), m_aprsEnabled ? 1 : 0); file.AddLine(buffer); + buffer.Printf(wxT("%s=%s"), KEY_APRS_PASSWORD.c_str(), m_aprsPassword.c_str()); file.AddLine(buffer); buffer.Printf(wxT("%s=%s"), KEY_APRS_HOSTNAME.c_str(), m_aprsHostname.c_str()); file.AddLine(buffer); buffer.Printf(wxT("%s=%u"), KEY_APRS_PORT.c_str(), m_aprsPort); file.AddLine(buffer); buffer.Printf(wxT("%s=%d"), KEY_DEXTRA_ENABLED.c_str(), m_dextraEnabled ? 1 : 0); file.AddLine(buffer); diff --git a/Common/IRCDDBGatewayConfig.h b/Common/IRCDDBGatewayConfig.h index f1c8ca2..09e8921 100644 --- a/Common/IRCDDBGatewayConfig.h +++ b/Common/IRCDDBGatewayConfig.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2014 by Jonathan Naylor G4KLX + * Copyright (C) 2010-2014,2018 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 @@ -59,8 +59,8 @@ public: void setIrcDDB3(bool enabled, const wxString& hostname, const wxString& username, const wxString& password); void setIrcDDB4(bool enabled, const wxString& hostname, const wxString& username, const wxString& password); - void getDPRS(bool& enabled, wxString& hostname, unsigned int& port) const; - void setDPRS(bool enabled, const wxString& hostname, unsigned int port); + void getDPRS(bool& enabled, wxString& password, wxString& hostname, unsigned int& port) const; + void setDPRS(bool enabled, const wxString& password, const wxString& hostname, unsigned int port); void getDExtra(bool& enabled, unsigned int& maxDongles) const; void setDExtra(bool enabled, unsigned int maxDongles); @@ -232,6 +232,7 @@ private: wxString m_ircddbUsername4; wxString m_ircddbPassword4; bool m_aprsEnabled; + wxString m_aprsPassword; wxString m_aprsHostname; unsigned int m_aprsPort; bool m_dextraEnabled; diff --git a/GUICommon/DPRSSet.cpp b/GUICommon/DPRSSet.cpp index 5a99dde..d300a2e 100644 --- a/GUICommon/DPRSSet.cpp +++ b/GUICommon/DPRSSet.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010 by Jonathan Naylor G4KLX + * Copyright (C) 2010,2018 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 @@ -25,10 +25,11 @@ const unsigned int CONTROL_WIDTH2 = 80U; const unsigned int PORT_LENGTH = 5U; const unsigned int PASSWORD_LENGTH = 5U; -CDPRSSet::CDPRSSet(wxWindow* parent, int id, const wxString& title, bool enabled, const wxString& hostname, unsigned int port) : +CDPRSSet::CDPRSSet(wxWindow* parent, int id, const wxString& title, bool enabled, const wxString& password, const wxString& hostname, unsigned int port) : wxPanel(parent, id), m_title(title), m_enabled(NULL), +m_password(NULL), m_hostname(NULL), m_port(NULL) { @@ -43,6 +44,12 @@ m_port(NULL) sizer->Add(m_enabled, 0, wxALL | wxALIGN_LEFT, BORDER_SIZE); m_enabled->SetSelection(enabled ? 1 : 0); + wxStaticText* passwordLabel = new wxStaticText(this, -1, _("Password")); + sizer->Add(passwordLabel, 0, wxALL | wxALIGN_LEFT, BORDER_SIZE); + + m_password = new wxTextCtrl(this, -1, password, wxDefaultPosition, wxSize(CONTROL_WIDTH1, -1)); + sizer->Add(m_password, 0, wxALL | wxALIGN_LEFT, BORDER_SIZE); + wxStaticText* hostnameLabel = new wxStaticText(this, -1, _("Hostname")); sizer->Add(hostnameLabel, 0, wxALL | wxALIGN_LEFT, BORDER_SIZE); @@ -75,6 +82,10 @@ bool CDPRSSet::Validate() if (n == wxNOT_FOUND) return false; + wxString password = m_password->GetValue(); + if (password.IsEmpty()) + return true; + wxString hostname = m_hostname->GetValue(); if (hostname.IsEmpty()) return true; @@ -99,6 +110,11 @@ bool CDPRSSet::getEnabled() const return c == 1; } +wxString CDPRSSet::getPassword() const +{ + return m_password->GetValue(); +} + wxString CDPRSSet::getHostname() const { return m_hostname->GetValue(); diff --git a/GUICommon/DPRSSet.h b/GUICommon/DPRSSet.h index 2d18220..56764f5 100644 --- a/GUICommon/DPRSSet.h +++ b/GUICommon/DPRSSet.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010 by Jonathan Naylor G4KLX + * Copyright (C) 2010,2018 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 @@ -25,18 +25,20 @@ class CDPRSSet : public wxPanel { public: - CDPRSSet(wxWindow* parent, int id, const wxString& title, bool enabled, const wxString& hostname, unsigned int port); + CDPRSSet(wxWindow* parent, int id, const wxString& title, bool enabled, const wxString& password, const wxString& hostname, unsigned int port); virtual ~CDPRSSet(); virtual bool Validate(); virtual bool getEnabled() const; + virtual wxString getPassword() const; virtual wxString getHostname() const; virtual unsigned int getPort() const; private: wxString m_title; wxChoice* m_enabled; + wxTextCtrl* m_password; wxTextCtrl* m_hostname; CPortTextCtrl* m_port; }; diff --git a/ircDDBGateway/IRCDDBGatewayApp.cpp b/ircDDBGateway/IRCDDBGatewayApp.cpp index 9efde78..93fa3ba 100644 --- a/ircDDBGateway/IRCDDBGatewayApp.cpp +++ b/ircDDBGateway/IRCDDBGatewayApp.cpp @@ -254,15 +254,15 @@ void CIRCDDBGatewayApp::createThread() thread->setGateway(gatewayType, gatewayCallsign, gatewayAddress); - wxString aprsHostname; + wxString aprsHostname, aprsPassword; unsigned int aprsPort; bool aprsEnabled; - m_config->getDPRS(aprsEnabled, aprsHostname, aprsPort); + m_config->getDPRS(aprsEnabled, aprsPassword, aprsHostname, aprsPort); wxLogInfo(wxT("APRS enabled: %d, host: %s:%u"), int(aprsEnabled), aprsHostname.c_str(), aprsPort); CAPRSWriter* aprs = NULL; if (aprsEnabled && !gatewayCallsign.IsEmpty() && !aprsHostname.IsEmpty() && aprsPort != 0U) { - aprs = new CAPRSWriter(aprsHostname, aprsPort, gatewayCallsign, gatewayAddress); + aprs = new CAPRSWriter(aprsHostname, aprsPort, gatewayCallsign, aprsPassword, gatewayAddress); bool res = aprs->open(); if (!res) diff --git a/ircDDBGateway/IRCDDBGatewayFrame.cpp b/ircDDBGateway/IRCDDBGatewayFrame.cpp index 6569d8c..bb01e68 100644 --- a/ircDDBGateway/IRCDDBGatewayFrame.cpp +++ b/ircDDBGateway/IRCDDBGatewayFrame.cpp @@ -271,14 +271,10 @@ void CIRCDDBGatewayFrame::onTimer(wxTimerEvent&) } bool dprsStatus = status->getDPRSStatus(); - if (dprsStatus) { - if (ircDDBStatus == IS_CONNECTED || ircDDBStatus == IS_DISABLED) - m_dprsStatus->SetLabel(_("Active")); - else - m_dprsStatus->SetLabel(_("Waiting")); - } else { + if (dprsStatus) + m_dprsStatus->SetLabel(_("Active")); + else m_dprsStatus->SetLabel(_("Inactive")); - } for (unsigned int i = 0U; i < 4U; i++) { wxString callsign = status->getCallsign(i); diff --git a/ircDDBGateway/IRCDDBGatewayThread.cpp b/ircDDBGateway/IRCDDBGatewayThread.cpp index 9b9f830..917fb98 100644 --- a/ircDDBGateway/IRCDDBGatewayThread.cpp +++ b/ircDDBGateway/IRCDDBGatewayThread.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2015 by Jonathan Naylor G4KLX + * Copyright (C) 2010-2015,2018 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 @@ -318,10 +318,6 @@ void CIRCDDBGatewayThread::run() CCCSHandler::setHeaderLogger(headerLogger); CCCSHandler::setHost(m_ccsHost); - // If no ircDDB then APRS is started immediately - if (m_aprsWriter != NULL && m_irc == NULL) - m_aprsWriter->setEnabled(true); - if (m_remoteEnabled && !m_remotePassword.IsEmpty() && m_remotePort > 0U) { m_remote = new CRemoteHandler(m_remotePassword, m_remotePort, m_gatewayAddress); bool res = m_remote->open(); @@ -689,24 +685,18 @@ void CIRCDDBGatewayThread::processIrcDDB() if (m_lastStatus != IS_DISCONNECTED) { wxLogInfo(wxT("Disconnected from ircDDB")); m_lastStatus = IS_DISCONNECTED; - if (m_aprsWriter != NULL) - m_aprsWriter->setEnabled(false); } break; case 7: if (m_lastStatus != IS_CONNECTED) { wxLogInfo(wxT("Connected to ircDDB")); m_lastStatus = IS_CONNECTED; - if (m_aprsWriter != NULL) - m_aprsWriter->setEnabled(true); } break; default: if (m_lastStatus != IS_CONNECTING) { wxLogInfo(wxT("Connecting to ircDDB")); m_lastStatus = IS_CONNECTING; - if (m_aprsWriter != NULL) - m_aprsWriter->setEnabled(false); } break; } diff --git a/ircDDBGatewayConfig/IRCDDBGatewayConfigFrame.cpp b/ircDDBGatewayConfig/IRCDDBGatewayConfigFrame.cpp index 1710617..2b10e6d 100644 --- a/ircDDBGatewayConfig/IRCDDBGatewayConfigFrame.cpp +++ b/ircDDBGatewayConfig/IRCDDBGatewayConfigFrame.cpp @@ -194,12 +194,12 @@ m_miscellaneous(NULL) m_ircDDB4 = new CIRCDDBGatewayConfigIrcDDBSet(noteBook, -1, APPLICATION_NAME, ircDDBEnabled, ircDDBHostname, ircDDBUsername, ircDDBPassword); noteBook->AddPage(m_ircDDB4, wxT("ircDDB 4th Network"), false); - wxString aprsHostname; + wxString aprsHostname, aprsPassword; unsigned int aprsPort; bool aprsEnabled; - m_config->getDPRS(aprsEnabled, aprsHostname, aprsPort); + m_config->getDPRS(aprsEnabled, aprsPassword, aprsHostname, aprsPort); - m_dprs = new CDPRSSet(noteBook, -1, APPLICATION_NAME, aprsEnabled, aprsHostname, aprsPort); + m_dprs = new CDPRSSet(noteBook, -1, APPLICATION_NAME, aprsEnabled, aprsPassword, aprsHostname, aprsPort); noteBook->AddPage(m_dprs, wxT("D-PRS"), false); m_dextra = new CDExtraSet(noteBook, -1, APPLICATION_NAME, dextraEnabled, maxDExtraDongles, MAX_DEXTRA_LINKS); @@ -497,9 +497,10 @@ void CIRCDDBGatewayConfigFrame::onSave(wxCommandEvent&) m_config->setIrcDDB4(ircDDBEnabled, ircDDBHostname, ircDDBUsername, ircDDBPassword); bool aprsEnabled = m_dprs->getEnabled(); + wxString aprsPassword = m_dprs->getPassword(); wxString aprsHostname = m_dprs->getHostname(); unsigned int aprsPort = m_dprs->getPort(); - m_config->setDPRS(aprsEnabled, aprsHostname, aprsPort); + m_config->setDPRS(aprsEnabled, aprsPassword, aprsHostname, aprsPort); bool dextraEnabled = m_dextra->getEnabled(); unsigned int maxDExtraDongles = m_dextra->getMaxDongles(); From 6768ef0adfd066bec6a4c5bb9f0320b455d2b06b Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Wed, 27 Jun 2018 06:55:10 +0100 Subject: [PATCH 003/166] Fix up APRSTransmitD after APRS changes. --- APRSTransmit/APRSTransmitAppD.cpp | 24 +++++++++++++++--------- APRSTransmit/APRSTransmitAppD.h | 6 +++--- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/APRSTransmit/APRSTransmitAppD.cpp b/APRSTransmit/APRSTransmitAppD.cpp index 60f18aa..75be9ca 100644 --- a/APRSTransmit/APRSTransmitAppD.cpp +++ b/APRSTransmit/APRSTransmitAppD.cpp @@ -33,6 +33,7 @@ #endif const wxChar* REPEATER_PARAM = wxT("Repeater"); +const wxChar* APRS_PASSWORD = wxT("password"); const wxChar* APRS_HOST = wxT("host"); const wxChar* APRS_PORT = wxT("port"); const wxChar* APRS_FILTER = wxT("filter"); @@ -61,6 +62,7 @@ int main(int argc, char** argv) wxCmdLineParser parser(argc, argv); parser.AddParam(REPEATER_PARAM, wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL); + parser.AddOption(APRS_PASSWORD, wxEmptyString, wxEmptyString, wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL); parser.AddOption(APRS_HOST, wxEmptyString, wxEmptyString, wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL); parser.AddOption(APRS_PORT, wxEmptyString, wxEmptyString, wxCMD_LINE_VAL_NUMBER, wxCMD_LINE_PARAM_OPTIONAL); parser.AddOption(APRS_FILTER, wxEmptyString, wxEmptyString, wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL); @@ -73,7 +75,7 @@ int main(int argc, char** argv) } if (parser.GetParamCount() < 1U) { - ::fprintf(stderr, "aprstransmitd: invalid command line usage: aprstransmitd [-host ] [-port ] [-filter [; [-password ] [-host ] [-port ] [-filter [;init()) { ::wxUninitialize(); return 1; @@ -162,9 +167,10 @@ int main(int argc, char** argv) -CAPRSTransmitAppD::CAPRSTransmitAppD(const wxString& repeater, const wxString& aprsHost, unsigned int aprsPort, const wxString& aprsFilter, bool daemon) : +CAPRSTransmitAppD::CAPRSTransmitAppD(const wxString& repeater, const wxString& aprsPassword, const wxString& aprsHost, unsigned int aprsPort, const wxString& aprsFilter, bool daemon) : m_aprsFramesQueue(NULL), m_repeater(repeater), +m_aprsPassword(aprsPassword), m_aprsHost(aprsHost), m_aprsFilter(aprsFilter), m_aprsPort(aprsPort), @@ -220,7 +226,7 @@ void CAPRSTransmitAppD::run() if(m_run) return; m_aprsFramesQueue = new CRingBuffer(30U); - m_aprsThread = new CAPRSWriterThread(m_repeater, wxT("0.0.0.0"), m_aprsHost, m_aprsPort, m_aprsFilter, wxT("APRSTransmit 1.1")); + m_aprsThread = new CAPRSWriterThread(m_repeater, m_aprsPassword, wxT("0.0.0.0"), m_aprsHost, m_aprsPort, m_aprsFilter, wxT("APRSTransmit 1.1")); m_aprsThread->setReadAPRSCallback(aprsFrameCallback); m_aprsThread->start(); diff --git a/APRSTransmit/APRSTransmitAppD.h b/APRSTransmit/APRSTransmitAppD.h index 815a16b..0e0c160 100644 --- a/APRSTransmit/APRSTransmitAppD.h +++ b/APRSTransmit/APRSTransmitAppD.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014 by Jonathan Naylor G4KLX + * Copyright (C) 2014,2018 by Jonathan Naylor G4KLX * APRSTransmit Copyright (C) 2015 Geoffrey Merck F4FXL / KC3FRA * * This program is free software; you can redistribute it and/or modify @@ -31,7 +31,7 @@ class CAPRSTransmitAppD { public: - CAPRSTransmitAppD(const wxString& repeater, const wxString& aprsHost, unsigned int aprsPort, const wxString& aprsFilter, bool daemon); + CAPRSTransmitAppD(const wxString& repeater, const wxString& aprsPassword, const wxString& aprsHost, unsigned int aprsPort, const wxString& aprsFilter, bool daemon); ~CAPRSTransmitAppD(); CRingBuffer * m_aprsFramesQueue; @@ -41,7 +41,7 @@ public: void kill(); private: - wxString m_repeater, m_aprsHost, m_aprsFilter; + wxString m_repeater, m_aprsPassword, m_aprsHost, m_aprsFilter; unsigned int m_aprsPort; CAPRSWriterThread * m_aprsThread; bool m_run; From d604ca22b063f52babf8fed8cec21db178e451bc Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Wed, 27 Jun 2018 07:26:37 +0100 Subject: [PATCH 004/166] Fix incorrect handling of multiple ircDDB servers under Windows. --- Common/IRCDDBGatewayConfig.cpp | 118 +++++++++--------- Common/IRCDDBGatewayConfig.h | 12 +- ircDDBGateway/IRCDDBGatewayApp.cpp | 2 +- .../IRCDDBGatewayConfigFrame.cpp | 4 +- 4 files changed, 68 insertions(+), 68 deletions(-) diff --git a/Common/IRCDDBGatewayConfig.cpp b/Common/IRCDDBGatewayConfig.cpp index cbcd5e6..36cb16b 100644 --- a/Common/IRCDDBGatewayConfig.cpp +++ b/Common/IRCDDBGatewayConfig.cpp @@ -112,10 +112,10 @@ const wxString KEY_URL4 = wxT("url4"); const wxString KEY_BAND41 = wxT("band4_1"); const wxString KEY_BAND42 = wxT("band4_2"); const wxString KEY_BAND43 = wxT("band4_3"); -const wxString KEY_IRCDDB_ENABLED = wxT("ircddbEnabled"); -const wxString KEY_IRCDDB_HOSTNAME = wxT("ircddbHostname"); -const wxString KEY_IRCDDB_USERNAME = wxT("ircddbUsername"); -const wxString KEY_IRCDDB_PASSWORD = wxT("ircddbPassword"); +const wxString KEY_IRCDDB_ENABLED1 = wxT("ircddbEnabled"); +const wxString KEY_IRCDDB_HOSTNAME1 = wxT("ircddbHostname"); +const wxString KEY_IRCDDB_USERNAME1 = wxT("ircddbUsername"); +const wxString KEY_IRCDDB_PASSWORD1 = wxT("ircddbPassword"); const wxString KEY_IRCDDB_ENABLED2 = wxT("ircddbEnabled2"); const wxString KEY_IRCDDB_HOSTNAME2 = wxT("ircddbHostname2"); const wxString KEY_IRCDDB_USERNAME2 = wxT("ircddbUsername2"); @@ -235,10 +235,10 @@ const unsigned int DEFAULT_REPEATER_PORT1 = 20011U; const unsigned int DEFAULT_REPEATER_PORT2 = 20012U; const unsigned int DEFAULT_REPEATER_PORT3 = 20013U; const unsigned int DEFAULT_REPEATER_PORT4 = 20014U; -const bool DEFAULT_IRCDDB_ENABLED = true; -const wxString DEFAULT_IRCDDB_HOSTNAME = wxT("group1-irc.ircddb.net"); -const wxString DEFAULT_IRCDDB_USERNAME = wxEmptyString; -const wxString DEFAULT_IRCDDB_PASSWORD = wxEmptyString; +const bool DEFAULT_IRCDDB_ENABLED1 = true; +const wxString DEFAULT_IRCDDB_HOSTNAME1 = wxT("group1-irc.ircddb.net"); +const wxString DEFAULT_IRCDDB_USERNAME1 = wxEmptyString; +const wxString DEFAULT_IRCDDB_PASSWORD1 = wxEmptyString; const bool DEFAULT_IRCDDB_ENABLED2 = true; const wxString DEFAULT_IRCDDB_HOSTNAME2 = wxT("rr.openquad.net"); const wxString DEFAULT_IRCDDB_USERNAME2 = wxEmptyString; @@ -387,10 +387,10 @@ m_repeater4URL(DEFAULT_URL), m_repeater4Band1(DEFAULT_BAND1), m_repeater4Band2(DEFAULT_BAND2), m_repeater4Band3(DEFAULT_BAND3), -m_ircddbEnabled(DEFAULT_IRCDDB_ENABLED), -m_ircddbHostname(DEFAULT_IRCDDB_HOSTNAME), -m_ircddbUsername(DEFAULT_IRCDDB_USERNAME), -m_ircddbPassword(DEFAULT_IRCDDB_PASSWORD), +m_ircddbEnabled1(DEFAULT_IRCDDB_ENABLED1), +m_ircddbHostname1(DEFAULT_IRCDDB_HOSTNAME1), +m_ircddbUsername1(DEFAULT_IRCDDB_USERNAME1), +m_ircddbPassword1(DEFAULT_IRCDDB_PASSWORD1), m_ircddbEnabled2(DEFAULT_IRCDDB_ENABLED2), m_ircddbHostname2(DEFAULT_IRCDDB_HOSTNAME2), m_ircddbUsername2(DEFAULT_IRCDDB_USERNAME2), @@ -704,25 +704,25 @@ m_y(DEFAULT_WINDOW_Y) m_config->Read(m_name + KEY_BAND43, &temp, long(DEFAULT_BAND3)); m_repeater4Band3 = (unsigned char)temp; - m_config->Read(m_name + KEY_IRCDDB_ENABLED, &m_ircddbEnabled, DEFAULT_IRCDDB_ENABLED); - m_config->Read(m_name + KEY_IRCDDB_HOSTNAME, &m_ircddbHostname, DEFAULT_IRCDDB_HOSTNAME); - m_config->Read(m_name + KEY_IRCDDB_USERNAME, &m_ircddbUsername, DEFAULT_IRCDDB_USERNAME); - m_config->Read(m_name + KEY_IRCDDB_PASSWORD, &m_ircddbPassword, DEFAULT_IRCDDB_PASSWORD); + m_config->Read(m_name + KEY_IRCDDB_ENABLED1, &m_ircddbEnabled1, DEFAULT_IRCDDB_ENABLED1); + m_config->Read(m_name + KEY_IRCDDB_HOSTNAME1, &m_ircddbHostname1, DEFAULT_IRCDDB_HOSTNAME1); + m_config->Read(m_name + KEY_IRCDDB_USERNAME1, &m_ircddbUsername1, DEFAULT_IRCDDB_USERNAME1); + m_config->Read(m_name + KEY_IRCDDB_PASSWORD1, &m_ircddbPassword1, DEFAULT_IRCDDB_PASSWORD1); - m_config->Read(m_name + KEY_IRCDDB_ENABLED2, &m_ircddbEnabled, DEFAULT_IRCDDB_ENABLED2); - m_config->Read(m_name + KEY_IRCDDB_HOSTNAME2, &m_ircddbHostname, DEFAULT_IRCDDB_HOSTNAME2); - m_config->Read(m_name + KEY_IRCDDB_USERNAME2, &m_ircddbUsername, DEFAULT_IRCDDB_USERNAME2); - m_config->Read(m_name + KEY_IRCDDB_PASSWORD2, &m_ircddbPassword, DEFAULT_IRCDDB_PASSWORD2); + m_config->Read(m_name + KEY_IRCDDB_ENABLED2, &m_ircddbEnabled2, DEFAULT_IRCDDB_ENABLED2); + m_config->Read(m_name + KEY_IRCDDB_HOSTNAME2, &m_ircddbHostname2, DEFAULT_IRCDDB_HOSTNAME2); + m_config->Read(m_name + KEY_IRCDDB_USERNAME2, &m_ircddbUsername2, DEFAULT_IRCDDB_USERNAME2); + m_config->Read(m_name + KEY_IRCDDB_PASSWORD2, &m_ircddbPassword2, DEFAULT_IRCDDB_PASSWORD2); - m_config->Read(m_name + KEY_IRCDDB_ENABLED3, &m_ircddbEnabled, DEFAULT_IRCDDB_ENABLED3); - m_config->Read(m_name + KEY_IRCDDB_HOSTNAME3, &m_ircddbHostname, DEFAULT_IRCDDB_HOSTNAME3); - m_config->Read(m_name + KEY_IRCDDB_USERNAME3, &m_ircddbUsername, DEFAULT_IRCDDB_USERNAME3); - m_config->Read(m_name + KEY_IRCDDB_PASSWORD3, &m_ircddbPassword, DEFAULT_IRCDDB_PASSWORD3); + m_config->Read(m_name + KEY_IRCDDB_ENABLED3, &m_ircddbEnabled3, DEFAULT_IRCDDB_ENABLED3); + m_config->Read(m_name + KEY_IRCDDB_HOSTNAME3, &m_ircddbHostname3, DEFAULT_IRCDDB_HOSTNAME3); + m_config->Read(m_name + KEY_IRCDDB_USERNAME3, &m_ircddbUsername3, DEFAULT_IRCDDB_USERNAME3); + m_config->Read(m_name + KEY_IRCDDB_PASSWORD3, &m_ircddbPassword3, DEFAULT_IRCDDB_PASSWORD3); - m_config->Read(m_name + KEY_IRCDDB_ENABLED4, &m_ircddbEnabled, DEFAULT_IRCDDB_ENABLED4); - m_config->Read(m_name + KEY_IRCDDB_HOSTNAME4, &m_ircddbHostname, DEFAULT_IRCDDB_HOSTNAME4); - m_config->Read(m_name + KEY_IRCDDB_USERNAME4, &m_ircddbUsername, DEFAULT_IRCDDB_USERNAME4); - m_config->Read(m_name + KEY_IRCDDB_PASSWORD4, &m_ircddbPassword, DEFAULT_IRCDDB_PASSWORD4); + m_config->Read(m_name + KEY_IRCDDB_ENABLED4, &m_ircddbEnabled4, DEFAULT_IRCDDB_ENABLED4); + m_config->Read(m_name + KEY_IRCDDB_HOSTNAME4, &m_ircddbHostname4, DEFAULT_IRCDDB_HOSTNAME4); + m_config->Read(m_name + KEY_IRCDDB_USERNAME4, &m_ircddbUsername4, DEFAULT_IRCDDB_USERNAME4); + m_config->Read(m_name + KEY_IRCDDB_PASSWORD4, &m_ircddbPassword4, DEFAULT_IRCDDB_PASSWORD4); m_config->Read(m_name + KEY_APRS_ENABLED, &m_aprsEnabled, DEFAULT_APRS_ENABLED); @@ -1000,10 +1000,10 @@ m_repeater4URL(DEFAULT_URL), m_repeater4Band1(DEFAULT_BAND1), m_repeater4Band2(DEFAULT_BAND2), m_repeater4Band3(DEFAULT_BAND3), -m_ircddbEnabled(DEFAULT_IRCDDB_ENABLED), -m_ircddbHostname(DEFAULT_IRCDDB_HOSTNAME), -m_ircddbUsername(DEFAULT_IRCDDB_USERNAME), -m_ircddbPassword(DEFAULT_IRCDDB_PASSWORD), +m_ircddbEnabled1(DEFAULT_IRCDDB_ENABLED1), +m_ircddbHostname1(DEFAULT_IRCDDB_HOSTNAME1), +m_ircddbUsername1(DEFAULT_IRCDDB_USERNAME1), +m_ircddbPassword1(DEFAULT_IRCDDB_PASSWORD1), m_ircddbEnabled2(DEFAULT_IRCDDB_ENABLED2), m_ircddbHostname2(DEFAULT_IRCDDB_HOSTNAME2), m_ircddbUsername2(DEFAULT_IRCDDB_USERNAME2), @@ -1348,16 +1348,16 @@ m_y(DEFAULT_WINDOW_Y) } else if (key.IsSameAs(KEY_BAND43)) { val.ToULong(&temp2); m_repeater4Band3 = (unsigned char)temp2; - } else if (key.IsSameAs(KEY_IRCDDB_ENABLED)) { + } else if (key.IsSameAs(KEY_IRCDDB_ENABLED1)) { val.ToLong(&temp1); - m_ircddbEnabled = temp1 == 1L; - } else if (key.IsSameAs(KEY_IRCDDB_HOSTNAME)) { - m_ircddbHostname = val; - } else if (key.IsSameAs(KEY_IRCDDB_USERNAME)) { - m_ircddbUsername = val; - } else if (key.IsSameAs(KEY_IRCDDB_PASSWORD)) { - m_ircddbPassword = val; - } else if (key.IsSameAs(KEY_IRCDDB_ENABLED2)) { + m_ircddbEnabled1 = temp1 == 1L; + } else if (key.IsSameAs(KEY_IRCDDB_HOSTNAME1)) { + m_ircddbHostname1 = val; + } else if (key.IsSameAs(KEY_IRCDDB_USERNAME1)) { + m_ircddbUsername1 = val; + } else if (key.IsSameAs(KEY_IRCDDB_PASSWORD1)) { + m_ircddbPassword1 = val; + } else if (key.IsSameAs(KEY_IRCDDB_ENABLED21)) { val.ToLong(&temp1); m_ircddbEnabled2 = temp1 == 1L; } else if (key.IsSameAs(KEY_IRCDDB_HOSTNAME2)) { @@ -1813,20 +1813,20 @@ void CIRCDDBGatewayConfig::setRepeater4(const wxString& band, HW_TYPE type, cons m_repeater4URL = url; } -void CIRCDDBGatewayConfig::getIrcDDB(bool& enabled, wxString& hostname, wxString& username, wxString& password) const +void CIRCDDBGatewayConfig::getIrcDDB1(bool& enabled, wxString& hostname, wxString& username, wxString& password) const { - enabled = m_ircddbEnabled; - hostname = m_ircddbHostname; - username = m_ircddbUsername; - password = m_ircddbPassword; + enabled = m_ircddbEnabled1; + hostname = m_ircddbHostname1; + username = m_ircddbUsername1; + password = m_ircddbPassword1; } -void CIRCDDBGatewayConfig::setIrcDDB(bool enabled, const wxString& hostname, const wxString& username, const wxString& password) +void CIRCDDBGatewayConfig::setIrcDDB1(bool enabled, const wxString& hostname, const wxString& username, const wxString& password) { - m_ircddbEnabled = enabled; - m_ircddbHostname = hostname; - m_ircddbUsername = username; - m_ircddbPassword = password; + m_ircddbEnabled1 = enabled; + m_ircddbHostname1 = hostname; + m_ircddbUsername1 = username; + m_ircddbPassword1 = password; } void CIRCDDBGatewayConfig::getIrcDDB2(bool& enabled, wxString& hostname, wxString& username, wxString& password) const @@ -2349,10 +2349,10 @@ bool CIRCDDBGatewayConfig::write() m_config->Write(m_name + KEY_BAND41, long(m_repeater4Band1)); m_config->Write(m_name + KEY_BAND42, long(m_repeater4Band2)); m_config->Write(m_name + KEY_BAND43, long(m_repeater4Band3)); - m_config->Write(m_name + KEY_IRCDDB_ENABLED, m_ircddbEnabled); - m_config->Write(m_name + KEY_IRCDDB_HOSTNAME, m_ircddbHostname); - m_config->Write(m_name + KEY_IRCDDB_USERNAME, m_ircddbUsername); - m_config->Write(m_name + KEY_IRCDDB_PASSWORD, m_ircddbPassword); + m_config->Write(m_name + KEY_IRCDDB_ENABLED1, m_ircddbEnabled1); + m_config->Write(m_name + KEY_IRCDDB_HOSTNAME1, m_ircddbHostname1); + m_config->Write(m_name + KEY_IRCDDB_USERNAME1, m_ircddbUsername1); + m_config->Write(m_name + KEY_IRCDDB_PASSWORD1, m_ircddbPassword1); m_config->Write(m_name + KEY_IRCDDB_ENABLED2, m_ircddbEnabled2); m_config->Write(m_name + KEY_IRCDDB_HOSTNAME2, m_ircddbHostname2); m_config->Write(m_name + KEY_IRCDDB_USERNAME2, m_ircddbUsername2); @@ -2557,10 +2557,10 @@ bool CIRCDDBGatewayConfig::write() buffer.Printf(wxT("%s=%u"), KEY_BAND41.c_str(), m_repeater4Band1); file.AddLine(buffer); buffer.Printf(wxT("%s=%u"), KEY_BAND42.c_str(), m_repeater4Band2); file.AddLine(buffer); buffer.Printf(wxT("%s=%u"), KEY_BAND43.c_str(), m_repeater4Band3); file.AddLine(buffer); - buffer.Printf(wxT("%s=%d"), KEY_IRCDDB_ENABLED.c_str(), m_ircddbEnabled ? 1 : 0); file.AddLine(buffer); - buffer.Printf(wxT("%s=%s"), KEY_IRCDDB_HOSTNAME.c_str(), m_ircddbHostname.c_str()); file.AddLine(buffer); - buffer.Printf(wxT("%s=%s"), KEY_IRCDDB_USERNAME.c_str(), m_ircddbUsername.c_str()); file.AddLine(buffer); - buffer.Printf(wxT("%s=%s"), KEY_IRCDDB_PASSWORD.c_str(), m_ircddbPassword.c_str()); file.AddLine(buffer); + buffer.Printf(wxT("%s=%d"), KEY_IRCDDB_ENABLED1.c_str(), m_ircddbEnabled1 ? 1 : 0); file.AddLine(buffer); + buffer.Printf(wxT("%s=%s"), KEY_IRCDDB_HOSTNAME1.c_str(), m_ircddbHostname1.c_str()); file.AddLine(buffer); + buffer.Printf(wxT("%s=%s"), KEY_IRCDDB_USERNAME1.c_str(), m_ircddbUsername1.c_str()); file.AddLine(buffer); + buffer.Printf(wxT("%s=%s"), KEY_IRCDDB_PASSWORD1.c_str(), m_ircddbPassword1.c_str()); file.AddLine(buffer); buffer.Printf("%s=%d", KEY_IRCDDB_ENABLED2.c_str(), m_ircddbEnabled2 ? 1 : 0); file.AddLine(buffer); buffer.Printf("%s=%s", KEY_IRCDDB_HOSTNAME2.c_str(), m_ircddbHostname2.c_str()); file.AddLine(buffer); buffer.Printf("%s=%s", KEY_IRCDDB_USERNAME2.c_str(), m_ircddbUsername2.c_str()); file.AddLine(buffer); diff --git a/Common/IRCDDBGatewayConfig.h b/Common/IRCDDBGatewayConfig.h index 09e8921..5583b91 100644 --- a/Common/IRCDDBGatewayConfig.h +++ b/Common/IRCDDBGatewayConfig.h @@ -49,12 +49,12 @@ public: void getRepeater4(wxString& callsign, wxString& band, HW_TYPE& type, wxString& address, unsigned int& port, unsigned char& band1, unsigned char& band2, unsigned char& band3, wxString& reflector, bool& atStartup, RECONNECT& reconnect, double& frequency, double& offset, double& range, double& latitude, double& longitude, double& agl, wxString& description1, wxString& description2, wxString& url) const; void setRepeater4(const wxString& band, HW_TYPE type, const wxString& address, unsigned int port, unsigned char band1, unsigned char band2, unsigned char band3, const wxString& reflector, bool atStartup, RECONNECT reconnect, double frequency, double offset, double range, double latitude, double longitude, double agl, const wxString& description1, const wxString& description2, const wxString& url); - void getIrcDDB(bool& enabled, wxString& hostname, wxString& username, wxString& password) const; + void getIrcDDB1(bool& enabled, wxString& hostname, wxString& username, wxString& password) const; void getIrcDDB2(bool& enabled, wxString& hostname, wxString& username, wxString& password) const; void getIrcDDB3(bool& enabled, wxString& hostname, wxString& username, wxString& password) const; void getIrcDDB4(bool& enabled, wxString& hostname, wxString& username, wxString& password) const; - void setIrcDDB(bool enabled, const wxString& hostname, const wxString& username, const wxString& password); + void setIrcDDB1(bool enabled, const wxString& hostname, const wxString& username, const wxString& password); void setIrcDDB2(bool enabled, const wxString& hostname, const wxString& username, const wxString& password); void setIrcDDB3(bool enabled, const wxString& hostname, const wxString& username, const wxString& password); void setIrcDDB4(bool enabled, const wxString& hostname, const wxString& username, const wxString& password); @@ -215,10 +215,10 @@ private: unsigned char m_repeater4Band1; unsigned char m_repeater4Band2; unsigned char m_repeater4Band3; - bool m_ircddbEnabled; - wxString m_ircddbHostname; - wxString m_ircddbUsername; - wxString m_ircddbPassword; + bool m_ircddbEnabled1; + wxString m_ircddbHostname1; + wxString m_ircddbUsername1; + wxString m_ircddbPassword1; bool m_ircddbEnabled2; wxString m_ircddbHostname2; wxString m_ircddbUsername2; diff --git a/ircDDBGateway/IRCDDBGatewayApp.cpp b/ircDDBGateway/IRCDDBGatewayApp.cpp index 93fa3ba..2be5ca8 100644 --- a/ircDDBGateway/IRCDDBGatewayApp.cpp +++ b/ircDDBGateway/IRCDDBGatewayApp.cpp @@ -650,7 +650,7 @@ void CIRCDDBGatewayApp::createThread() wxString ircDDBHostname3, ircDDBUsername3, ircDDBPassword3; wxString ircDDBHostname4, ircDDBUsername4, ircDDBPassword4; - m_config->getIrcDDB(ircDDBEnabled1, ircDDBHostname1, ircDDBUsername1, ircDDBPassword1); + m_config->getIrcDDB1(ircDDBEnabled1, ircDDBHostname1, ircDDBUsername1, ircDDBPassword1); wxLogInfo(wxT("ircDDB 1 enabled: %d, host: %s, username: %s"), int(ircDDBEnabled1), ircDDBHostname1.c_str(), ircDDBUsername1.c_str()); m_config->getIrcDDB2(ircDDBEnabled2, ircDDBHostname2, ircDDBUsername2, ircDDBPassword2); diff --git a/ircDDBGatewayConfig/IRCDDBGatewayConfigFrame.cpp b/ircDDBGatewayConfig/IRCDDBGatewayConfigFrame.cpp index 2b10e6d..a019ebf 100644 --- a/ircDDBGatewayConfig/IRCDDBGatewayConfigFrame.cpp +++ b/ircDDBGatewayConfig/IRCDDBGatewayConfigFrame.cpp @@ -178,7 +178,7 @@ m_miscellaneous(NULL) bool ircDDBEnabled; wxString ircDDBHostname, ircDDBUsername, ircDDBPassword; - m_config->getIrcDDB(ircDDBEnabled, ircDDBHostname, ircDDBUsername, ircDDBPassword); + m_config->getIrcDDB1(ircDDBEnabled, ircDDBHostname, ircDDBUsername, ircDDBPassword); m_ircDDB = new CIRCDDBGatewayConfigIrcDDBSet(noteBook, -1, APPLICATION_NAME, ircDDBEnabled, ircDDBHostname, ircDDBUsername, ircDDBPassword); noteBook->AddPage(m_ircDDB, wxT("ircDDB 1st Network"), false); @@ -476,7 +476,7 @@ void CIRCDDBGatewayConfigFrame::onSave(wxCommandEvent&) wxString ircDDBHostname = m_ircDDB->getHostname(); wxString ircDDBUsername = m_ircDDB->getUsername(); wxString ircDDBPassword = m_ircDDB->getPassword(); - m_config->setIrcDDB(ircDDBEnabled, ircDDBHostname, ircDDBUsername, ircDDBPassword); + m_config->setIrcDDB1(ircDDBEnabled, ircDDBHostname, ircDDBUsername, ircDDBPassword); ircDDBEnabled = m_ircDDB2->getEnabled(); ircDDBHostname = m_ircDDB2->getHostname(); From 62fb498d6eec8eeaf580ed40e2eda07f6ecb98af Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Wed, 27 Jun 2018 07:39:51 +0100 Subject: [PATCH 005/166] Linux cleanups. --- APRSTransmit/APRSTransmitAppD.cpp | 4 ++-- Common/IRCDDBGatewayConfig.cpp | 2 +- ircDDBGateway/IRCDDBGatewayAppD.cpp | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/APRSTransmit/APRSTransmitAppD.cpp b/APRSTransmit/APRSTransmitAppD.cpp index 75be9ca..7d69438 100644 --- a/APRSTransmit/APRSTransmitAppD.cpp +++ b/APRSTransmit/APRSTransmitAppD.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014 by Jonathan Naylor G4KLX + * Copyright (C) 2014,2018 by Jonathan Naylor G4KLX * APRSTransmit Copyright (C) 2015 Geoffrey Merck F4FXL / KC3FRA * * This program is free software; you can redistribute it and/or modify @@ -148,7 +148,7 @@ int main(int argc, char** argv) ::fclose(fp); } - m_aprsTransmit = new CAPRSTransmitAppD(repeater, aprsHost, aprsPort, aprsFilter, daemon); + m_aprsTransmit = new CAPRSTransmitAppD(repeater, aprsPassword, aprsHost, aprsPort, aprsFilter, daemon); if (!m_aprsTransmit->init()) { ::wxUninitialize(); return 1; diff --git a/Common/IRCDDBGatewayConfig.cpp b/Common/IRCDDBGatewayConfig.cpp index 36cb16b..7e3da47 100644 --- a/Common/IRCDDBGatewayConfig.cpp +++ b/Common/IRCDDBGatewayConfig.cpp @@ -1357,7 +1357,7 @@ m_y(DEFAULT_WINDOW_Y) m_ircddbUsername1 = val; } else if (key.IsSameAs(KEY_IRCDDB_PASSWORD1)) { m_ircddbPassword1 = val; - } else if (key.IsSameAs(KEY_IRCDDB_ENABLED21)) { + } else if (key.IsSameAs(KEY_IRCDDB_ENABLED2)) { val.ToLong(&temp1); m_ircddbEnabled2 = temp1 == 1L; } else if (key.IsSameAs(KEY_IRCDDB_HOSTNAME2)) { diff --git a/ircDDBGateway/IRCDDBGatewayAppD.cpp b/ircDDBGateway/IRCDDBGatewayAppD.cpp index e51efac..d0672c9 100644 --- a/ircDDBGateway/IRCDDBGatewayAppD.cpp +++ b/ircDDBGateway/IRCDDBGatewayAppD.cpp @@ -242,15 +242,15 @@ bool CIRCDDBGatewayAppD::createThread() m_thread->setGateway(gatewayType, gatewayCallsign, gatewayAddress); - wxString aprsHostname; + wxString aprsHostname, aprsPassword; unsigned int aprsPort; bool aprsEnabled; - config.getDPRS(aprsEnabled, aprsHostname, aprsPort); + config.getDPRS(aprsEnabled, aprsPassword, aprsHostname, aprsPort); wxLogInfo(wxT("APRS enabled: %d, host: %s:%u"), int(aprsEnabled), aprsHostname.c_str(), aprsPort); CAPRSWriter* aprs = NULL; if (aprsEnabled && !gatewayCallsign.IsEmpty() && !aprsHostname.IsEmpty() && aprsPort != 0U) { - aprs = new CAPRSWriter(aprsHostname, aprsPort, gatewayCallsign, gatewayAddress); + aprs = new CAPRSWriter(aprsHostname, aprsPort, gatewayCallsign, aprsPassword, gatewayAddress); bool res = aprs->open(); if (!res) @@ -638,7 +638,7 @@ bool CIRCDDBGatewayAppD::createThread() wxString ircDDBHostname3, ircDDBUsername3, ircDDBPassword3; wxString ircDDBHostname4, ircDDBUsername4, ircDDBPassword4; - config.getIrcDDB(ircDDBEnabled1, ircDDBHostname1, ircDDBUsername1, ircDDBPassword1); + config.getIrcDDB1(ircDDBEnabled1, ircDDBHostname1, ircDDBUsername1, ircDDBPassword1); wxLogInfo(wxT("ircDDB 1 enabled: %d, host: %s, username: %s"), int(ircDDBEnabled1), ircDDBHostname1.c_str(), ircDDBUsername1.c_str()); config.getIrcDDB2(ircDDBEnabled2, ircDDBHostname2, ircDDBUsername2, ircDDBPassword2); From b0a254ab5394fafd6831177ee9445714b0ceb677 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Wed, 27 Jun 2018 08:09:51 +0100 Subject: [PATCH 006/166] Updated to the latest hosts files. --- Data/DCS_Hosts.txt | 509 +++++++++++++++++++++++------------------- Data/DExtra_Hosts.txt | 483 +++++++++++++++++++++++---------------- Data/DPlus_Hosts.txt | 288 +++++++++++++++++++++--- 3 files changed, 829 insertions(+), 451 deletions(-) diff --git a/Data/DCS_Hosts.txt b/Data/DCS_Hosts.txt index 1d3667d..30b4246 100644 --- a/Data/DCS_Hosts.txt +++ b/Data/DCS_Hosts.txt @@ -1,16 +1,16 @@ -DCS000 206.208.56.92 +DCS000 23.111.174.198 L DCS001 dcs001.xreflector.net DCS002 dcs002.xreflector.net -DCS003 dcs003.xreflector.net -DCS004 dcs004.xreflector.net -DCS005 www.bm-dmr.uk -DCS006 dcs006.xreflector.net +DCS003 dcs003.xreflector.net +DCS004 dcs004.xreflector.net +DCS005 dcs.bm-dmr.uk L +DCS006 107.3.98.11 L DCS007 dcs007.xreflector.net DCS008 dcs008.xreflector.net -DCS009 dcs009.xreflector.net -DCS010 dcs010.xreflector.net +DCS009 dcs009.xreflector.net +DCS010 85.197.129.86 L DCS011 dcs011.xreflector.net -DCS012 dcs012.xreflector.net +DCS012 194.38.140.205 L DCS013 dcs013.xreflector.net DCS014 dcs014.xreflector.net DCS015 dcs015.xreflector.net @@ -18,227 +18,288 @@ DCS016 dcs016.xreflector.net DCS017 dcs017.xreflector.net DCS018 dcs018.xreflector.net DCS019 dcs019.xreflector.net +DCS020 94.177.164.25 DCS021 dcs021.xreflector.net DCS022 dcs022.xreflector.net DCS023 dcs023.xreflector.net DCS024 dcs024.xreflector.net DCS025 dcs025.xreflector.net DCS026 dcs026.xreflector.net -DCS027 dcs027.xreflector.net -DCS028 xlx028.org L +DCS027 dcs027.xreflector.net +DCS028 xlx028.org L DCS029 dcs029.xreflector.net +DCS030 194.59.177.44 DCS032 dcs032.xreflector.net -DCS033 dcs033.xreflector.net -DCS035 45.79.94.184 -DCS039 185.203.118.66 -DCS040 109.71.45.29 -DCS041 45.62.226.137 -DCS044 dcs044.xreflector.net -DCS045 64.137.172.60 -DCS046 176.10.140.161 -DCS047 121.94.218.243 -DCS050 212.237.17.133 -DCS051 93.186.254.219 -DCS052 60.47.177.125 -DCS054 52.86.180.251 -DCS055 52.80.4.154 -DCS057 74.193.209.20 -DCS058 118.236.151.192 -DCS060 212.237.36.181 -DCS061 68.115.205.110 -DCS062 70.88.145.163 -DCS064 202.241.175.133 -DCS066 79.16.44.125 -DCS068 92.222.145.202 -DCS069 89.36.214.120 -DCS071 211.60.41.185 -DCS072 211.60.41.186 -DCS075 5.135.162.136 -DCS076 203.137.116.117 -DCS077 5.249.151.111 -DCS078 109.10.128.221 -DCS079 121.162.91.94 -DCS080 121.85.180.61 -DCS081 121.84.13.151 -DCS082 108.21.232.21 -DCS083 108.21.232.22 -DCS085 27.92.11.123 -DCS086 220.133.89.28 -DCS087 44.137.36.209 -DCS088 194.109.192.235 -DCS089 194.109.192.236 -DCS090 91.92.136.252 -DCS092 94.177.190.50 -DCS093 98.29.99.252 -DCS095 58.1.93.223 -DCS098 111.168.216.126 -DCS099 212.237.59.103 -DCS100 96.94.7.196 -DCS101 104.233.105.86 -DCS102 206.208.56.13 -DCS103 64.137.248.42 -DCS104 206.208.56.93 -DCS111 81.95.126.168 -DCS112 216.45.55.151 -DCS114 91.121.136.94 -DCS115 217.182.128.3 -DCS116 31.185.101.211 -DCS118 5.249.148.252 -DCS119 125.129.207.86 -DCS120 24.43.83.140 -DCS121 174.37.249.156 -DCS124 211.14.169.234 -DCS125 213.181.208.52 -DCS127 190.112.228.107 -DCS128 153.249.96.5 -DCS145 178.59.23.138 -DCS146 87.228.241.43 -DCS147 46.41.1.127 -DCS150 212.237.3.87 -DCS170 210.178.113.173 -DCS171 121.162.91.45 -DCS185 118.152.21.76 -DCS204 185.85.18.162 -DCS206 193.190.240.227 -DCS208 151.80.155.39 -DCS210 45.62.210.243 -DCS212 52.38.90.188 -DCS214 185.47.129.230 -DCS216 74.214.25.135 -DCS222 93.189.136.50 -DCS227 86.122.173.9 -DCS228 212.237.33.114 -DCS230 80.250.3.114 -DCS232 213.47.219.169 -DCS241 151.80.158.227 -DCS242 73.14.84.43 -DCS246 172.93.48.159 -DCS248 158.69.206.45 -DCS252 118.21.66.186 -DCS255 245.115.35.52 -DCS261 44.144.0.23 -DCS262 44.144.0.24 -DCS264 52.2.131.118 -DCS265 51.255.43.60 -DCS270 158.64.26.132 -DCS291 60.112.168.104 -DCS295 45.62.238.78 -DCS298 133.208.206.141 -DCS299 125.236.227.43 -DCS300 64.137.172.56 -DCS302 144.217.241.23 -DCS307 104.36.40.243 -DCS310 64.137.165.141 -DCS311 78.47.206.12 -DCS313 xlx313.openstd.net -DCS317 44.48.8.15 -DCS321 31.207.110.231 -DCS333 194.116.29.73 -DCS334 199.119.98.174 -DCS336 23.226.233.133 -DCS339 198.98.53.247 -DCS357 52.39.82.54 -DCS359 79.232.250.96 -DCS365 59.139.141.204 -DCS370 188.213.168.24 -DCS373 101.143.24.88 -DCS382 61.116.7.187 -DCS389 106.71.106.79 -DCS390 31.14.140.230 -DCS398 45.62.243.153 -DCS404 91.229.143.187 -DCS412 42.151.104.175 -DCS433 217.160.22.17 -DCS440 114.176.44.90 -DCS441 203.137.99.110 -DCS444 188.68.37.51 -DCS450 64.137.161.11 -DCS486 51.255.172.249 -DCS499 59.157.4.151 -DCS500 172.104.32.192 -DCS502 74.208.88.137 -DCS515 163.44.167.125 -DCS518 176.9.1.168 -DCS519 24.55.202.247 -DCS520 202.6.18.14 -DCS538 133.137.49.171 -DCS550 151.80.141.175 -DCS555 64.137.186.11 -DCS569 219.122.146.110 -DCS570 104.128.230.153 -DCS573 216.189.148.204 -DCS595 219.104.19.203 -DCS600 13.69.14.204 -DCS601 51.141.52.193 -DCS602 212.56.100.200 -DCS603 24.233.107.8 -DCS610 103.1.213.21 -DCS616 44.103.39.7 -DCS626 202.137.244.157 -DCS666 54.144.216.63 -DCS689 97.107.128.47 -DCS699 82.102.5.239 -DCS700 78.47.222.93 -DCS706 93.186.255.126 -DCS707 90.145.156.196 -DCS708 202.218.37.62 -DCS709 212.237.34.32 -DCS711 212.237.18.27 -DCS712 153.227.250.188 -DCS714 85.214.119.76 -DCS724 191.232.36.180 -DCS737 195.130.75.246 -DCS746 178.254.34.44 -DCS747 93.209.43.173 -DCS748 64.137.197.36 -DCS750 203.86.206.49 -DCS751 210.55.201.126 -DCS755 193.248.45.246 -DCS766 201.62.48.61 -DCS773 94.177.175.230 -DCS777 45.62.251.163 -DCS781 175.179.238.153 -DCS787 87.154.55.113 -DCS789 75.144.65.122 -DCS800 52.26.26.195 -DCS801 77.117.160.175 -DCS807 118.8.17.123 -DCS812 126.25.168.252 -DCS813 97.76.81.165 -DCS850 88.198.94.77 -DCS870 103.3.234.95 -DCS880 176.10.105.211 -DCS886 118.163.103.178 -DCS887 118.163.103.177 -DCS888 31.14.135.7 -DCS897 92.222.23.124 -DCS900 85.214.114.27 -DCS901 77.117.160.175 -DCS906 212.237.11.53 -DCS908 212.237.2.183 -DCS909 216.86.147.198 -DCS910 94.177.207.26 -DCS911 5.196.73.89 -DCS921 44.143.184.83 -DCS929 158.69.166.132 -DCS930 94.177.160.5 -DCS931 173.50.88.34 -DCS933 37.59.119.115 -DCS940 202.218.37.121 -DCS950 158.64.26.134 -DCS960 80.211.226.89 -DCS964 52.173.142.244 -DCS967 95.158.165.32 -DCS972 46.121.158.50 -DCS974 94.177.217.52 -DCS975 176.31.161.9 -DCS976 212.237.36.71 -DCS978 193.70.0.229 -DCS986 81.89.102.160 -DCS987 185.32.183.148 -DCS989 xrf989.bbhill.net -DCS990 35.164.237.63 -DCS995 142.116.255.245 -DCS997 94.177.187.40 -DCS998 44.140.236.20 -DCS999 94.177.173.53 +DCS033 dcs033.xreflector.net +DCS035 45.79.94.184 +DCS036 151.12.36.112 +DCS039 79.11.0.140 +DCS040 109.71.45.29 +DCS044 dcs044.xreflector.net +DCS046 176.10.140.161 +DCS047 121.94.194.94 +DCS049 212.71.234.224 +DCS051 93.186.254.219 +DCS052 121.119.96.205 +DCS053 91.214.62.136 +DCS054 52.86.180.251 +DCS055 52.80.4.154 +DCS057 173.216.181.178 +DCS058 115.162.207.228 +DCS059 18.219.32.21 +DCS060 212.237.36.181 +DCS061 68.115.205.110 +DCS062 70.88.145.163 +DCS064 122.222.1.50 +DCS066 79.53.89.140 +DCS067 78.226.112.146 +DCS068 92.222.145.202 +DCS071 211.60.41.185 +DCS074 212.237.211.82 +DCS075 5.135.162.136 +DCS076 203.137.116.117 +DCS077 5.249.151.111 +DCS078 109.10.128.221 +DCS080 121.86.66.52 +DCS081 121.84.13.151 +DCS085 27.92.11.123 +DCS086 220.133.89.28 +DCS088 194.109.192.235 +DCS089 194.109.192.236 +DCS090 91.92.136.252 +DCS092 212.237.30.36 +DCS095 203.137.76.53 +DCS098 118.111.10.231 +DCS099 212.237.59.103 +DCS101 45.62.213.101 +DCS102 23.111.174.196 +DCS103 64.137.224.126 +DCS104 23.111.174.197 +DCS105 51.254.99.78 +DCS109 182.168.101.180 +DCS110 150.7.164.10 +DCS111 61.195.96.160 +DCS113 151.12.36.103 +DCS114 5.135.188.16 +DCS115 217.182.128.3 +DCS116 31.185.101.211 +DCS118 5.249.148.252 +DCS119 125.129.207.86 +DCS120 81.150.10.63 +DCS121 174.37.249.156 +DCS122 83.137.45.100 +DCS124 211.14.169.234 +DCS125 213.181.208.52 +DCS129 219.116.28.227 +DCS130 194.59.177.45 +DCS131 80.127.118.226 +DCS132 91.203.55.87 +DCS134 159.89.176.86 +DCS145 178.59.23.138 +DCS147 46.41.1.127 +DCS150 80.211.10.212 +DCS170 210.178.113.173 +DCS171 121.162.91.45 +DCS180 192.241.240.7 +DCS202 148.251.122.251 +DCS204 185.85.18.162 +DCS206 193.190.240.227 +DCS208 151.80.155.39 +DCS210 64.137.224.107 +DCS212 52.38.90.188 +DCS214 185.47.129.230 +DCS215 185.87.96.172 +DCS216 74.214.25.135 +DCS220 124.41.83.11 +DCS222 212.43.96.84 +DCS224 203.137.99.97 +DCS226 94.176.6.37 +DCS228 188.60.43.206 +DCS229 194.191.4.54 +DCS230 80.250.3.114 +DCS232 89.185.97.35 +DCS235 5.150.254.97 +DCS238 172.104.239.219 +DCS241 151.80.158.227 +DCS242 73.14.84.43 +DCS246 172.93.48.159 +DCS263 85.214.193.146 +DCS264 52.2.131.118 +DCS266 212.237.51.82 +DCS270 158.64.26.132 +DCS282 211.131.186.73 +DCS284 95.158.165.32 +DCS290 94.176.6.45 +DCS291 101.143.242.189 +DCS295 64.137.160.185 +DCS298 111.169.17.74 +DCS299 125.236.227.43 +DCS300 45.62.244.43 +DCS302 144.217.241.23 +DCS307 104.36.40.243 +DCS310 52.11.207.121 +DCS313 34.213.108.164 +DCS315 65.101.7.50 +DCS317 44.48.8.15 +DCS321 31.207.110.45 +DCS328 212.237.33.114 +DCS332 188.213.168.99 +DCS333 194.116.29.73 +DCS334 96.47.95.121 +DCS335 185.206.145.2 +DCS336 23.226.233.133 +DCS339 198.98.53.247 +DCS345 45.62.237.34 +DCS357 52.39.82.54 +DCS359 94.156.172.213 +DCS360 222.229.25.105 +DCS365 59.139.141.204 +DCS370 188.213.168.24 +DCS371 212.237.8.77 +DCS373 101.143.25.116 +DCS374 61.195.108.146 +DCS376 75.145.119.225 +DCS380 160.16.65.39 +DCS382 61.116.2.231 +DCS388 138.197.67.52 +DCS389 106.70.187.224 +DCS390 149.7.214.253 +DCS400 13.58.192.185 +DCS404 91.229.143.187 +DCS410 166.78.156.246 +DCS412 61.195.107.113 +DCS431 61.195.98.225 +DCS433 217.160.22.17 +DCS434 51.254.128.134 +DCS440 114.161.161.90 +DCS441 203.137.99.110 +DCS444 188.68.37.51 +DCS449 159.89.183.117 +DCS450 64.137.224.233 +DCS454 221.125.255.216 +DCS456 54.37.204.187 +DCS464 52.192.129.174 +DCS470 104.49.29.243 +DCS477 139.162.213.89 +DCS486 51.255.172.249 +DCS499 203.137.76.22 +DCS500 172.104.32.192 +DCS502 190.148.222.28 +DCS508 185.188.4.15 +DCS511 84.52.159.10 +DCS515 133.130.114.45 +DCS518 176.9.1.168 +DCS519 167.114.104.65 +DCS520 119.59.125.192 +DCS525 176.65.95.90 +DCS538 133.218.172.211 +DCS544 210.131.32.240 +DCS550 94.177.240.69 +DCS554 52.35.183.178 +DCS555 64.137.186.11 +DCS569 203.137.111.98 +DCS583 183.76.148.131 +DCS595 175.179.56.111 +DCS600 13.69.14.204 +DCS601 51.141.52.193 +DCS602 212.56.100.200 +DCS603 216.10.169.35 +DCS604 139.162.241.24 +DCS608 110.54.43.197 +DCS610 89.186.80.81 +DCS626 202.137.244.157 +DCS634 61.199.25.130 +DCS655 146.64.235.19 +DCS666 54.144.216.63 +DCS673 180.147.243.178 +DCS684 212.237.17.83 +DCS689 97.107.128.47 +DCS699 82.102.5.239 +DCS700 78.47.222.93 +DCS701 61.195.107.77 +DCS703 61.195.98.254 +DCS706 93.186.255.126 +DCS707 90.145.156.196 +DCS708 202.218.37.62 +DCS709 212.237.34.32 +DCS711 212.237.18.27 +DCS712 180.11.74.19 +DCS714 85.214.119.76 +DCS717 44.137.70.100 +DCS722 80.211.2.161 +DCS723 45.33.118.112 +DCS724 75.99.228.35 +DCS730 186.64.123.59 +DCS732 190.159.68.105 +DCS733 45.56.117.158 +DCS735 104.131.81.32 +DCS737 195.130.75.246 +DCS740 173.208.200.180 +DCS746 178.254.34.44 +DCS747 87.147.134.254 +DCS748 64.137.197.36 +DCS752 66.154.105.195 +DCS755 178.22.148.229 +DCS766 201.62.48.61 +DCS773 94.177.175.230 +DCS775 149.202.61.17 +DCS776 218.221.163.75 +DCS777 194.182.66.76 +DCS781 101.143.242.199 +DCS787 93.201.107.223 +DCS794 101.143.242.95 +DCS801 213.47.71.17 +DCS803 77.117.1.235 +DCS806 92.105.198.59 +DCS808 18.220.252.27 +DCS810 64.137.238.189 +DCS812 203.145.233.141 +DCS813 97.76.81.165 +DCS828 195.225.116.244 +DCS844 137.226.79.122 +DCS850 88.198.94.77 +DCS860 80.81.9.242 +DCS870 103.3.234.95 +DCS878 203.137.123.113 +DCS883 125.207.223.228 +DCS886 118.163.103.178 +DCS887 118.163.103.177 +DCS888 31.14.135.7 +DCS893 103.235.127.147 +DCS900 94.177.237.192 +DCS903 80.211.29.226 +DCS906 212.237.11.53 +DCS907 176.84.175.87 +DCS908 92.222.23.124 +DCS909 216.86.147.198 +DCS910 94.177.207.26 +DCS911 5.196.73.89 +DCS912 80.211.1.143 +DCS919 80.211.232.174 +DCS921 44.143.184.83 +DCS922 81.150.10.62 +DCS925 90.255.232.101 +DCS929 158.69.166.132 +DCS930 94.177.160.5 +DCS931 71.120.181.98 +DCS933 164.132.104.167 +DCS935 188.213.166.199 +DCS940 202.218.37.121 +DCS944 202.218.34.210 +DCS945 155.94.147.186 +DCS950 158.64.26.134 +DCS964 52.173.142.244 +DCS972 46.121.158.50 +DCS973 211.14.169.43 +DCS974 94.177.217.52 +DCS975 176.31.161.9 +DCS986 81.89.102.160 +DCS987 185.32.183.148 +DCS989 50.27.131.75 +DCS990 35.164.237.63 +DCS991 2.237.27.66 +DCS995 158.69.201.255 +DCS996 47.104.177.248 +DCS997 94.177.187.40 +DCS998 44.140.236.20 +DCS999 94.177.173.53 diff --git a/Data/DExtra_Hosts.txt b/Data/DExtra_Hosts.txt index d97b33d..b1210d3 100644 --- a/Data/DExtra_Hosts.txt +++ b/Data/DExtra_Hosts.txt @@ -1,199 +1,300 @@ -#>>Downloaded from W6KD host file server -#>>Last updated 17 NOV 2016 by W6KD - -XRF000 000.xreflector.org -XRF001 xlx001.homepc.it -XRF002 xrf002.dstar.club -XRF003 xrf003.iw0red.it -XRF004 xrf004.kb8zgl.net -XRF005 216.16.240.236 -XRF006 xrf006.xrefl.net -XRF007 xrf007.ea5gf.es -XRF008 95.110.231.219 -XRF010 xlx010.n8qq.com -XRF011 xlx011.n8qq.com -XRF012 xrf012.papasys.com -XRF014 xrf014.iz0rin.it -XRF015 xrf015.theapplecore.me -XRF016 xrf016.ampr.at -XRF018 99.167.129.166 -XRF019 66.30.81.236 -XRF020 67.210.212.144 -XRF021 44.103.32.250 -XRF022 xrf022.tms-it.net -XRF024 xrf024.dstar.at -XRF025 025.ham-digital.es -XRF027 194.116.29.78 -XRF028 stn028.dstar.be -XRF029 xrf029.tms-it.net -XRF030 xrf030.oe3xht.at -XRF032 xlx032.epf.lu -XRF033 46.226.178.81 -XRF035 xrf035.wa7dre.org -XRF036 xrf036.ddns.net -XRF037 185.58.193.163 -XRF038 66.6.171.228 -XRF040 xrf040.dyndns.org -XRF041 167.88.37.80 -XRF042 xrf042.luthienstar.fr -XRF043 xrf043.aotnet.it -XRF044 82.1.185.173 -XRF045 45.62.233.223 -XRF046 xlx.c4fm.se -XRF047 xlx047.ddns.net -XRF052 xrf052.dip.jp -XRF055 95.110.229.195 +XRF000 23.111.174.198 +XRF001 77.57.24.143 +XRF002 140.82.62.162 +XRF003 173.199.124.183 +XRF004 44.103.34.3 +XRF005 87.117.229.174 +XRF006 66.154.105.126 +XRF007 212.227.203.37 +XRF008 45.77.153.132 +XRF009 118.150.164.96 +XRF010 85.197.129.86 +XRF011 81.95.126.168 +XRF012 52.26.161.5 +XRF013 34.213.176.201 +XRF014 104.128.238.251 +XRF015 213.202.228.119 +XRF017 81.169.228.115 +XRF018 212.237.50.28 +XRF019 31.7.247.58 +XRF020 94.177.164.25 +XRF022 83.137.45.116 +XRF023 185.177.59.166 +XRF024 94.199.173.123 +XRF025 89.38.150.252 +XRF026 65.175.188.230 +XRF028 172.104.63.79 +XRF030 194.59.177.44 +XRF032 158.64.26.140 +XRF033 46.226.178.81 +XRF035 45.79.94.184 +XRF036 151.12.36.112 +XRF039 79.11.0.140 +XRF040 109.71.45.29 +XRF046 176.10.140.161 +XRF047 121.94.194.94 +XRF049 212.71.234.224 +XRF051 93.186.254.219 +XRF052 121.119.96.205 +XRF053 91.214.62.136 +XRF054 52.86.180.251 +XRF055 52.80.4.154 +XRF057 173.216.181.178 +XRF058 115.162.207.228 +XRF059 18.219.32.21 +XRF060 212.237.36.181 XRF061 68.115.205.110 -XRF062 xlx.maryland-dstar.net -XRF063 162.248.141.148 -XRF064 xrf064.owari.biz -XRF067 xrf067.f5kav.org -XRF068 xrf068.ircddb.it -XRF069 069.xreflector.es -XRF070 xrf070.iptime.org -XRF071 xrf.elechomebrew.com -XRF073 147.102.7.34 -XRF074 xrf074.dyndns.org -XRF075 xrf075.ir9bs.it -XRF076 xrf076.xreflector-jp.org -XRF077 xrf077.duckdns.org -XRF078 xrf078.duckdns.org -XRF080 jr3vh.jpn.ph.jp -XRF081 ja3gqj.dip.jp -XRF084 xrf084.fabbroni.eu -XRF085 jr1ofp.dip.jp -XRF088 xrf088.pa4tw.nl -XRF091 091.xreflector.es -XRF098 xrf098.dip.jp -XRF100 xlx100.xlxreflector.org -XRF101 xlx101.xlxreflector.org -XRF102 xlx102.xlxreflector.org -XRF103 xlx103.xlxreflector.org -XRF104 xlx104.xlxreflector.org -XRF112 112.xreflector.es -XRF113 xlx113.homepc.it -XRF113 xrf113.dstarspain.es -XRF118 xlx118.ns0.it -XRF120 24.43.83.140 -XRF123 213.126.90.100 -XRF125 xlx125.dyndns.hu -XRF132 xrf132.dstar.radom.pl -XRF133 xrf133.gb7de.co.uk -XRF145 178.59.21.32 +XRF062 70.88.145.163 +XRF064 122.222.1.50 +XRF066 79.53.89.140 +XRF067 78.226.112.146 +XRF068 92.222.145.202 +XRF071 211.60.41.185 +XRF074 212.237.211.82 +XRF075 5.135.162.136 +XRF076 203.137.116.117 +XRF077 5.249.151.111 +XRF078 109.10.128.221 +XRF080 121.86.66.52 +XRF081 121.84.13.151 +XRF085 27.92.11.123 +XRF086 220.133.89.28 +XRF088 194.109.192.235 +XRF089 194.109.192.236 +XRF090 91.92.136.252 +XRF092 212.237.30.36 +XRF095 203.137.76.53 +XRF098 118.111.10.231 +XRF099 212.237.59.103 +XRF101 45.62.213.101 +XRF102 23.111.174.196 +XRF103 64.137.224.126 +XRF104 23.111.174.197 +XRF105 51.254.99.78 +XRF109 182.168.101.180 +XRF110 150.7.164.10 +XRF111 61.195.96.160 +XRF113 151.12.36.103 +XRF114 5.135.188.16 +XRF115 217.182.128.3 +XRF116 31.185.101.211 +XRF118 5.249.148.252 +XRF119 125.129.207.86 +XRF120 81.150.10.63 +XRF121 174.37.249.156 +XRF122 83.137.45.100 +XRF124 211.14.169.234 +XRF125 213.181.208.52 +XRF129 219.116.28.227 +XRF130 194.59.177.45 +XRF131 80.127.118.226 +XRF132 91.203.55.87 +XRF134 159.89.176.86 +XRF145 178.59.23.138 XRF147 46.41.1.127 -XRF150 xrf150.dstarspain.es -XRF170 dvham.mooo.com -XRF177 xlx177.webandcloud.net -XRF200 xrf200.theapplecore.co.uk -XRF204 xlx204.ph0dv.nl -XRF210 210.xreflector.org -XRF212 xlx212.dstar.club -XRF214 xlx214.sustrai.org +XRF150 80.211.10.212 +XRF170 210.178.113.173 +XRF171 121.162.91.45 +XRF180 192.241.240.7 +XRF202 148.251.122.251 +XRF204 185.85.18.162 +XRF206 193.190.240.227 +XRF208 151.80.155.39 +XRF210 64.137.224.107 +XRF212 52.38.90.188 +XRF214 185.47.129.230 +XRF215 185.87.96.172 XRF216 74.214.25.135 -XRF223 k0pra.ddns.net -XRF232 xrf232.tms-it.net -XRF248 xrf248.dyndns.org -XRF250 xrf250.dstar.su -XRF255 xrf255.reflector.up4dar.de -XRF262 xrf262.reflector.up4dar.de +XRF220 124.41.83.11 +XRF222 212.43.96.84 +XRF224 203.137.99.97 +XRF226 94.176.6.37 +XRF228 188.60.43.206 +XRF229 194.191.4.54 +XRF230 80.250.3.114 +XRF232 89.185.97.35 +XRF235 5.150.254.97 +XRF238 172.104.239.219 +XRF241 151.80.158.227 +XRF242 73.14.84.43 +XRF246 172.93.48.159 +XRF263 85.214.193.146 XRF264 52.2.131.118 -XRF270 xrf270.reflector.up4dar.de -XRF275 xrf275.dyndns.org -XRF295 xrf295.dyndns.org -XRF300 300.xreflector.org -XRF307 xlx307.ddns.net -XRF308 xlx308.w6kd.com -XRF310 xrf310.xrefl.net -XRF311 xrf311.ernix.de -XRF312 xrf312.xrefl.net -XRF313 xlx313.xrefl.net -XRF314 xlx314.xrefl.net -XRF317 xrf317.crossroadsdmr.org -XRF321 vps.makeitrad.com -XRF333 xrf333.f1smf.com -XRF336 xrf336.mawcg.org -XRF350 350.dstarspain.es -XRF353 94.173.206.53 -XRF357 xlx357.w6kd.com -XRF370 xrf370.selfip.com -XRF387 195.130.59.77 -XRF390 xrf390.aotnet.it -XRF398 104.167.117.71 -XRF400 xrf400.no-ip.org -XRF404 xlx.bendiksverden.net -XRF413 xlx413.xrefl.net -XRF420 kc9qen.com -XRF423 4ix.hacktic.de -XRF433 xrf433.de -XRF440 dg8rp.dynaccess.de -XRF443 xrf443.arisondrio.it -XRF444 xlx444.pa3dfn.nl -XRF450 450.xreflector.org -XRF456 xrf456.de -XRF490 xrf490.dyndns.org -XRF500 125.63.57.138 -XRF502 74.208.88.137 -XRF518 xrf518.n18.de -XRF519 24.55.196.105 -XRF550 550.xreflector.es -XRF555 xrf555.w6kd.com -XRF556 xrf556.w6kd.com -XRF569 xlxreflector.jpn.ph -XRF570 xrf.no-ip.org -XRF573 216.189.148.204 -XRF580 67.20.31.79 -XRF600 xrf600.gb7de.co.uk -XRF603 xlx603.cnharc.org -XRF610 xrf610.vkradio.com -XRF666 vpngrf.webandcloud.net -XRF669 xrf669.no-ip.org -XRF678 xrf678.ddns.net -XRF699 xlx.tekniksnack.se -XRF700 xrf700.d-star.se -XRF706 xlx706.iz0rin.it -XRF707 xrf707.openquad.net -XRF710 oe7mfi.ddns.net +XRF266 212.237.51.82 +XRF270 158.64.26.132 +XRF282 211.131.186.73 +XRF284 95.158.165.32 +XRF290 94.176.6.45 +XRF291 101.143.242.189 +XRF295 64.137.160.185 +XRF298 111.169.17.74 +XRF299 125.236.227.43 +XRF300 45.62.244.43 +XRF302 144.217.241.23 +XRF307 104.36.40.243 +XRF310 52.11.207.121 +XRF313 34.213.108.164 +XRF315 65.101.7.50 +XRF317 44.48.8.15 +XRF321 31.207.110.45 +XRF328 212.237.33.114 +XRF332 188.213.168.99 +XRF333 194.116.29.73 +XRF334 96.47.95.121 +XRF335 185.206.145.2 +XRF336 23.226.233.133 +XRF339 198.98.53.247 +XRF345 xrf345.dyndns.org +XRF357 52.39.82.54 +XRF359 94.156.172.213 +XRF360 222.229.25.105 +XRF365 59.139.141.204 +XRF370 188.213.168.24 +XRF371 212.237.8.77 +XRF373 101.143.25.116 +XRF374 61.195.108.146 +XRF376 75.145.119.225 +XRF380 160.16.65.39 +XRF382 61.116.2.231 +XRF388 138.197.67.52 +XRF389 106.70.187.224 +XRF390 149.7.214.253 +XRF400 13.58.192.185 +XRF404 91.229.143.187 +XRF410 166.78.156.246 +XRF412 61.195.107.113 +XRF431 61.195.98.225 +XRF433 217.160.22.17 +XRF434 51.254.128.134 +XRF440 114.161.161.90 +XRF441 203.137.99.110 +XRF444 188.68.37.51 +XRF449 159.89.183.117 +XRF450 64.137.224.233 +XRF454 221.125.255.216 +XRF456 54.37.204.187 +XRF464 52.192.129.174 +XRF470 104.49.29.243 +XRF477 139.162.213.89 +XRF486 51.255.172.249 +XRF499 203.137.76.22 +XRF500 172.104.32.192 +XRF502 190.148.222.28 +XRF508 185.188.4.15 +XRF511 84.52.159.10 +XRF515 133.130.114.45 +XRF518 176.9.1.168 +XRF519 167.114.104.65 +XRF520 119.59.125.192 +XRF525 176.65.95.90 +XRF538 133.218.172.211 +XRF544 210.131.32.240 +XRF550 94.177.240.69 +XRF554 52.35.183.178 +XRF555 64.137.186.11 +XRF569 203.137.111.98 +XRF583 183.76.148.131 +XRF595 175.179.56.111 +XRF600 13.69.14.204 +XRF601 51.141.52.193 +XRF602 212.56.100.200 +XRF603 216.10.169.35 +XRF604 139.162.241.24 +XRF608 110.54.43.197 +XRF610 89.186.80.81 +XRF626 202.137.244.157 +XRF634 61.199.25.130 +XRF655 146.64.235.19 +XRF666 54.144.216.63 +XRF673 180.147.243.178 +XRF684 212.237.17.83 +XRF689 97.107.128.47 +XRF699 82.102.5.239 +XRF700 78.47.222.93 +XRF701 61.195.107.77 +XRF703 61.195.98.254 +XRF706 93.186.255.126 +XRF707 90.145.156.196 +XRF708 202.218.37.62 +XRF709 212.237.34.32 +XRF711 212.237.18.27 +XRF712 180.11.74.19 XRF714 85.214.119.76 -XRF719 199.227.117.121 -XRF720 xrf720.freestar.us -XRF724 191.232.36.180 -XRF727 w4icy.inerrantenergy.com +XRF717 44.137.70.100 +XRF722 80.211.2.161 +XRF723 45.33.118.112 +XRF724 75.99.228.35 +XRF730 186.64.123.59 +XRF732 190.159.68.105 +XRF733 45.56.117.158 +XRF735 104.131.81.32 XRF737 195.130.75.246 -XRF740 imagewell.duckdns.org -XRF747 xrf747.de -XRF748 xrf748.dyndns.org -XRF750 104.128.230.153 -XRF757 xrf757.openquad.net -XRF766 xlx.amrase.org.br -XRF767 xrf767.de -XRF773 xrf773.iz0rin.it -XRF777 112.218.40.91 -XRF787 xrf787.de -XRF789 xrf789.dstarxlx.com.br -XRF807 hajikko.iobb.net -XRF810 810.xreflector.org -XRF813 kj4qal.inerrantenergy.com -XRF828 xlx828.ddnss.de -XRF850 xrf850.xrfmaster.net -XRF851 xrf851.rsdt.de -XRF860 xrf.njpaasterisk.org -XRF870 103.18.207.114 -XRF886 xrf886.metropit.net -XRF888 xlx888.ns0.it -XRF897 92.222.23.124 -XRF901 xrf901.dyndns.org -XRF902 xrf902.dyndns.org -XRF905 199.212.121.20 -XRF906 xrf906.radioclubveleta.es -XRF909 xrf909.ealink.org +XRF740 173.208.200.180 +XRF746 178.254.34.44 +XRF747 87.147.134.254 +XRF748 64.137.197.36 +XRF752 66.154.105.195 +XRF755 178.22.148.229 +XRF766 201.62.48.61 +XRF773 94.177.175.230 +XRF775 149.202.61.17 +XRF776 218.221.163.75 +XRF777 194.182.66.76 +XRF781 101.143.242.199 +XRF787 93.201.107.223 +XRF794 101.143.242.95 +XRF801 213.47.71.17 +XRF803 77.117.1.235 +XRF806 92.105.198.59 +XRF808 18.220.252.27 +XRF810 64.137.238.189 +XRF812 203.145.233.141 +XRF813 97.76.81.165 +XRF828 195.225.116.244 +XRF844 137.226.79.122 +XRF850 88.198.94.77 +XRF860 80.81.9.242 +XRF870 103.3.234.95 +XRF878 203.137.123.113 +XRF883 125.207.223.228 +XRF886 118.163.103.178 +XRF887 118.163.103.177 +XRF888 31.14.135.7 +XRF893 103.235.127.147 +XRF900 94.177.237.192 +XRF903 80.211.29.226 +XRF906 212.237.11.53 +XRF907 176.84.175.87 +XRF908 92.222.23.124 +XRF909 216.86.147.198 +XRF910 94.177.207.26 XRF911 5.196.73.89 -XRF920 xrf920.oe7xxr.ampr.at -XRF929 xrf929.ddns.net -XRF930 xreflector.ddns.net -XRF950 xlx950.epf.lu +XRF912 80.211.1.143 +XRF919 80.211.232.174 +XRF921 44.143.184.83 +XRF922 81.150.10.62 +XRF925 90.255.232.101 +XRF929 158.69.166.132 +XRF930 94.177.160.5 +XRF931 71.120.181.98 +XRF933 164.132.104.167 +XRF935 188.213.166.199 +XRF940 202.218.37.121 +XRF944 202.218.34.210 +XRF945 155.94.147.186 +XRF950 158.64.26.134 +XRF964 52.173.142.244 +XRF972 46.121.158.50 +XRF973 211.14.169.43 +XRF974 94.177.217.52 +XRF975 176.31.161.9 XRF986 81.89.102.160 -XRF987 xrf987.metro-uhf.org -XRF988 988.xreflector.es -XRF989 xrf989.bbhill.net -XRF998 xlx.sm7.hamnet.nu -XRF999 xrf999.no-ip.org +XRF987 185.32.183.148 +XRF989 50.27.131.75 +XRF990 35.164.237.63 +XRF991 2.237.27.66 +XRF995 158.69.201.255 +XRF996 47.104.177.248 +XRF997 94.177.187.40 +XRF998 44.140.236.20 +XRF999 94.177.173.53 diff --git a/Data/DPlus_Hosts.txt b/Data/DPlus_Hosts.txt index 5e6bf6c..eb71752 100644 --- a/Data/DPlus_Hosts.txt +++ b/Data/DPlus_Hosts.txt @@ -1,7 +1,4 @@ -#>>Downloaded from W6KD host file server -#>>Last updated 17 NOV 2016 by W6KD -#>>Request changes on this server's lists by posting at -#>>http://xrefl.boards.net/board/2/directory-changes-forum +REF000 23.111.174.198 REF001 ref001.dstargateway.org REF002 ref002.dstargateway.org REF003 ref003.dstargateway.org @@ -40,7 +37,7 @@ REF035 ref035.dstargateway.org REF036 ref036.dstargateway.org REF037 ref037.dstargateway.org REF038 ref038.dstargateway.org -REF039 ref039.dstargateway.org +REF039 ref039.dstargateway.org REF040 ref040.dstargateway.org REF041 ref041.dstargateway.org REF042 ref042.dstargateway.org @@ -58,7 +55,7 @@ REF053 ref053.dstargateway.org REF054 ref054.dstargateway.org REF055 ref055.dstargateway.org REF056 ref056.dstargateway.org -REF057 ref057.dstargateway.org +REF057 ref057.dstargateway.org REF058 ref058.dstargateway.org REF059 ref059.dstargateway.org REF060 ref060.dstargateway.org @@ -74,37 +71,256 @@ REF069 ref069.dstargateway.org REF070 ref070.dstargateway.org REF071 ref071.dstargateway.org REF072 ref072.dstargateway.org -#REF073 ref073.dstargateway.org -#REF074 ref074.dstargateway.org +REF073 ref073.dstargateway.org +REF074 ref074.dstargateway.org REF075 ref075.dstargateway.org REF076 ref076.dstargateway.org REF077 ref077.dstargateway.org REF078 ref078.dstargateway.org -#REF079 ref079.dstargateway.org -#REF080 ref080.dstargateway.org -#REF081 ref081.dstargateway.org -#REF082 ref082.dstargateway.org -#REF083 ref083.dstargateway.org -#REF084 ref084.dstargateway.org -#REF085 ref085.dstargateway.org -#REF086 ref086.dstargateway.org -#REF087 ref087.dstargateway.org -#REF088 ref088.dstargateway.org -#REF089 ref089.dstargateway.org -#REF090 ref090.dstargateway.org -#REF091 ref091.dstargateway.org -#REF092 ref092.dstargateway.org -#REF093 ref093.dstargateway.org -#REF094 ref094.dstargateway.org -#REF095 ref095.dstargateway.org -#REF096 ref096.dstargateway.org -#REF097 ref097.dstargateway.org -#REF098 ref098.dstargateway.org -#REF099 ref099.dstargateway.org -REF117 ref001.dstargateway.org -REF212 xlx212.dstar.club -REF308 xlx308.w6kd.com -REF313 xlx313.xrefl.net -REF357 xlx357.w6kd.com -REF404 xlx.bendiksverden.net -REF850 xrf850.xrfmaster.net +REF079 ref079.dstargateway.org +REF080 ref080.dstargateway.org +REF081 ref081.dstargateway.org +REF082 ref082.dstargateway.org +REF083 ref083.dstargateway.org +REF084 ref084.dstargateway.org +REF085 ref085.dstargateway.org +REF086 ref086.dstargateway.org +REF088 194.109.192.235 +REF089 194.109.192.236 +REF090 91.92.136.252 +REF092 212.237.30.36 +REF095 203.137.76.53 +REF098 118.111.10.231 +REF099 212.237.59.103 +REF101 45.62.213.101 +REF102 23.111.174.196 +REF103 64.137.224.126 +REF104 23.111.174.197 +REF105 51.254.99.78 +REF109 182.168.101.180 +REF110 150.7.164.10 +REF111 61.195.96.160 +REF113 151.12.36.103 +REF114 5.135.188.16 +REF115 217.182.128.3 +REF116 31.185.101.211 +REF118 5.249.148.252 +REF119 125.129.207.86 +REF120 81.150.10.63 +REF121 174.37.249.156 +REF122 83.137.45.100 +REF124 211.14.169.234 +REF125 213.181.208.52 +REF129 219.116.28.227 +REF130 194.59.177.45 +REF131 80.127.118.226 +REF132 91.203.55.87 +REF134 159.89.176.86 +REF145 178.59.23.138 +REF147 46.41.1.127 +REF150 80.211.10.212 +REF170 210.178.113.173 +REF171 121.162.91.45 +REF180 192.241.240.7 +REF202 148.251.122.251 +REF204 185.85.18.162 +REF206 193.190.240.227 +REF208 151.80.155.39 +REF210 64.137.224.107 +REF212 52.38.90.188 +REF214 185.47.129.230 +REF215 185.87.96.172 +REF216 74.214.25.135 +REF220 124.41.83.11 +REF222 212.43.96.84 +REF224 203.137.99.97 +REF226 94.176.6.37 +REF228 188.60.43.206 +REF229 194.191.4.54 +REF230 80.250.3.114 +REF232 89.185.97.35 +REF235 5.150.254.97 +REF238 172.104.239.219 +REF241 151.80.158.227 +REF242 73.14.84.43 +REF246 172.93.48.159 +REF263 85.214.193.146 +REF264 52.2.131.118 +REF266 212.237.51.82 +REF270 158.64.26.132 +REF282 211.131.186.73 +REF284 95.158.165.32 +REF290 94.176.6.45 +REF291 101.143.242.189 +REF295 64.137.160.185 +REF298 111.169.17.74 +REF299 125.236.227.43 +REF300 45.62.244.43 +REF302 144.217.241.23 +REF307 104.36.40.243 +REF310 52.11.207.121 +REF313 34.213.108.164 +REF315 65.101.7.50 +REF317 44.48.8.15 +REF321 31.207.110.45 +REF328 212.237.33.114 +REF332 188.213.168.99 +REF333 194.116.29.73 +REF334 96.47.95.121 +REF335 185.206.145.2 +REF336 23.226.233.133 +REF339 198.98.53.247 +REF345 45.62.237.34 +REF357 52.39.82.54 +REF359 94.156.172.213 +REF360 222.229.25.105 +REF365 59.139.141.204 +REF370 188.213.168.24 +REF371 212.237.8.77 +REF373 101.143.25.116 +REF374 61.195.108.146 +REF376 75.145.119.225 +REF380 160.16.65.39 +REF382 61.116.2.231 +REF388 138.197.67.52 +REF389 106.70.187.224 +REF390 149.7.214.253 +REF400 13.58.192.185 +REF404 91.229.143.187 +REF410 166.78.156.246 +REF412 61.195.107.113 +REF431 61.195.98.225 +REF433 217.160.22.17 +REF434 51.254.128.134 +REF440 114.161.161.90 +REF441 203.137.99.110 +REF444 188.68.37.51 +REF449 159.89.183.117 +REF450 64.137.224.233 +REF454 221.125.255.216 +REF456 54.37.204.187 +REF464 52.192.129.174 +REF470 104.49.29.243 +REF477 139.162.213.89 +REF486 51.255.172.249 +REF499 203.137.76.22 +REF500 172.104.32.192 +REF502 190.148.222.28 +REF508 185.188.4.15 +REF511 84.52.159.10 +REF515 133.130.114.45 +REF518 176.9.1.168 +REF519 167.114.104.65 +REF520 119.59.125.192 +REF525 176.65.95.90 +REF538 133.218.172.211 +REF544 210.131.32.240 +REF550 94.177.240.69 +REF554 52.35.183.178 +REF555 64.137.186.11 +REF569 203.137.111.98 +REF583 183.76.148.131 +REF595 175.179.56.111 +REF600 13.69.14.204 +REF601 51.141.52.193 +REF602 212.56.100.200 +REF603 216.10.169.35 +REF604 139.162.241.24 +REF608 110.54.43.197 +REF610 89.186.80.81 +REF626 202.137.244.157 +REF634 61.199.25.130 +REF655 146.64.235.19 +REF666 54.144.216.63 +REF673 180.147.243.178 +REF684 212.237.17.83 +REF689 97.107.128.47 +REF699 82.102.5.239 +REF700 78.47.222.93 +REF701 61.195.107.77 +REF703 61.195.98.254 +REF706 93.186.255.126 +REF707 90.145.156.196 +REF708 202.218.37.62 +REF709 212.237.34.32 +REF711 212.237.18.27 +REF712 180.11.74.19 +REF714 85.214.119.76 +REF717 44.137.70.100 +REF722 80.211.2.161 +REF723 45.33.118.112 +REF724 75.99.228.35 +REF730 186.64.123.59 +REF732 190.159.68.105 +REF733 45.56.117.158 +REF735 104.131.81.32 +REF737 195.130.75.246 +REF740 173.208.200.180 +REF746 178.254.34.44 +REF747 87.147.134.254 +REF748 64.137.197.36 +REF752 66.154.105.195 +REF755 178.22.148.229 +REF766 201.62.48.61 +REF773 94.177.175.230 +REF775 149.202.61.17 +REF776 218.221.163.75 +REF777 194.182.66.76 +REF781 101.143.242.199 +REF787 93.201.107.223 +REF794 101.143.242.95 +REF801 213.47.71.17 +REF803 77.117.1.235 +REF806 92.105.198.59 +REF808 18.220.252.27 +REF810 64.137.238.189 +REF812 203.145.233.141 +REF813 97.76.81.165 +REF828 195.225.116.244 +REF844 137.226.79.122 +REF850 88.198.94.77 +REF860 80.81.9.242 +REF870 103.3.234.95 +REF878 203.137.123.113 +REF883 125.207.223.228 +REF886 118.163.103.178 +REF887 118.163.103.177 +REF888 31.14.135.7 +REF893 103.235.127.147 +REF900 94.177.237.192 +REF903 80.211.29.226 +REF906 212.237.11.53 +REF907 176.84.175.87 +REF908 92.222.23.124 +REF909 216.86.147.198 +REF910 94.177.207.26 +REF911 5.196.73.89 +REF912 80.211.1.143 +REF919 80.211.232.174 +REF921 44.143.184.83 +REF922 81.150.10.62 +REF925 90.255.232.101 +REF929 158.69.166.132 +REF930 94.177.160.5 +REF931 71.120.181.98 +REF933 164.132.104.167 +REF935 188.213.166.199 +REF940 202.218.37.121 +REF944 202.218.34.210 +REF945 155.94.147.186 +REF950 158.64.26.134 +REF964 52.173.142.244 +REF972 46.121.158.50 +REF973 211.14.169.43 +REF974 94.177.217.52 +REF975 176.31.161.9 +REF986 81.89.102.160 +REF987 185.32.183.148 +REF989 50.27.131.75 +REF990 35.164.237.63 +REF991 2.237.27.66 +REF995 158.69.201.255 +REF996 47.104.177.248 +REF997 94.177.187.40 +REF998 44.140.236.20 +REF999 94.177.173.53 From 5124a594e77cfb8e4aa55eb6aac3fd8ae7c50100 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Wed, 27 Jun 2018 18:36:42 +0100 Subject: [PATCH 007/166] Bump the version date. --- Common/Version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Common/Version.h b/Common/Version.h index 9138fe5..aa37246 100644 --- a/Common/Version.h +++ b/Common/Version.h @@ -24,9 +24,9 @@ const wxString VENDOR_NAME = wxT("G4KLX"); #if defined(__WXDEBUG__) -const wxString VERSION = wxT("20180509 - DEBUG"); +const wxString VERSION = wxT("20180627 - DEBUG"); #else -const wxString VERSION = wxT("20180509"); +const wxString VERSION = wxT("20180627"); #endif #endif From 96426b50d9e616f81d67263c47a961634e393e75 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Wed, 4 Jul 2018 07:32:09 +0100 Subject: [PATCH 008/166] Fix obvious bug is GPS-A handling. --- Common/APRSCollector - Copy.cpp | 661 ++++++++++++++++++++++++++++++++ Common/APRSCollector.cpp | 2 +- 2 files changed, 662 insertions(+), 1 deletion(-) create mode 100644 Common/APRSCollector - Copy.cpp diff --git a/Common/APRSCollector - Copy.cpp b/Common/APRSCollector - Copy.cpp new file mode 100644 index 0000000..1973427 --- /dev/null +++ b/Common/APRSCollector - Copy.cpp @@ -0,0 +1,661 @@ +/* + * Copyright (C) 2010,2012,2013,2014 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 + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include "APRSCollector.h" +#include "DStarDefines.h" +#include "Utils.h" + +const unsigned int APRS_CSUM_LENGTH = 4U; +const unsigned int APRS_DATA_LENGTH = 300U; +const unsigned int SLOW_DATA_BLOCK_LENGTH = 6U; + +CAPRSCollector::CAPRSCollector() : +m_state(AS_NONE), +m_ggaData(NULL), +m_ggaLength(0U), +m_ggaValid(false), +m_rmcData(NULL), +m_rmcLength(0U), +m_rmcValid(false), +m_crcData(NULL), +m_crcLength(0U), +m_crcValid(false), +m_txtData(NULL), +m_txtLength(0U), +m_txtValid(false), +m_buffer(NULL), +m_slowData(SS_FIRST) +{ + m_ggaData = new unsigned char[APRS_DATA_LENGTH]; + m_rmcData = new unsigned char[APRS_DATA_LENGTH]; + m_crcData = new unsigned char[APRS_DATA_LENGTH]; + m_txtData = new unsigned char[APRS_DATA_LENGTH]; + m_buffer = new unsigned char[SLOW_DATA_BLOCK_LENGTH]; +} + +CAPRSCollector::~CAPRSCollector() +{ + delete[] m_ggaData; + delete[] m_rmcData; + delete[] m_crcData; + delete[] m_txtData; + delete[] m_buffer; +} + +bool CAPRSCollector::writeData(const unsigned char* data) +{ + wxASSERT(data != NULL); + + switch (m_slowData) { + case SS_FIRST: + m_buffer[0U] = data[0U] ^ SCRAMBLER_BYTE1; + m_buffer[1U] = data[1U] ^ SCRAMBLER_BYTE2; + m_buffer[2U] = data[2U] ^ SCRAMBLER_BYTE3; + m_slowData = SS_SECOND; + return false; + + case SS_SECOND: + m_buffer[3U] = data[0U] ^ SCRAMBLER_BYTE1; + m_buffer[4U] = data[1U] ^ SCRAMBLER_BYTE2; + m_buffer[5U] = data[2U] ^ SCRAMBLER_BYTE3; + m_slowData = SS_FIRST; + break; + } + + // Is it GPS data, or are we collecting data already? + if ((m_buffer[0U] & SLOW_DATA_TYPE_MASK) != SLOW_DATA_TYPE_GPS) + return false; + + return addData(m_buffer + 1U); +} + +void CAPRSCollector::reset() +{ + m_state = AS_NONE; + m_ggaLength = 0U; + m_ggaValid = false; + m_rmcLength = 0U; + m_rmcValid = false; + m_crcLength = 0U; + m_crcValid = false; + m_txtLength = 0U; + m_txtValid = false; + m_slowData = SS_FIRST; +} + +void CAPRSCollector::sync() +{ + m_slowData = SS_FIRST; +} + +bool CAPRSCollector::addData(const unsigned char* data) +{ + wxASSERT(data != NULL); + + if (::memcmp(data, "$GPGG", 5U) == 0) { + m_state = AS_GGA; + m_ggaLength = 0U; + m_ggaValid = false; + m_rmcLength = 0U; + m_rmcValid = false; + m_txtLength = 0U; + m_txtValid = false; + addGGAData(data); + return false; + } else if (::memcmp(data, "$GPRM", 5U) == 0) { + m_state = AS_RMC; + m_rmcLength = 0U; + m_rmcValid = false; + m_txtLength = 0U; + m_txtValid = false; + addRMCData(data); + return false; + } else if (::memcmp(data, "$$CRC", 5U) == 0) { + m_state = AS_CRC; + m_crcLength = 0U; + m_crcValid = false; + return addCRCData(data); + } else if (m_state == AS_RMC && m_rmcLength == 0U) { + m_state = AS_TXT; + m_txtLength = 0U; + m_txtValid = false; + addTXTData(data); + return false; + } else if (m_state == AS_GGA) { + addGGAData(data); + return false; + } else if (m_state == AS_RMC) { + addRMCData(data); + return false; + } else if (m_state == AS_CRC) { + return addCRCData(data); + } else if (m_state == AS_TXT) { + return addTXTData(data); + } + + return false; +} + +void CAPRSCollector::addGGAData(const unsigned char* data) +{ + for (unsigned int i = 0U; i < 5U; i++) { + unsigned char c = data[i]; + + m_ggaData[m_ggaLength] = c & 0x7FU; + m_ggaLength++; + + if (m_ggaLength >= APRS_DATA_LENGTH) { + // CUtils::dump(wxT("Missed end of $GPGGA data"), m_ggaData, m_ggaLength); + m_ggaLength = 0U; + m_ggaValid = false; + m_state = AS_NONE; + return; + } + + if (c == 0x0AU) { + bool ret = checkXOR(m_ggaData + 1U, m_ggaLength - 1U); + if (ret) { + // CUtils::dump(wxT("$GPGGA Valid"), m_ggaData, m_ggaLength); + m_ggaValid = true; + m_state = AS_RMC; + return; + } else { + // CUtils::dump(wxT("$GPGGA Bad checksum"), m_ggaData, m_ggaLength); + m_ggaLength = 0U; + m_ggaValid = false; + m_state = AS_RMC; + return; + } + } + } +} + +void CAPRSCollector::addRMCData(const unsigned char* data) +{ + for (unsigned int i = 0U; i < 5U; i++) { + unsigned char c = data[i]; + + m_rmcData[m_rmcLength] = c & 0x7FU; + m_rmcLength++; + + if (m_rmcLength >= APRS_DATA_LENGTH) { + // CUtils::dump(wxT("Missed end of $GPRMC data"), m_rmcData, m_rmcLength); + m_rmcLength = 0U; + m_rmcValid = false; + m_state = AS_NONE; + return; + } + + if (c == 0x0AU) { + bool ret = checkXOR(m_rmcData + 1U, m_rmcLength - 1U); + if (ret) { + // CUtils::dump(wxT("$GPRMC Valid"), m_rmcData, m_rmcLength); + m_rmcValid = true; + m_state = AS_TXT; + return; + } else { + // CUtils::dump(wxT("$GPRMC Bad checksum"), m_rmcData, m_rmcLength); + m_rmcLength = 0U; + m_rmcValid = false; + m_state = AS_TXT; + return; + } + } + } +} + +bool CAPRSCollector::addCRCData(const unsigned char* data) +{ + for (unsigned int i = 0U; i < 5U; i++) { + unsigned char c = data[i]; + + // m_crcData[m_crcLength] = c & 0x7FU; // XXX + m_crcData[m_crcLength] = c; + m_crcLength++; + + if (m_crcLength >= APRS_DATA_LENGTH) { + // CUtils::dump(wxT("Missed end of $$CRC data"), m_crcData, m_crcLength); + m_state = AS_NONE; + m_crcLength = 0U; + m_crcValid = false; + return false; + } + + if (c == 0x0DU) { + bool ret = checkCRC(m_crcData, m_crcLength); + if (ret) { + // CUtils::dump(wxT("$$CRC Valid"), m_crcData, m_crcLength); + m_state = AS_NONE; + m_crcValid = true; + return true; + } else { + // CUtils::dump(wxT("$$CRC Bad checksum"), m_crcData, m_crcLength); + m_state = AS_NONE; + m_crcLength = 0U; + m_crcValid = false; + return false; + } + } + } + + return false; +} + +bool CAPRSCollector::addTXTData(const unsigned char* data) +{ + for (unsigned int i = 0U; i < 5U; i++) { + unsigned char c = data[i]; + + m_txtData[m_txtLength] = c & 0x7FU; + m_txtLength++; + + if (m_txtLength >= APRS_DATA_LENGTH) { + // CUtils::dump(wxT("Missed end of TEXT data"), m_txtData, m_txtLength); + m_state = AS_NONE; + m_txtLength = 0U; + m_txtValid = false; + return false; + } + + if (c == 0x0AU) { + bool ret = checkXOR(m_txtData, m_txtLength); + if (ret) { + // CUtils::dump(wxT("TEXT Valid"), m_txtData, m_txtLength); + m_state = AS_NONE; + m_txtValid = true; + return true; + } else { + // CUtils::dump(wxT("TEXT Bad checksum"), m_txtData, m_txtLength); + m_state = AS_NONE; + m_txtLength = 0U; + m_txtValid = false; + return false; + } + } + } + + return false; +} + +unsigned int CAPRSCollector::getData(unsigned char* data, unsigned int length) +{ + wxASSERT(data != NULL); + + // Have we got GPS-A data? + if (m_crcValid) { + unsigned int len = m_crcLength - 10U; + if (len > length) + len = length; + + ::memcpy(data, m_crcData + 10U, len); + + m_crcLength = 0U; + m_crcValid = false; + + return len; + } + + // Have we got GGA and text data? + if (m_ggaValid && m_txtValid) { + unsigned int len = convertNMEA1(data, length); + + m_ggaLength = 0U; + m_rmcLength = 0U; + m_txtLength = 0U; + m_ggaValid = false; + m_rmcValid = false; + m_txtValid = false; + + return len; + } + + // Have we got RMC and text data? + if (m_rmcValid && m_txtValid) { + unsigned int len = convertNMEA2(data, length); + + m_ggaLength = 0U; + m_rmcLength = 0U; + m_txtLength = 0U; + m_ggaValid = false; + m_rmcValid = false; + m_txtValid = false; + + return len; + } + + return 0U; +} + +bool CAPRSCollector::checkXOR(const unsigned char* data, unsigned int length) const +{ + unsigned int posStar = 0U; + for (unsigned int i = length - 1U; i > 0U; i--) { + if (data[i] == '*') { + posStar = i; + break; + } + } + + if (posStar == 0U) + return false; + + unsigned char csum = calcXOR(data, posStar); + + char buffer[10U]; + ::sprintf(buffer, "%02X", csum); + + return ::memcmp(buffer, data + posStar + 1U, 2U) == 0; +} + +unsigned char CAPRSCollector::calcXOR(const unsigned char* buffer, unsigned int length) const +{ + wxASSERT(buffer != NULL); + wxASSERT(length > 0U); + + unsigned char res = 0U; + + for (unsigned int i = 0U; i < length; i++) + res ^= buffer[i]; + + return res; +} + +bool CAPRSCollector::checkCRC(const unsigned char* data, unsigned int length) const +{ + unsigned int csum = calcCRC(data + 10U, length - 10U); + + char buffer[10U]; + ::sprintf(buffer, "%04X", csum); + + return ::memcmp(buffer, data + 5U, APRS_CSUM_LENGTH) == 0; +} + +unsigned int CAPRSCollector::calcCRC(const unsigned char* buffer, unsigned int length) const +{ + wxASSERT(buffer != NULL); + wxASSERT(length > 0U); + + unsigned int icomcrc = 0xFFFFU; + + for (unsigned int j = 0U; j < length; j++) { + unsigned char ch = buffer[j]; + + for (unsigned int i = 0U; i < 8U; i++) { + bool xorflag = (((icomcrc ^ ch) & 0x01U) == 0x01U); + + icomcrc >>= 1; + + if (xorflag) + icomcrc ^= 0x8408U; + + ch >>= 1; + } + } + + return ~icomcrc & 0xFFFFU; +} + +unsigned int CAPRSCollector::convertNMEA1(unsigned char* data, unsigned int) +{ + // Parse the $GPGGA string into tokens + char* pGGA[20U]; + ::memset(pGGA, 0x00U, 20U * sizeof(char*)); + unsigned int nGGA = 0U; + + char* str = (char*)m_ggaData; + for (;;) { + char* p = mystrsep(&str, ",\r\n"); + + pGGA[nGGA++] = p; + if (p == NULL) + break; + } + + // Is there any position data? + if (pGGA[2U] == NULL || pGGA[3U] == NULL || pGGA[4U] == NULL || pGGA[5U] == NULL || ::strlen(pGGA[2U]) == 0U || ::strlen(pGGA[3U]) == 0U || ::strlen(pGGA[4U]) == 0 || ::strlen(pGGA[5U]) == 0) + return 0U; + + // Is it a valid GPS fix? + if (::strcmp(pGGA[6U], "0") == 0) + return 0U; + + char callsign[10U]; + ::memset(callsign, ' ', 10U); + ::strncpy(callsign, (char*)m_txtData, 7U); + + // This can't fail! + char* p = ::strchr(callsign, ' '); + + if (m_txtData[6U] == ' ' && m_txtData[7U] != ' ') { + *p++ = '-'; + *p++ = m_txtData[7U]; + } else if (m_txtData[6U] != ' ' && m_txtData[7U] != ' ') { + *p++ = m_txtData[7U]; + } + + *p = '\0'; + + char symbol, overlay; + getSymbol(m_txtData + 9U, symbol, overlay); + + ::sprintf((char*)data, "%s>APDPRS,DSTAR*:!%.7s%s%c%.8s%s%c", callsign, pGGA[2U], pGGA[3U], overlay, pGGA[4U], pGGA[5U], symbol); + + // Get the bearing and speed from the RMC data + if (m_rmcValid) { + // Parse the $GPRMC string into tokens + char* pRMC[20U]; + ::memset(pRMC, 0x00U, 20U * sizeof(char*)); + unsigned int nRMC = 0U; + + str = (char*)m_rmcData; + for (;;) { + p = mystrsep(&str, ",\r\n"); + + pRMC[nRMC++] = p; + if (p == NULL) + break; + } + + // Check that we have a bearing and speed + if (pRMC[7U] != NULL && pRMC[8U] != NULL && ::strlen(pRMC[7U]) > 0U && ::strlen(pRMC[8U]) > 0U) { + int bearing = ::atoi(pRMC[8U]); + int speed = ::atoi(pRMC[7U]); + + ::sprintf((char*)data + ::strlen((char*)data), "%03d/%03d", bearing, speed); + } + } + + ::strcat((char*)data, " "); + + // Insert the message text + unsigned int j = ::strlen((char*)data); + for (unsigned int i = 13U; i < 29U; i++) { + unsigned char c = m_txtData[i]; + + if (c == '*') { + data[j] = '\0'; + break; + } + + data[j++] = c; + } + + if (pGGA[9U] != NULL && ::strlen(pGGA[9U]) > 0U) { + // Convert altitude from metres to feet + int altitude = ::atoi(pGGA[9U]); + ::sprintf((char*)data + ::strlen((char*)data), "/A=%06.0f", float(altitude) * 3.28F); + } + + return ::strlen((char*)data); +} + +unsigned int CAPRSCollector::convertNMEA2(unsigned char* data, unsigned int) +{ + // Parse the $GPRMC string into tokens + char* pRMC[20U]; + ::memset(pRMC, 0x00U, 20U * sizeof(char*)); + unsigned int nRMC = 0U; + + char* str = (char*)m_rmcData; + for (;;) { + char* p = mystrsep(&str, ",\r\n"); + + pRMC[nRMC++] = p; + if (p == NULL) + break; + } + + // Is there any position data? + if (pRMC[3U] == NULL || pRMC[4U] == NULL || pRMC[5U] == NULL || pRMC[6U] == NULL || ::strlen(pRMC[3U]) == 0U || ::strlen(pRMC[4U]) == 0U || ::strlen(pRMC[5U]) == 0 || ::strlen(pRMC[6U]) == 0) + return 0U; + + // Is it a valid GPS fix? + if (::strcmp(pRMC[2U], "A") != 0) + return 0U; + + char callsign[10U]; + ::memset(callsign, ' ', 10U); + ::strncpy(callsign, (char*)m_txtData, 7U); + + // This can't fail! + char* p = ::strchr(callsign, ' '); + + if (m_txtData[6U] == ' ' && m_txtData[7U] != ' ') { + *p++ = '-'; + *p++ = m_txtData[7U]; + } else if (m_txtData[6U] != ' ' && m_txtData[7U] != ' ') { + *p++ = m_txtData[7U]; + } + + *p = '\0'; + + char symbol, overlay; + getSymbol(m_txtData + 9U, symbol, overlay); + + ::sprintf((char*)data, "%s>APDPRS,DSTAR*:!%.7s%s%c%.8s%s%c", callsign, pRMC[3U], pRMC[4U], overlay, pRMC[5U], pRMC[6U], symbol); + + if (pRMC[7U] != NULL && pRMC[8U] != NULL && ::strlen(pRMC[7U]) > 0U && ::strlen(pRMC[8U]) > 0U) { + int bearing = ::atoi(pRMC[8U]); + int speed = ::atoi(pRMC[7U]); + + ::sprintf((char*)data + ::strlen((char*)data), "%03d/%03d", bearing, speed); + } + + if (m_txtData[13U] != '*') + ::strcat((char*)data, " "); + + // Insert the message text + unsigned int j = ::strlen((char*)data); + for (unsigned int i = 13U; i < 29U; i++) { + unsigned char c = m_txtData[i]; + + if (c == '*') { + data[j] = '\0'; + break; + } + + data[j++] = c; + } + + return ::strlen((char*)data); +} + +// Function taken from DPRSIntf.java from Pete Loveall AE5PL +void CAPRSCollector::getSymbol(const unsigned char* data, char& symbol, char& overlay) +{ + symbol = '.'; + + if (data[3U] == ' ') { + int offset = -1; + + switch (data[0U]) { + case 'B': + case 'O': + offset = -33; + break; + case 'P': + case 'A': + offset = 0; + break; + case 'M': + case 'N': + offset = -24; + break; + case 'H': + case 'D': + offset = 8; + break; + case 'L': + case 'S': + offset = 32; + break; + case 'J': + case 'Q': + offset = 74; + break; + default: + break; + } + + if (offset != -1 && ::isalnum(data[1U])) { + bool altIcons = false; + + // x is valid, lets get y + switch (data[0U]) { + case 'O': + case 'A': + case 'N': + case 'D': + case 'S': + case 'Q': + altIcons = true; + break; + } + + symbol = char(data[1U] + offset); + + overlay = '/'; + + if (altIcons) { + if (data[2] == ' ') + overlay = '\\'; + else if (::isalnum(data[2])) + overlay = data[2U]; + else + overlay = 0; + } + } + } +} + +// Source found at +char* CAPRSCollector::mystrsep(char** sp, const char* sep) const +{ + if (sp == NULL || *sp == NULL || **sp == '\0') + return NULL; + + char* s = *sp; + char* p = s + ::strcspn(s, sep); + + if (*p != '\0') + *p++ = '\0'; + + *sp = p; + + return s; +} diff --git a/Common/APRSCollector.cpp b/Common/APRSCollector.cpp index b44fc06..c44a0a8 100644 --- a/Common/APRSCollector.cpp +++ b/Common/APRSCollector.cpp @@ -255,7 +255,7 @@ bool CAPRSCollector::addCRCData() m_crcLength = 0U; for (int i = n1; i <= n2; i++) { - m_crcData[m_rmcLength] = m_collector.GetChar(i); + m_crcData[m_crcLength] = m_collector.GetChar(i); m_crcLength++; } From e4b1ddd1bdf9818ba9c706226546ca5920169aef Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Wed, 4 Jul 2018 07:33:22 +0100 Subject: [PATCH 009/166] Remove old copy of the APRS collector. --- Common/APRSCollector - Copy.cpp | 661 -------------------------------- 1 file changed, 661 deletions(-) delete mode 100644 Common/APRSCollector - Copy.cpp diff --git a/Common/APRSCollector - Copy.cpp b/Common/APRSCollector - Copy.cpp deleted file mode 100644 index 1973427..0000000 --- a/Common/APRSCollector - Copy.cpp +++ /dev/null @@ -1,661 +0,0 @@ -/* - * Copyright (C) 2010,2012,2013,2014 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 - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include "APRSCollector.h" -#include "DStarDefines.h" -#include "Utils.h" - -const unsigned int APRS_CSUM_LENGTH = 4U; -const unsigned int APRS_DATA_LENGTH = 300U; -const unsigned int SLOW_DATA_BLOCK_LENGTH = 6U; - -CAPRSCollector::CAPRSCollector() : -m_state(AS_NONE), -m_ggaData(NULL), -m_ggaLength(0U), -m_ggaValid(false), -m_rmcData(NULL), -m_rmcLength(0U), -m_rmcValid(false), -m_crcData(NULL), -m_crcLength(0U), -m_crcValid(false), -m_txtData(NULL), -m_txtLength(0U), -m_txtValid(false), -m_buffer(NULL), -m_slowData(SS_FIRST) -{ - m_ggaData = new unsigned char[APRS_DATA_LENGTH]; - m_rmcData = new unsigned char[APRS_DATA_LENGTH]; - m_crcData = new unsigned char[APRS_DATA_LENGTH]; - m_txtData = new unsigned char[APRS_DATA_LENGTH]; - m_buffer = new unsigned char[SLOW_DATA_BLOCK_LENGTH]; -} - -CAPRSCollector::~CAPRSCollector() -{ - delete[] m_ggaData; - delete[] m_rmcData; - delete[] m_crcData; - delete[] m_txtData; - delete[] m_buffer; -} - -bool CAPRSCollector::writeData(const unsigned char* data) -{ - wxASSERT(data != NULL); - - switch (m_slowData) { - case SS_FIRST: - m_buffer[0U] = data[0U] ^ SCRAMBLER_BYTE1; - m_buffer[1U] = data[1U] ^ SCRAMBLER_BYTE2; - m_buffer[2U] = data[2U] ^ SCRAMBLER_BYTE3; - m_slowData = SS_SECOND; - return false; - - case SS_SECOND: - m_buffer[3U] = data[0U] ^ SCRAMBLER_BYTE1; - m_buffer[4U] = data[1U] ^ SCRAMBLER_BYTE2; - m_buffer[5U] = data[2U] ^ SCRAMBLER_BYTE3; - m_slowData = SS_FIRST; - break; - } - - // Is it GPS data, or are we collecting data already? - if ((m_buffer[0U] & SLOW_DATA_TYPE_MASK) != SLOW_DATA_TYPE_GPS) - return false; - - return addData(m_buffer + 1U); -} - -void CAPRSCollector::reset() -{ - m_state = AS_NONE; - m_ggaLength = 0U; - m_ggaValid = false; - m_rmcLength = 0U; - m_rmcValid = false; - m_crcLength = 0U; - m_crcValid = false; - m_txtLength = 0U; - m_txtValid = false; - m_slowData = SS_FIRST; -} - -void CAPRSCollector::sync() -{ - m_slowData = SS_FIRST; -} - -bool CAPRSCollector::addData(const unsigned char* data) -{ - wxASSERT(data != NULL); - - if (::memcmp(data, "$GPGG", 5U) == 0) { - m_state = AS_GGA; - m_ggaLength = 0U; - m_ggaValid = false; - m_rmcLength = 0U; - m_rmcValid = false; - m_txtLength = 0U; - m_txtValid = false; - addGGAData(data); - return false; - } else if (::memcmp(data, "$GPRM", 5U) == 0) { - m_state = AS_RMC; - m_rmcLength = 0U; - m_rmcValid = false; - m_txtLength = 0U; - m_txtValid = false; - addRMCData(data); - return false; - } else if (::memcmp(data, "$$CRC", 5U) == 0) { - m_state = AS_CRC; - m_crcLength = 0U; - m_crcValid = false; - return addCRCData(data); - } else if (m_state == AS_RMC && m_rmcLength == 0U) { - m_state = AS_TXT; - m_txtLength = 0U; - m_txtValid = false; - addTXTData(data); - return false; - } else if (m_state == AS_GGA) { - addGGAData(data); - return false; - } else if (m_state == AS_RMC) { - addRMCData(data); - return false; - } else if (m_state == AS_CRC) { - return addCRCData(data); - } else if (m_state == AS_TXT) { - return addTXTData(data); - } - - return false; -} - -void CAPRSCollector::addGGAData(const unsigned char* data) -{ - for (unsigned int i = 0U; i < 5U; i++) { - unsigned char c = data[i]; - - m_ggaData[m_ggaLength] = c & 0x7FU; - m_ggaLength++; - - if (m_ggaLength >= APRS_DATA_LENGTH) { - // CUtils::dump(wxT("Missed end of $GPGGA data"), m_ggaData, m_ggaLength); - m_ggaLength = 0U; - m_ggaValid = false; - m_state = AS_NONE; - return; - } - - if (c == 0x0AU) { - bool ret = checkXOR(m_ggaData + 1U, m_ggaLength - 1U); - if (ret) { - // CUtils::dump(wxT("$GPGGA Valid"), m_ggaData, m_ggaLength); - m_ggaValid = true; - m_state = AS_RMC; - return; - } else { - // CUtils::dump(wxT("$GPGGA Bad checksum"), m_ggaData, m_ggaLength); - m_ggaLength = 0U; - m_ggaValid = false; - m_state = AS_RMC; - return; - } - } - } -} - -void CAPRSCollector::addRMCData(const unsigned char* data) -{ - for (unsigned int i = 0U; i < 5U; i++) { - unsigned char c = data[i]; - - m_rmcData[m_rmcLength] = c & 0x7FU; - m_rmcLength++; - - if (m_rmcLength >= APRS_DATA_LENGTH) { - // CUtils::dump(wxT("Missed end of $GPRMC data"), m_rmcData, m_rmcLength); - m_rmcLength = 0U; - m_rmcValid = false; - m_state = AS_NONE; - return; - } - - if (c == 0x0AU) { - bool ret = checkXOR(m_rmcData + 1U, m_rmcLength - 1U); - if (ret) { - // CUtils::dump(wxT("$GPRMC Valid"), m_rmcData, m_rmcLength); - m_rmcValid = true; - m_state = AS_TXT; - return; - } else { - // CUtils::dump(wxT("$GPRMC Bad checksum"), m_rmcData, m_rmcLength); - m_rmcLength = 0U; - m_rmcValid = false; - m_state = AS_TXT; - return; - } - } - } -} - -bool CAPRSCollector::addCRCData(const unsigned char* data) -{ - for (unsigned int i = 0U; i < 5U; i++) { - unsigned char c = data[i]; - - // m_crcData[m_crcLength] = c & 0x7FU; // XXX - m_crcData[m_crcLength] = c; - m_crcLength++; - - if (m_crcLength >= APRS_DATA_LENGTH) { - // CUtils::dump(wxT("Missed end of $$CRC data"), m_crcData, m_crcLength); - m_state = AS_NONE; - m_crcLength = 0U; - m_crcValid = false; - return false; - } - - if (c == 0x0DU) { - bool ret = checkCRC(m_crcData, m_crcLength); - if (ret) { - // CUtils::dump(wxT("$$CRC Valid"), m_crcData, m_crcLength); - m_state = AS_NONE; - m_crcValid = true; - return true; - } else { - // CUtils::dump(wxT("$$CRC Bad checksum"), m_crcData, m_crcLength); - m_state = AS_NONE; - m_crcLength = 0U; - m_crcValid = false; - return false; - } - } - } - - return false; -} - -bool CAPRSCollector::addTXTData(const unsigned char* data) -{ - for (unsigned int i = 0U; i < 5U; i++) { - unsigned char c = data[i]; - - m_txtData[m_txtLength] = c & 0x7FU; - m_txtLength++; - - if (m_txtLength >= APRS_DATA_LENGTH) { - // CUtils::dump(wxT("Missed end of TEXT data"), m_txtData, m_txtLength); - m_state = AS_NONE; - m_txtLength = 0U; - m_txtValid = false; - return false; - } - - if (c == 0x0AU) { - bool ret = checkXOR(m_txtData, m_txtLength); - if (ret) { - // CUtils::dump(wxT("TEXT Valid"), m_txtData, m_txtLength); - m_state = AS_NONE; - m_txtValid = true; - return true; - } else { - // CUtils::dump(wxT("TEXT Bad checksum"), m_txtData, m_txtLength); - m_state = AS_NONE; - m_txtLength = 0U; - m_txtValid = false; - return false; - } - } - } - - return false; -} - -unsigned int CAPRSCollector::getData(unsigned char* data, unsigned int length) -{ - wxASSERT(data != NULL); - - // Have we got GPS-A data? - if (m_crcValid) { - unsigned int len = m_crcLength - 10U; - if (len > length) - len = length; - - ::memcpy(data, m_crcData + 10U, len); - - m_crcLength = 0U; - m_crcValid = false; - - return len; - } - - // Have we got GGA and text data? - if (m_ggaValid && m_txtValid) { - unsigned int len = convertNMEA1(data, length); - - m_ggaLength = 0U; - m_rmcLength = 0U; - m_txtLength = 0U; - m_ggaValid = false; - m_rmcValid = false; - m_txtValid = false; - - return len; - } - - // Have we got RMC and text data? - if (m_rmcValid && m_txtValid) { - unsigned int len = convertNMEA2(data, length); - - m_ggaLength = 0U; - m_rmcLength = 0U; - m_txtLength = 0U; - m_ggaValid = false; - m_rmcValid = false; - m_txtValid = false; - - return len; - } - - return 0U; -} - -bool CAPRSCollector::checkXOR(const unsigned char* data, unsigned int length) const -{ - unsigned int posStar = 0U; - for (unsigned int i = length - 1U; i > 0U; i--) { - if (data[i] == '*') { - posStar = i; - break; - } - } - - if (posStar == 0U) - return false; - - unsigned char csum = calcXOR(data, posStar); - - char buffer[10U]; - ::sprintf(buffer, "%02X", csum); - - return ::memcmp(buffer, data + posStar + 1U, 2U) == 0; -} - -unsigned char CAPRSCollector::calcXOR(const unsigned char* buffer, unsigned int length) const -{ - wxASSERT(buffer != NULL); - wxASSERT(length > 0U); - - unsigned char res = 0U; - - for (unsigned int i = 0U; i < length; i++) - res ^= buffer[i]; - - return res; -} - -bool CAPRSCollector::checkCRC(const unsigned char* data, unsigned int length) const -{ - unsigned int csum = calcCRC(data + 10U, length - 10U); - - char buffer[10U]; - ::sprintf(buffer, "%04X", csum); - - return ::memcmp(buffer, data + 5U, APRS_CSUM_LENGTH) == 0; -} - -unsigned int CAPRSCollector::calcCRC(const unsigned char* buffer, unsigned int length) const -{ - wxASSERT(buffer != NULL); - wxASSERT(length > 0U); - - unsigned int icomcrc = 0xFFFFU; - - for (unsigned int j = 0U; j < length; j++) { - unsigned char ch = buffer[j]; - - for (unsigned int i = 0U; i < 8U; i++) { - bool xorflag = (((icomcrc ^ ch) & 0x01U) == 0x01U); - - icomcrc >>= 1; - - if (xorflag) - icomcrc ^= 0x8408U; - - ch >>= 1; - } - } - - return ~icomcrc & 0xFFFFU; -} - -unsigned int CAPRSCollector::convertNMEA1(unsigned char* data, unsigned int) -{ - // Parse the $GPGGA string into tokens - char* pGGA[20U]; - ::memset(pGGA, 0x00U, 20U * sizeof(char*)); - unsigned int nGGA = 0U; - - char* str = (char*)m_ggaData; - for (;;) { - char* p = mystrsep(&str, ",\r\n"); - - pGGA[nGGA++] = p; - if (p == NULL) - break; - } - - // Is there any position data? - if (pGGA[2U] == NULL || pGGA[3U] == NULL || pGGA[4U] == NULL || pGGA[5U] == NULL || ::strlen(pGGA[2U]) == 0U || ::strlen(pGGA[3U]) == 0U || ::strlen(pGGA[4U]) == 0 || ::strlen(pGGA[5U]) == 0) - return 0U; - - // Is it a valid GPS fix? - if (::strcmp(pGGA[6U], "0") == 0) - return 0U; - - char callsign[10U]; - ::memset(callsign, ' ', 10U); - ::strncpy(callsign, (char*)m_txtData, 7U); - - // This can't fail! - char* p = ::strchr(callsign, ' '); - - if (m_txtData[6U] == ' ' && m_txtData[7U] != ' ') { - *p++ = '-'; - *p++ = m_txtData[7U]; - } else if (m_txtData[6U] != ' ' && m_txtData[7U] != ' ') { - *p++ = m_txtData[7U]; - } - - *p = '\0'; - - char symbol, overlay; - getSymbol(m_txtData + 9U, symbol, overlay); - - ::sprintf((char*)data, "%s>APDPRS,DSTAR*:!%.7s%s%c%.8s%s%c", callsign, pGGA[2U], pGGA[3U], overlay, pGGA[4U], pGGA[5U], symbol); - - // Get the bearing and speed from the RMC data - if (m_rmcValid) { - // Parse the $GPRMC string into tokens - char* pRMC[20U]; - ::memset(pRMC, 0x00U, 20U * sizeof(char*)); - unsigned int nRMC = 0U; - - str = (char*)m_rmcData; - for (;;) { - p = mystrsep(&str, ",\r\n"); - - pRMC[nRMC++] = p; - if (p == NULL) - break; - } - - // Check that we have a bearing and speed - if (pRMC[7U] != NULL && pRMC[8U] != NULL && ::strlen(pRMC[7U]) > 0U && ::strlen(pRMC[8U]) > 0U) { - int bearing = ::atoi(pRMC[8U]); - int speed = ::atoi(pRMC[7U]); - - ::sprintf((char*)data + ::strlen((char*)data), "%03d/%03d", bearing, speed); - } - } - - ::strcat((char*)data, " "); - - // Insert the message text - unsigned int j = ::strlen((char*)data); - for (unsigned int i = 13U; i < 29U; i++) { - unsigned char c = m_txtData[i]; - - if (c == '*') { - data[j] = '\0'; - break; - } - - data[j++] = c; - } - - if (pGGA[9U] != NULL && ::strlen(pGGA[9U]) > 0U) { - // Convert altitude from metres to feet - int altitude = ::atoi(pGGA[9U]); - ::sprintf((char*)data + ::strlen((char*)data), "/A=%06.0f", float(altitude) * 3.28F); - } - - return ::strlen((char*)data); -} - -unsigned int CAPRSCollector::convertNMEA2(unsigned char* data, unsigned int) -{ - // Parse the $GPRMC string into tokens - char* pRMC[20U]; - ::memset(pRMC, 0x00U, 20U * sizeof(char*)); - unsigned int nRMC = 0U; - - char* str = (char*)m_rmcData; - for (;;) { - char* p = mystrsep(&str, ",\r\n"); - - pRMC[nRMC++] = p; - if (p == NULL) - break; - } - - // Is there any position data? - if (pRMC[3U] == NULL || pRMC[4U] == NULL || pRMC[5U] == NULL || pRMC[6U] == NULL || ::strlen(pRMC[3U]) == 0U || ::strlen(pRMC[4U]) == 0U || ::strlen(pRMC[5U]) == 0 || ::strlen(pRMC[6U]) == 0) - return 0U; - - // Is it a valid GPS fix? - if (::strcmp(pRMC[2U], "A") != 0) - return 0U; - - char callsign[10U]; - ::memset(callsign, ' ', 10U); - ::strncpy(callsign, (char*)m_txtData, 7U); - - // This can't fail! - char* p = ::strchr(callsign, ' '); - - if (m_txtData[6U] == ' ' && m_txtData[7U] != ' ') { - *p++ = '-'; - *p++ = m_txtData[7U]; - } else if (m_txtData[6U] != ' ' && m_txtData[7U] != ' ') { - *p++ = m_txtData[7U]; - } - - *p = '\0'; - - char symbol, overlay; - getSymbol(m_txtData + 9U, symbol, overlay); - - ::sprintf((char*)data, "%s>APDPRS,DSTAR*:!%.7s%s%c%.8s%s%c", callsign, pRMC[3U], pRMC[4U], overlay, pRMC[5U], pRMC[6U], symbol); - - if (pRMC[7U] != NULL && pRMC[8U] != NULL && ::strlen(pRMC[7U]) > 0U && ::strlen(pRMC[8U]) > 0U) { - int bearing = ::atoi(pRMC[8U]); - int speed = ::atoi(pRMC[7U]); - - ::sprintf((char*)data + ::strlen((char*)data), "%03d/%03d", bearing, speed); - } - - if (m_txtData[13U] != '*') - ::strcat((char*)data, " "); - - // Insert the message text - unsigned int j = ::strlen((char*)data); - for (unsigned int i = 13U; i < 29U; i++) { - unsigned char c = m_txtData[i]; - - if (c == '*') { - data[j] = '\0'; - break; - } - - data[j++] = c; - } - - return ::strlen((char*)data); -} - -// Function taken from DPRSIntf.java from Pete Loveall AE5PL -void CAPRSCollector::getSymbol(const unsigned char* data, char& symbol, char& overlay) -{ - symbol = '.'; - - if (data[3U] == ' ') { - int offset = -1; - - switch (data[0U]) { - case 'B': - case 'O': - offset = -33; - break; - case 'P': - case 'A': - offset = 0; - break; - case 'M': - case 'N': - offset = -24; - break; - case 'H': - case 'D': - offset = 8; - break; - case 'L': - case 'S': - offset = 32; - break; - case 'J': - case 'Q': - offset = 74; - break; - default: - break; - } - - if (offset != -1 && ::isalnum(data[1U])) { - bool altIcons = false; - - // x is valid, lets get y - switch (data[0U]) { - case 'O': - case 'A': - case 'N': - case 'D': - case 'S': - case 'Q': - altIcons = true; - break; - } - - symbol = char(data[1U] + offset); - - overlay = '/'; - - if (altIcons) { - if (data[2] == ' ') - overlay = '\\'; - else if (::isalnum(data[2])) - overlay = data[2U]; - else - overlay = 0; - } - } - } -} - -// Source found at -char* CAPRSCollector::mystrsep(char** sp, const char* sep) const -{ - if (sp == NULL || *sp == NULL || **sp == '\0') - return NULL; - - char* s = *sp; - char* p = s + ::strcspn(s, sep); - - if (*p != '\0') - *p++ = '\0'; - - *sp = p; - - return s; -} From 59e2e47880487c6ef94930457461b95c60accbde Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Wed, 4 Jul 2018 18:06:53 +0100 Subject: [PATCH 010/166] Update CHANGES.txt --- CHANGES.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 4f15778..6620c10 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,4 @@ -ircDDB Gateway - 20180509 +ircDDB Gateway - 20180703 ========================= 20101010 @@ -1476,3 +1476,8 @@ Added APRSTransmit program from F4FXL. Move to wxWidgets-3.0.x. UPdate to VS2017 on Windows for 32 and 64 bit compilation. Simplify the Linux build. + +20180703 +-------- + +Support the GPS data from the Kenwood TH-D74. From 443b76e4fda5c372d8a788679b692726e0263a65 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Wed, 4 Jul 2018 18:08:28 +0100 Subject: [PATCH 011/166] Use the correct date this time. --- CHANGES.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 6620c10..0661426 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,4 @@ -ircDDB Gateway - 20180703 +ircDDB Gateway - 20180627 ========================= 20101010 @@ -1477,7 +1477,7 @@ Move to wxWidgets-3.0.x. UPdate to VS2017 on Windows for 32 and 64 bit compilation. Simplify the Linux build. -20180703 +20180627 -------- Support the GPS data from the Kenwood TH-D74. From 67ace87665944f56eed39943b1b793c4ad6d3c18 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Thu, 5 Jul 2018 19:45:28 +0100 Subject: [PATCH 012/166] Add a bare bones BUILD.txt. --- BUILD.txt | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 BUILD.txt diff --git a/BUILD.txt b/BUILD.txt new file mode 100644 index 0000000..d131984 --- /dev/null +++ b/BUILD.txt @@ -0,0 +1,55 @@ +ircDDB Gateway - 20180627 +========================= + +Windows +------- + +To use the ircDDB Gateway software you will first need to build the latest +version of wxWidgets (http://www.wxwidgets.org), the version I used was 3.0.4. +I also installed it in the default location which is C:\wxWidgets-3.0.4. + +For compiling I use Visual C++ 2017 Community Edition downloaded from Microsoft +for free. I recommend that you use the same. + +To build wxWidgets, you simply need to open Visual Studio 2017 using the File -> +Open -> Projects/Solutions and load the wx_vc12.sln file to be found in +wxWidgets-3.0.4\build\msw directory and then go into Batch Build and select the +DLL Debug and DLL Release entries for every one, this take a little time! Then +build them. + +The path names for wxWidgets are embedded within the Solution and Project +preferences, and will need changing if anything other than these default +locations are used. The first pass through the compiler will no doubt tell +you all that you need to know if there are problems. + +Once you have built the executables, you will need to copy the correct wxWidgets +files to the same location as the executables. For 32-bit systems these are +wxbase30u_vc_custom.dll, wxmsw30u_adv_vc_custom.dll, and +wxmsw30u_core_vc_custom.dll. On 64-bit systems you'll need +wxbase30u_vc_x64_custom.dll, wxmsw30u_adv_vc_x64_custom.dll, and +wxmsw30u_core_vc_x64_custom.dll + +If you are running in debug mode then the required wxWidgets files have the names +xxx30ud_xxxx instead. These can be found in the wxWidgets-3.0.4\lib\vc_dll +directory. + +It is also probable that you'll need to install a copy of the latest Visual C++ +run-time libraries from Microsoft, if you are not running the Repeater software +on the same machine as the development/compilation was done on. To do this you +need to copy and run the Vcredist_x86.exe file which is found at + + +Linux +----- + +You need to ensure that wxGTK is already installed on your machine, under +Ubuntu these are available from the standard repositories, the version of +wxWidgets is adequate. + +To install them from scratch, you need to get wxGTK from +. If you do a "make install" on it then they'll +be installed in the right places and nothing more needs to be done. + +To actually build the software, type "make" in the same directory as this file +and all should build without errors, there may be a warning or two though. Once +compiled log in as root or use the sudo command, and do "make install". From 6c7867e0797c35d28d7a4a41d197a1be1095763d Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Tue, 10 Jul 2018 20:37:21 +0100 Subject: [PATCH 013/166] Update the hosts files from pi-star. --- Data/DCS_Hosts.txt | 119 +++--- Data/DExtra_Hosts.txt | 244 ++++++++---- Data/DPlus_Hosts.txt | 844 +++++++++++++++++++++++++++++++++++++----- 3 files changed, 973 insertions(+), 234 deletions(-) diff --git a/Data/DCS_Hosts.txt b/Data/DCS_Hosts.txt index 30b4246..6937b10 100644 --- a/Data/DCS_Hosts.txt +++ b/Data/DCS_Hosts.txt @@ -1,43 +1,48 @@ -DCS000 23.111.174.198 L -DCS001 dcs001.xreflector.net -DCS002 dcs002.xreflector.net -DCS003 dcs003.xreflector.net -DCS004 dcs004.xreflector.net -DCS005 dcs.bm-dmr.uk L -DCS006 107.3.98.11 L -DCS007 dcs007.xreflector.net -DCS008 dcs008.xreflector.net -DCS009 dcs009.xreflector.net +# DCS_Hosts.txt downloaded from http://www.pistar.uk/downloads/DCS_Hosts.txt +# DCS Hosts resolved from xreflector.net DNS, with additional hosts +# sourced from http://xlxapi.rlx.lu/api.php?do=GetReflectorHostname +# Please report issues at https://www.facebook.com/groups/pistar/ +# File created at Tuesday 10th of July 2018 08:13:04 PM BST +DCS000 23.111.174.198 +DCS001 176.10.105.252 +DCS002 195.225.116.201 +DCS003 176.10.105.254 +DCS004 77.243.52.148 +DCS005 87.117.229.174 L +DCS006 24.233.213.165 L +DCS007 80.69.86.234 +DCS008 87.106.84.53 +DCS009 89.185.97.35 DCS010 85.197.129.86 L -DCS011 dcs011.xreflector.net -DCS012 194.38.140.205 L -DCS013 dcs013.xreflector.net -DCS014 dcs014.xreflector.net -DCS015 dcs015.xreflector.net -DCS016 dcs016.xreflector.net -DCS017 dcs017.xreflector.net -DCS018 dcs018.xreflector.net -DCS019 dcs019.xreflector.net -DCS020 94.177.164.25 -DCS021 dcs021.xreflector.net -DCS022 dcs022.xreflector.net -DCS023 dcs023.xreflector.net -DCS024 dcs024.xreflector.net -DCS025 dcs025.xreflector.net -DCS026 dcs026.xreflector.net -DCS027 dcs027.xreflector.net -DCS028 xlx028.org L -DCS029 dcs029.xreflector.net +DCS011 81.95.126.168 +DCS012 194.38.140.205 L +DCS013 195.159.104.200 +DCS014 52.63.223.130 +DCS015 213.202.228.119 +DCS016 75.99.228.34 +DCS017 81.169.228.115 L +DCS018 212.237.50.28 +DCS019 31.7.247.58 +DCS020 75.76.90.90 +DCS021 183.177.205.142 +DCS022 157.7.142.179 +DCS023 77.85.192.94 +DCS024 75.151.47.163 +DCS025 87.229.30.227 +DCS026 65.175.188.230 +DCS027 128.199.57.19 +DCS028 172.104.63.79 L +DCS029 74.210.135.144 DCS030 194.59.177.44 -DCS032 dcs032.xreflector.net -DCS033 dcs033.xreflector.net +DCS032 158.64.26.140 +DCS033 51.255.35.215 DCS035 45.79.94.184 DCS036 151.12.36.112 -DCS039 79.11.0.140 +DCS039 31.14.142.119 DCS040 109.71.45.29 -DCS044 dcs044.xreflector.net +DCS044 77.243.52.148 DCS046 176.10.140.161 -DCS047 121.94.194.94 +DCS047 121.94.194.251 DCS049 212.71.234.224 DCS051 93.186.254.219 DCS052 121.119.96.205 @@ -51,8 +56,7 @@ DCS060 212.237.36.181 DCS061 68.115.205.110 DCS062 70.88.145.163 DCS064 122.222.1.50 -DCS066 79.53.89.140 -DCS067 78.226.112.146 +DCS066 80.116.203.88 DCS068 92.222.145.202 DCS071 211.60.41.185 DCS074 212.237.211.82 @@ -60,7 +64,8 @@ DCS075 5.135.162.136 DCS076 203.137.116.117 DCS077 5.249.151.111 DCS078 109.10.128.221 -DCS080 121.86.66.52 +DCS079 184.23.183.98 +DCS080 121.85.175.69 DCS081 121.84.13.151 DCS085 27.92.11.123 DCS086 220.133.89.28 @@ -69,8 +74,8 @@ DCS089 194.109.192.236 DCS090 91.92.136.252 DCS092 212.237.30.36 DCS095 203.137.76.53 -DCS098 118.111.10.231 -DCS099 212.237.59.103 +DCS098 111.169.16.250 +DCS099 80.211.27.75 DCS101 45.62.213.101 DCS102 23.111.174.196 DCS103 64.137.224.126 @@ -101,6 +106,7 @@ DCS150 80.211.10.212 DCS170 210.178.113.173 DCS171 121.162.91.45 DCS180 192.241.240.7 +DCS199 153.126.179.214 DCS202 148.251.122.251 DCS204 185.85.18.162 DCS206 193.190.240.227 @@ -126,17 +132,18 @@ DCS246 172.93.48.159 DCS263 85.214.193.146 DCS264 52.2.131.118 DCS266 212.237.51.82 +DCS268 194.38.140.204 DCS270 158.64.26.132 -DCS282 211.131.186.73 +DCS282 210.188.25.17 DCS284 95.158.165.32 DCS290 94.176.6.45 DCS291 101.143.242.189 DCS295 64.137.160.185 -DCS298 111.169.17.74 +DCS298 119.238.135.207 DCS299 125.236.227.43 DCS300 45.62.244.43 DCS302 144.217.241.23 -DCS307 104.36.40.243 +DCS307 72.21.76.154 DCS310 52.11.207.121 DCS313 34.213.108.164 DCS315 65.101.7.50 @@ -160,7 +167,7 @@ DCS373 101.143.25.116 DCS374 61.195.108.146 DCS376 75.145.119.225 DCS380 160.16.65.39 -DCS382 61.116.2.231 +DCS382 211.131.185.61 DCS388 138.197.67.52 DCS389 106.70.187.224 DCS390 149.7.214.253 @@ -185,27 +192,30 @@ DCS486 51.255.172.249 DCS499 203.137.76.22 DCS500 172.104.32.192 DCS502 190.148.222.28 +DCS505 110.141.219.161 DCS508 185.188.4.15 DCS511 84.52.159.10 DCS515 133.130.114.45 DCS518 176.9.1.168 DCS519 167.114.104.65 DCS520 119.59.125.192 +DCS521 150.129.184.54 +DCS522 14.102.146.160 DCS525 176.65.95.90 DCS538 133.218.172.211 DCS544 210.131.32.240 DCS550 94.177.240.69 DCS554 52.35.183.178 DCS555 64.137.186.11 +DCS567 212.91.156.69 DCS569 203.137.111.98 -DCS583 183.76.148.131 +DCS583 116.70.242.224 DCS595 175.179.56.111 DCS600 13.69.14.204 DCS601 51.141.52.193 DCS602 212.56.100.200 DCS603 216.10.169.35 -DCS604 139.162.241.24 -DCS608 110.54.43.197 +DCS608 219.122.253.83 DCS610 89.186.80.81 DCS626 202.137.244.157 DCS634 61.199.25.130 @@ -214,6 +224,7 @@ DCS666 54.144.216.63 DCS673 180.147.243.178 DCS684 212.237.17.83 DCS689 97.107.128.47 +DCS698 85.197.129.86 DCS699 82.102.5.239 DCS700 78.47.222.93 DCS701 61.195.107.77 @@ -227,8 +238,7 @@ DCS712 180.11.74.19 DCS714 85.214.119.76 DCS717 44.137.70.100 DCS722 80.211.2.161 -DCS723 45.33.118.112 -DCS724 75.99.228.35 +DCS724 66.55.64.14 DCS730 186.64.123.59 DCS732 190.159.68.105 DCS733 45.56.117.158 @@ -236,7 +246,7 @@ DCS735 104.131.81.32 DCS737 195.130.75.246 DCS740 173.208.200.180 DCS746 178.254.34.44 -DCS747 87.147.134.254 +DCS747 87.147.133.4 DCS748 64.137.197.36 DCS752 66.154.105.195 DCS755 178.22.148.229 @@ -246,10 +256,11 @@ DCS775 149.202.61.17 DCS776 218.221.163.75 DCS777 194.182.66.76 DCS781 101.143.242.199 -DCS787 93.201.107.223 +DCS787 46.41.1.96 +DCS789 45.33.119.142 DCS794 101.143.242.95 DCS801 213.47.71.17 -DCS803 77.117.1.235 +DCS803 77.117.38.125 DCS806 92.105.198.59 DCS808 18.220.252.27 DCS810 64.137.238.189 @@ -261,15 +272,15 @@ DCS850 88.198.94.77 DCS860 80.81.9.242 DCS870 103.3.234.95 DCS878 203.137.123.113 -DCS883 125.207.223.228 +DCS883 153.185.38.99 DCS886 118.163.103.178 DCS887 118.163.103.177 -DCS888 31.14.135.7 +DCS888 95.239.164.147 DCS893 103.235.127.147 DCS900 94.177.237.192 DCS903 80.211.29.226 DCS906 212.237.11.53 -DCS907 176.84.175.87 +DCS907 88.11.249.48 DCS908 92.222.23.124 DCS909 216.86.147.198 DCS910 94.177.207.26 diff --git a/Data/DExtra_Hosts.txt b/Data/DExtra_Hosts.txt index b1210d3..8565621 100644 --- a/Data/DExtra_Hosts.txt +++ b/Data/DExtra_Hosts.txt @@ -1,71 +1,99 @@ +# DExtra_Hosts.txt downloaded from http://www.pistar.uk/downloads/DExtra_Hosts.txt +# DExtra Hosts resolved from the XReflector Directory (http://xrefl.net), +# additional host information sourced from http://xlxapi.rlx.lu/api.php?do=GetReflectorHostname +# Please report issues at https://www.facebook.com/groups/pistar/ +# File created at Tuesday 10th of July 2018 08:13:01 PM BST XRF000 23.111.174.198 XRF001 77.57.24.143 -XRF002 140.82.62.162 +XRF002 52.36.45.107 XRF003 173.199.124.183 XRF004 44.103.34.3 -XRF005 87.117.229.174 -XRF006 66.154.105.126 -XRF007 212.227.203.37 +XRF005 216.16.240.236 +XRF006 45.76.1.189 +XRF007 82.223.18.138 XRF008 45.77.153.132 XRF009 118.150.164.96 -XRF010 85.197.129.86 -XRF011 81.95.126.168 -XRF012 52.26.161.5 +XRF010 xlx010.n8qq.com +XRF011 xlx011.warn.org +XRF012 67.207.216.61 XRF013 34.213.176.201 -XRF014 104.128.238.251 -XRF015 213.202.228.119 -XRF017 81.169.228.115 -XRF018 212.237.50.28 +XRF014 94.23.8.59 +XRF015 xrf015.theapplecore.me +XRF016 44.143.40.30 +XRF017 92.177.212.64 +XRF018 199.167.129.166 XRF019 31.7.247.58 XRF020 94.177.164.25 +XRF021 44.103.32.250 XRF022 83.137.45.116 XRF023 185.177.59.166 -XRF024 94.199.173.123 -XRF025 89.38.150.252 +XRF024 194.208.144.167 +XRF025 025.ham-digital.es XRF026 65.175.188.230 -XRF028 172.104.63.79 -XRF030 194.59.177.44 +XRF027 194.116.29.78 +XRF028 193.190.240.228 +XRF029 xrf029.tms-it.net +XRF030 193.170.118.253 +XRF031 xlx031.ddns.net XRF032 158.64.26.140 XRF033 46.226.178.81 +XRF034 91.92.136.68 XRF035 45.79.94.184 XRF036 151.12.36.112 -XRF039 79.11.0.140 +XRF037 185.58.193.163 +XRF038 66.6.171.228 +XRF039 31.14.142.119 XRF040 109.71.45.29 -XRF046 176.10.140.161 -XRF047 121.94.194.94 +XRF041 45.62.226.137 +XRF042 44.168.53.137 +XRF043 xrf043.aotnet.it +XRF044 82.1.185.173 +XRF045 xlx045.kc1amf.org +XRF046 212.91.156.69 +XRF047 121.94.194.251 +XRF048 64.39.69.11 XRF049 212.71.234.224 +XRF050 213.186.33.5 XRF051 93.186.254.219 XRF052 121.119.96.205 XRF053 91.214.62.136 XRF054 52.86.180.251 XRF055 52.80.4.154 +XRF056 80.116.203.88 XRF057 173.216.181.178 XRF058 115.162.207.228 XRF059 18.219.32.21 XRF060 212.237.36.181 XRF061 68.115.205.110 XRF062 70.88.145.163 +XRF063 162.248.141.148 XRF064 122.222.1.50 -XRF066 79.53.89.140 -XRF067 78.226.112.146 +XRF066 80.116.203.88 +XRF067 xrf067.f5kav.org XRF068 92.222.145.202 +XRF069 185.47.129.230 +XRF070 112.218.40.93 XRF071 211.60.41.185 -XRF074 212.237.211.82 +XRF073 147.102.7.34 +XRF074 64.137.207.9 XRF075 5.135.162.136 XRF076 203.137.116.117 XRF077 5.249.151.111 -XRF078 109.10.128.221 +XRF078 91.214.62.136 +XRF079 59.6.196.35 XRF080 121.86.66.52 -XRF081 121.84.13.151 +XRF081 121.86.66.52 XRF085 27.92.11.123 -XRF086 220.133.89.28 +XRF086 52.80.139.252 XRF088 194.109.192.235 XRF089 194.109.192.236 XRF090 91.92.136.252 +XRF091 5.196.3.184 XRF092 212.237.30.36 -XRF095 203.137.76.53 -XRF098 118.111.10.231 -XRF099 212.237.59.103 +XRF095 121.93.109.13 +XRF098 111.169.16.250 +XRF099 80.211.27.75 +XRF100 96.94.7.196 XRF101 45.62.213.101 XRF102 23.111.174.196 XRF103 64.137.224.126 @@ -74,7 +102,8 @@ XRF105 51.254.99.78 XRF109 182.168.101.180 XRF110 150.7.164.10 XRF111 61.195.96.160 -XRF113 151.12.36.103 +XRF112 80.211.236.189 +XRF113 212.227.202.198 XRF114 5.135.188.16 XRF115 217.182.128.3 XRF116 31.185.101.211 @@ -83,19 +112,26 @@ XRF119 125.129.207.86 XRF120 81.150.10.63 XRF121 174.37.249.156 XRF122 83.137.45.100 +XRF123 95.170.70.159 XRF124 211.14.169.234 XRF125 213.181.208.52 +XRF127 pj2man.hopto.org XRF129 219.116.28.227 XRF130 194.59.177.45 XRF131 80.127.118.226 XRF132 91.203.55.87 +XRF133 23.97.163.212 XRF134 159.89.176.86 XRF145 178.59.23.138 +XRF146 128.0.239.249 XRF147 46.41.1.127 -XRF150 80.211.10.212 +XRF150 argentina.mmdvm.es XRF170 210.178.113.173 XRF171 121.162.91.45 +XRF177 xlx177.webandcloud.net XRF180 192.241.240.7 +XRF199 153.126.179.214 +XRF200 185.203.119.158 XRF202 148.251.122.251 XRF204 185.85.18.162 XRF206 193.190.240.227 @@ -106,68 +142,86 @@ XRF214 185.47.129.230 XRF215 185.87.96.172 XRF216 74.214.25.135 XRF220 124.41.83.11 -XRF222 212.43.96.84 +XRF222 xlx222.webandcloud.net +XRF223 208.73.201.157 XRF224 203.137.99.97 XRF226 94.176.6.37 XRF228 188.60.43.206 XRF229 194.191.4.54 -XRF230 80.250.3.114 -XRF232 89.185.97.35 -XRF235 5.150.254.97 +XRF230 46.28.105.4 +XRF232 83.137.45.106 +XRF233 37.187.103.98 +XRF235 xlx235.duckdns.org XRF238 172.104.239.219 XRF241 151.80.158.227 -XRF242 73.14.84.43 +XRF242 184.168.221.22 XRF246 172.93.48.159 +XRF248 158.69.206.45 +XRF250 88.212.221.81 +XRF252 118.21.66.186 +XRF255 52.35.115.245 +XRF262 88.198.73.251 XRF263 85.214.193.146 XRF264 52.2.131.118 +XRF265 51.255.43.60 XRF266 212.237.51.82 +XRF268 194.38.140.204 XRF270 158.64.26.132 -XRF282 211.131.186.73 -XRF284 95.158.165.32 +XRF275 64.137.232.33 +XRF277 64.137.185.24 +XRF282 210.188.25.17 +XRF284 193.93.24.29 XRF290 94.176.6.45 -XRF291 101.143.242.189 +XRF291 60.112.168.104 XRF295 64.137.160.185 XRF298 111.169.17.74 XRF299 125.236.227.43 -XRF300 45.62.244.43 +XRF300 45.62.213.101 XRF302 144.217.241.23 -XRF307 104.36.40.243 -XRF310 52.11.207.121 +XRF307 72.21.76.154 +XRF310 54.201.104.146 +XRF311 78.47.206.12 XRF313 34.213.108.164 XRF315 65.101.7.50 -XRF317 44.48.8.15 -XRF321 31.207.110.45 +XRF317 xrf317.crossroadsdmr.org +XRF321 34.200.191.2 XRF328 212.237.33.114 XRF332 188.213.168.99 -XRF333 194.116.29.73 +XRF333 37.187.103.98 XRF334 96.47.95.121 XRF335 185.206.145.2 XRF336 23.226.233.133 XRF339 198.98.53.247 -XRF345 xrf345.dyndns.org +XRF345 45.62.237.34 +XRF350 5.196.3.184 XRF357 52.39.82.54 XRF359 94.156.172.213 XRF360 222.229.25.105 XRF365 59.139.141.204 XRF370 188.213.168.24 -XRF371 212.237.8.77 +XRF371 216.146.38.125 XRF373 101.143.25.116 -XRF374 61.195.108.146 +XRF374 xlxreflectors.moe.hm XRF376 75.145.119.225 XRF380 160.16.65.39 -XRF382 61.116.2.231 +XRF382 211.131.37.90 +XRF387 195.130.59.77 XRF388 138.197.67.52 XRF389 106.70.187.224 -XRF390 149.7.214.253 -XRF400 13.58.192.185 +XRF390 xrf390.aotnet.it +XRF398 45.62.250.61 +XRF400 89.46.67.242 XRF404 91.229.143.187 XRF410 166.78.156.246 -XRF412 61.195.107.113 +XRF412 61.199.25.130 +XRF420 51.15.79.58 +XRF423 78.47.253.109 XRF431 61.195.98.225 XRF433 217.160.22.17 XRF434 51.254.128.134 XRF440 114.161.161.90 XRF441 203.137.99.110 +XRF443 52.31.246.91 XRF444 188.68.37.51 XRF449 159.89.183.117 XRF450 64.137.224.233 @@ -177,100 +231,127 @@ XRF464 52.192.129.174 XRF470 104.49.29.243 XRF477 139.162.213.89 XRF486 51.255.172.249 +XRF490 xrf490.dyndns.org XRF499 203.137.76.22 XRF500 172.104.32.192 XRF502 190.148.222.28 +XRF505 45.248.50.37 XRF508 185.188.4.15 +XRF510 91.223.115.32 XRF511 84.52.159.10 XRF515 133.130.114.45 XRF518 176.9.1.168 XRF519 167.114.104.65 -XRF520 119.59.125.192 +XRF520 dstar.thdar.com +XRF521 150.129.184.54 +XRF522 14.102.146.160 XRF525 176.65.95.90 XRF538 133.218.172.211 XRF544 210.131.32.240 XRF550 94.177.240.69 XRF554 52.35.183.178 -XRF555 64.137.186.11 +XRF555 54.191.67.121 +XRF556 162.244.28.131 +XRF567 212.91.156.69 XRF569 203.137.111.98 -XRF583 183.76.148.131 +XRF570 104.128.230.153 +XRF583 116.70.242.224 XRF595 175.179.56.111 +XRF599 xrf599.n5wls.net XRF600 13.69.14.204 XRF601 51.141.52.193 XRF602 212.56.100.200 XRF603 216.10.169.35 -XRF604 139.162.241.24 -XRF608 110.54.43.197 -XRF610 89.186.80.81 +XRF608 219.122.253.83 +XRF610 103.1.213.21 +XRF616 xlx616.wmtg.me XRF626 202.137.244.157 XRF634 61.199.25.130 XRF655 146.64.235.19 -XRF666 54.144.216.63 +XRF666 5.249.151.111 XRF673 180.147.243.178 XRF684 212.237.17.83 XRF689 97.107.128.47 +XRF698 85.197.129.86 XRF699 82.102.5.239 XRF700 78.47.222.93 XRF701 61.195.107.77 XRF703 61.195.98.254 XRF706 93.186.255.126 -XRF707 90.145.156.196 +XRF707 162.250.144.132 XRF708 202.218.37.62 XRF709 212.237.34.32 +XRF710 oe7mfi.ddns.net XRF711 212.237.18.27 -XRF712 180.11.74.19 +XRF712 xrf712.ddo.jp XRF714 85.214.119.76 +XRF715 81.169.228.115 +XRF716 79.147.230.179 XRF717 44.137.70.100 +XRF720 23.237.16.149 XRF722 80.211.2.161 -XRF723 45.33.118.112 -XRF724 75.99.228.35 +XRF724 66.55.64.14 +XRF727 108.33.72.83 XRF730 186.64.123.59 XRF732 190.159.68.105 XRF733 45.56.117.158 XRF735 104.131.81.32 XRF737 195.130.75.246 -XRF740 173.208.200.180 +XRF740 imagewell.duckdns.org XRF746 178.254.34.44 -XRF747 87.147.134.254 +XRF747 87.147.133.4 XRF748 64.137.197.36 +XRF750 119.47.114.165 XRF752 66.154.105.195 XRF755 178.22.148.229 +XRF757 107.191.121.105 XRF766 201.62.48.61 +XRF767 92.210.130.60 XRF773 94.177.175.230 XRF775 149.202.61.17 XRF776 218.221.163.75 -XRF777 194.182.66.76 -XRF781 101.143.242.199 -XRF787 93.201.107.223 +XRF777 112.218.40.91 +XRF781 220.145.56.130 +XRF787 81.169.145.151 +XRF789 45.33.119.142 XRF794 101.143.242.95 -XRF801 213.47.71.17 -XRF803 77.117.1.235 +XRF801 195.154.33.170 +XRF803 77.117.38.125 XRF806 92.105.198.59 +XRF807 221.113.166.134 XRF808 18.220.252.27 XRF810 64.137.238.189 -XRF812 203.145.233.141 +XRF812 126.109.77.182 XRF813 97.76.81.165 -XRF828 195.225.116.244 +XRF828 5.1.85.55 XRF844 137.226.79.122 XRF850 88.198.94.77 -XRF860 80.81.9.242 +XRF851 78.47.53.194 +XRF858 54.164.121.192 +XRF860 45.62.249.215 XRF870 103.3.234.95 XRF878 203.137.123.113 -XRF883 125.207.223.228 +XRF880 176.10.105.211 +XRF883 153.185.38.99 XRF886 118.163.103.178 XRF887 118.163.103.177 -XRF888 31.14.135.7 +XRF888 95.239.164.147 XRF893 103.235.127.147 +XRF897 92.222.23.124 XRF900 94.177.237.192 +XRF901 45.62.254.159 +XRF902 104.233.76.150 XRF903 80.211.29.226 -XRF906 212.237.11.53 -XRF907 176.84.175.87 +XRF905 199.212.121.20 +XRF906 185.50.196.134 +XRF907 88.11.249.48 XRF908 92.222.23.124 XRF909 216.86.147.198 XRF910 94.177.207.26 XRF911 5.196.73.89 XRF912 80.211.1.143 XRF919 80.211.232.174 +XRF920 44.143.184.83 XRF921 44.143.184.83 XRF922 81.150.10.62 XRF925 90.255.232.101 @@ -283,18 +364,25 @@ XRF940 202.218.37.121 XRF944 202.218.34.210 XRF945 155.94.147.186 XRF950 158.64.26.134 +XRF960 80.211.226.89 XRF964 52.173.142.244 +XRF967 xlx967.uk.to XRF972 46.121.158.50 -XRF973 211.14.169.43 +XRF973 153.136.102.253 XRF974 94.177.217.52 XRF975 176.31.161.9 +XRF976 212.237.36.71 +XRF977 47.88.171.246 +XRF978 193.70.0.229 XRF986 81.89.102.160 -XRF987 185.32.183.148 +XRF987 162.252.243.217 +XRF988 198.96.90.144 XRF989 50.27.131.75 XRF990 35.164.237.63 -XRF991 2.237.27.66 +XRF991 91.92.136.118 XRF995 158.69.201.255 XRF996 47.104.177.248 XRF997 94.177.187.40 XRF998 44.140.236.20 XRF999 94.177.173.53 +XRFWDX 159.89.87.33 diff --git a/Data/DPlus_Hosts.txt b/Data/DPlus_Hosts.txt index eb71752..d1bb121 100644 --- a/Data/DPlus_Hosts.txt +++ b/Data/DPlus_Hosts.txt @@ -1,97 +1,102 @@ +# DPlus_Hosts.txt downloaded from http://www.pistar.uk/downloads/DPlus_Hosts.txt +# DPlus Hosts resolved from dstargateway.org DNS, with additional hosts +# sourced from http://xlxapi.rlx.lu/api.php?do=GetReflectorHostname +# Please report issues at https://www.facebook.com/groups/pistar/ +# File created at Tuesday 10th of July 2018 08:12:16 PM BST REF000 23.111.174.198 -REF001 ref001.dstargateway.org -REF002 ref002.dstargateway.org -REF003 ref003.dstargateway.org -REF004 ref004.dstargateway.org -REF005 ref005.dstargateway.org -REF006 ref006.dstargateway.org -REF007 ref007.dstargateway.org -REF008 ref008.dstargateway.org -REF009 ref009.dstargateway.org -REF010 ref010.dstargateway.org -REF011 ref011.dstargateway.org -REF012 ref012.dstargateway.org -REF013 ref013.dstargateway.org -REF014 ref014.dstargateway.org -REF015 ref015.dstargateway.org -REF016 ref016.dstargateway.org -REF017 ref017.dstargateway.org -REF018 ref018.dstargateway.org -REF019 ref019.dstargateway.org -REF020 ref020.dstargateway.org -REF021 ref021.dstargateway.org -REF022 ref022.dstargateway.org -REF023 ref023.dstargateway.org -REF024 ref024.dstargateway.org -REF025 ref025.dstargateway.org -REF026 ref026.dstargateway.org -REF027 ref027.dstargateway.org -REF028 ref028.dstargateway.org -REF029 ref029.dstargateway.org -REF030 ref030.dstargateway.org -REF031 ref031.dstargateway.org -REF032 ref032.dstargateway.org -REF033 ref033.dstargateway.org -REF034 ref034.dstargateway.org -REF035 ref035.dstargateway.org -REF036 ref036.dstargateway.org -REF037 ref037.dstargateway.org -REF038 ref038.dstargateway.org -REF039 ref039.dstargateway.org -REF040 ref040.dstargateway.org -REF041 ref041.dstargateway.org -REF042 ref042.dstargateway.org -REF043 ref043.dstargateway.org -REF044 ref044.dstargateway.org -REF045 ref045.dstargateway.org -REF046 ref046.dstargateway.org -REF047 ref047.dstargateway.org -REF048 ref048.dstargateway.org -REF049 ref049.dstargateway.org -REF050 ref050.dstargateway.org -REF051 ref051.dstargateway.org -REF052 ref052.dstargateway.org -REF053 ref053.dstargateway.org -REF054 ref054.dstargateway.org -REF055 ref055.dstargateway.org -REF056 ref056.dstargateway.org -REF057 ref057.dstargateway.org -REF058 ref058.dstargateway.org -REF059 ref059.dstargateway.org -REF060 ref060.dstargateway.org -REF061 ref061.dstargateway.org -REF062 ref062.dstargateway.org -REF063 ref063.dstargateway.org -REF064 ref064.dstargateway.org -REF065 ref065.dstargateway.org -REF066 ref066.dstargateway.org -REF067 ref067.dstargateway.org -REF068 ref068.dstargateway.org -REF069 ref069.dstargateway.org -REF070 ref070.dstargateway.org -REF071 ref071.dstargateway.org -REF072 ref072.dstargateway.org -REF073 ref073.dstargateway.org -REF074 ref074.dstargateway.org -REF075 ref075.dstargateway.org -REF076 ref076.dstargateway.org -REF077 ref077.dstargateway.org -REF078 ref078.dstargateway.org -REF079 ref079.dstargateway.org -REF080 ref080.dstargateway.org -REF081 ref081.dstargateway.org -REF082 ref082.dstargateway.org -REF083 ref083.dstargateway.org -REF084 ref084.dstargateway.org -REF085 ref085.dstargateway.org -REF086 ref086.dstargateway.org +REF001 104.237.157.7 +REF002 129.93.2.132 +REF003 203.194.18.195 +REF004 74.204.50.19 +REF005 192.3.202.53 +REF006 78.158.56.61 +REF007 208.111.3.180 +REF008 58.12.161.10 +REF009 204.89.198.18 +REF010 12.178.74.6 +REF011 195.78.217.101 +REF012 209.112.244.26 +REF013 109.69.104.195 +REF014 64.250.229.185 +REF015 109.69.104.196 +REF016 67.210.212.136 +REF017 80.69.86.233 +REF018 187.50.254.20 +REF019 209.242.228.27 +REF020 50.199.88.20 +REF021 192.3.202.54 +REF022 52.32.64.78 +REF023 103.1.213.18 +REF024 69.41.0.15 +REF025 107.161.29.191 +REF026 206.12.104.8 +REF027 194.116.29.72 +REF028 193.190.240.229 +REF029 129.123.3.6 +REF030 18.221.55.237 +REF031 79.136.93.241 +REF032 95.160.56.46 +REF033 208.67.255.202 +REF034 74.81.71.218 +REF035 146.129.247.243 +REF036 195.194.238.109 +REF037 208.111.3.181 +REF038 66.6.171.227 +REF039 208.93.191.20 +REF040 94.46.216.197 +REF041 129.105.15.195 +REF042 151.249.104.38 +REF043 176.10.140.189 +REF044 208.43.162.89 +REF045 195.251.201.214 +REF046 208.111.3.182 +REF047 157.7.142.13 +REF048 208.88.66.244 +REF049 72.249.9.66 +REF050 75.147.26.195 +REF051 50.57.153.17 +REF052 12.5.239.46 +REF053 216.243.174.245 +REF054 52.86.120.0 +REF055 207.251.62.205 +REF056 45.56.113.164 +REF057 173.216.181.178 +REF058 131.204.255.253 +REF059 104.131.247.122 +REF060 50.194.6.1 +REF061 204.152.199.103 +REF062 70.88.145.165 +REF063 66.207.131.4 +REF064 61.195.99.81 +REF065 162.255.169.90 +REF066 173.255.196.45 +REF067 44.34.128.167 +REF068 92.222.145.197 +REF069 70.91.220.113 +REF070 44.10.10.20 +REF071 61.195.97.218 +REF072 96.92.65.12 +REF073 68.67.124.145 +REF074 68.67.124.146 +REF075 51.254.220.4 +REF076 203.137.112.200 +REF077 173.247.7.23 +REF078 204.15.204.154 +REF079 62.255.210.254 +REF080 82.223.13.53 +REF081 172.104.92.125 +REF082 106.240.237.114 +REF083 168.235.103.26 +REF084 51.254.120.143 +REF085 203.74.132.35 +REF086 216.126.220.245 REF088 194.109.192.235 REF089 194.109.192.236 REF090 91.92.136.252 REF092 212.237.30.36 REF095 203.137.76.53 -REF098 118.111.10.231 -REF099 212.237.59.103 +REF098 111.169.16.250 +REF099 80.211.27.75 REF101 45.62.213.101 REF102 23.111.174.196 REF103 64.137.224.126 @@ -122,6 +127,7 @@ REF150 80.211.10.212 REF170 210.178.113.173 REF171 121.162.91.45 REF180 192.241.240.7 +REF199 153.126.179.214 REF202 148.251.122.251 REF204 185.85.18.162 REF206 193.190.240.227 @@ -147,17 +153,18 @@ REF246 172.93.48.159 REF263 85.214.193.146 REF264 52.2.131.118 REF266 212.237.51.82 +REF268 194.38.140.204 REF270 158.64.26.132 -REF282 211.131.186.73 +REF282 210.188.25.17 REF284 95.158.165.32 REF290 94.176.6.45 REF291 101.143.242.189 REF295 64.137.160.185 -REF298 111.169.17.74 +REF298 119.238.135.207 REF299 125.236.227.43 REF300 45.62.244.43 REF302 144.217.241.23 -REF307 104.36.40.243 +REF307 72.21.76.154 REF310 52.11.207.121 REF313 34.213.108.164 REF315 65.101.7.50 @@ -181,7 +188,7 @@ REF373 101.143.25.116 REF374 61.195.108.146 REF376 75.145.119.225 REF380 160.16.65.39 -REF382 61.116.2.231 +REF382 211.131.185.61 REF388 138.197.67.52 REF389 106.70.187.224 REF390 149.7.214.253 @@ -206,27 +213,30 @@ REF486 51.255.172.249 REF499 203.137.76.22 REF500 172.104.32.192 REF502 190.148.222.28 +REF505 45.248.50.37 REF508 185.188.4.15 REF511 84.52.159.10 REF515 133.130.114.45 REF518 176.9.1.168 REF519 167.114.104.65 REF520 119.59.125.192 +REF521 150.129.184.54 +REF522 14.102.146.160 REF525 176.65.95.90 REF538 133.218.172.211 REF544 210.131.32.240 REF550 94.177.240.69 REF554 52.35.183.178 REF555 64.137.186.11 +REF567 212.91.156.69 REF569 203.137.111.98 -REF583 183.76.148.131 +REF583 116.70.242.224 REF595 175.179.56.111 REF600 13.69.14.204 REF601 51.141.52.193 REF602 212.56.100.200 REF603 216.10.169.35 -REF604 139.162.241.24 -REF608 110.54.43.197 +REF608 219.122.253.83 REF610 89.186.80.81 REF626 202.137.244.157 REF634 61.199.25.130 @@ -235,6 +245,7 @@ REF666 54.144.216.63 REF673 180.147.243.178 REF684 212.237.17.83 REF689 97.107.128.47 +REF698 85.197.129.86 REF699 82.102.5.239 REF700 78.47.222.93 REF701 61.195.107.77 @@ -248,7 +259,6 @@ REF712 180.11.74.19 REF714 85.214.119.76 REF717 44.137.70.100 REF722 80.211.2.161 -REF723 45.33.118.112 REF724 75.99.228.35 REF730 186.64.123.59 REF732 190.159.68.105 @@ -257,7 +267,7 @@ REF735 104.131.81.32 REF737 195.130.75.246 REF740 173.208.200.180 REF746 178.254.34.44 -REF747 87.147.134.254 +REF747 87.147.133.4 REF748 64.137.197.36 REF752 66.154.105.195 REF755 178.22.148.229 @@ -267,10 +277,11 @@ REF775 149.202.61.17 REF776 218.221.163.75 REF777 194.182.66.76 REF781 101.143.242.199 -REF787 93.201.107.223 +REF787 46.41.1.96 +REF789 45.33.119.142 REF794 101.143.242.95 REF801 213.47.71.17 -REF803 77.117.1.235 +REF803 77.117.38.125 REF806 92.105.198.59 REF808 18.220.252.27 REF810 64.137.238.189 @@ -282,15 +293,15 @@ REF850 88.198.94.77 REF860 80.81.9.242 REF870 103.3.234.95 REF878 203.137.123.113 -REF883 125.207.223.228 +REF883 153.185.38.99 REF886 118.163.103.178 REF887 118.163.103.177 -REF888 31.14.135.7 +REF888 95.239.164.147 REF893 103.235.127.147 REF900 94.177.237.192 REF903 80.211.29.226 REF906 212.237.11.53 -REF907 176.84.175.87 +REF907 88.11.249.48 REF908 92.222.23.124 REF909 216.86.147.198 REF910 94.177.207.26 @@ -324,3 +335,632 @@ REF996 47.104.177.248 REF997 94.177.187.40 REF998 44.140.236.20 REF999 94.177.173.53 +W5DRA 75.66.21.213 +4O0LPG 89.188.45.102 +9A0DOS 77.217.166.68 +9A0DRI 83.184.125.202 +9A0DST 83.178.253.62 +9A0DZG 78.134.209.194 +AA4PP 208.54.85.173 +BR2SY 223.100.16.100 +CQ0DAM 94.63.182.214 +CQ0DCH 2.83.253.219 +CQ0DLR 213.13.57.41 +CQ0DPF 95.94.111.92 +CQ0DSE 37.28.237.153 +CQ0DTV 2.82.184.21 +CQ0DVI 94.132.206.63 +CQ1DAH 95.69.107.146 +DB0AB 188.194.155.4 +DB0AFZ 92.50.67.6 +DB0AMK 217.235.18.26 +DB0BLB 91.35.33.79 +DB0BS 134.19.115.94 +DB0CI 79.249.33.248 +DB0DAM 194.94.26.157 +DB0DB 185.70.220.35 +DB0DBN 91.21.102.204 +DB0DJ 217.92.28.60 +DB0DLR 109.41.80.150 +DB0DOS 131.173.32.247 +DB0DRB 88.207.202.202 +DB0EAT 92.210.130.60 +DB0EIS 88.152.157.186 +DB0ERZ 46.227.221.228 +DB0ESS 80.81.9.242 +DB0FIB 78.111.116.226 +DB0GM 91.19.211.133 +DB0GZL 62.226.86.193 +DB0HAA 79.201.23.3 +DB0HAS 84.189.32.49 +DB0HE 109.91.59.80 +DB0HEW 89.15.236.164 +DB0HFD 178.208.98.198 +DB0HFT 194.94.26.189 +DB0HGW 87.151.235.12 +DB0HRR 84.171.15.17 +DB0HUS 79.204.32.126 +DB0IZ 87.122.244.143 +DB0KOE 212.17.239.121 +DB0LBX 185.156.156.157 +DB0LJ 87.139.70.67 +DB0LY 176.9.53.177 +DB0MDX 137.248.151.45 +DB0MOT 94.249.222.90 +DB0NIC 188.194.116.23 +DB0OAL 212.125.105.177 +DB0OX 77.21.170.9 +DB0PBS 192.26.179.90 +DB0POB 87.151.203.58 +DB0REU 93.236.57.36 +DB0RKD 212.17.239.126 +DB0RTV 87.191.151.162 +DB0SIF 134.176.128.63 +DB0SLF 91.35.62.133 +DB0SN 134.76.247.241 +DB0SOB 91.61.226.84 +DB0TVM 129.187.5.189 +DB0UHC 194.97.35.190 +DB0VA 178.4.188.175 +DB0VOX 141.75.245.244 +DB0VS 185.75.164.30 +DB0WA 137.226.79.113 +DB0WBD 91.38.82.249 +DB0WO 194.94.26.157 +DB0WTV 93.223.111.117 +DB0WZ 80.147.61.209 +DB0ZKA 84.128.215.222 +DF0MHR 134.91.90.124 +DM0BAM 84.186.217.60 +DM0GER 87.178.171.3 +DM0HEI 87.151.254.73 +DM0HHW 90.187.26.49 +DM0HMB 141.22.12.147 +DM0IZH 217.91.66.171 +DM0LEI 178.14.70.174 +DM0MW 141.55.128.102 +DM0NOR 77.20.218.106 +DM0SAT 84.146.238.31 +DM0SL 79.204.32.126 +DM0TR 31.16.39.90 +DO0SRE 62.143.16.216 +DO0TPB 195.122.157.243 +E24DK 110.77.235.11 +E25CD 124.122.29.190 +ED1YBK 213.60.194.98 +ED1YBL 213.60.194.98 +ED1ZAJ 81.169.133.171 +ED1ZAM 91.117.67.25 +ED2YAA 77.209.144.230 +ED2YAO 95.60.102.67 +ED2ZAC 83.48.116.61 +ED4ZAD 87.217.220.177 +ED5ZAB 158.42.97.21 +ED5ZAC 89.39.47.83 +ED5ZAG 62.14.178.43 +ED6ZAB 37.152.91.23 +ED7ZAC 195.57.121.189 +ED7ZAD 46.37.89.21 +ED7ZAE 85.137.220.39 +F1ZBU 80.251.102.117 +F1ZCD 88.187.220.2 +F1ZCK 86.248.115.2 +F1ZDF 78.203.212.22 +F1ZDI 92.129.98.93 +F1ZDZ 82.231.84.133 +F1ZEM 86.248.79.161 +F1ZEU 86.248.79.161 +F1ZFG 195.154.33.170 +F1ZGK 90.101.58.185 +F1ZHY 92.171.228.145 +F1ZID 92.188.81.63 +F1ZII 88.164.2.51 +F1ZJH 46.227.22.53 +F1ZJO 37.168.76.85 +F1ZJP 82.64.16.222 +F1ZJR 90.56.60.45 +F1ZKP 2.6.241.54 +F1ZKR 90.41.75.178 +F1ZLX 78.204.173.219 +F1ZWB 77.136.204.53 +F1ZYH 90.63.172.220 +F5ZCV 90.100.204.201 +F5ZFY 80.14.94.180 +F5ZJQ 80.119.102.44 +F5ZKE 78.239.80.131 +F5ZKN 176.134.142.251 +F5ZKO 90.70.0.138 +F5ZKP 82.255.165.128 +F5ZKQ 93.9.3.192 +F5ZLB 92.184.101.43 +F5ZLC 83.196.12.10 +F5ZLG 82.225.216.39 +F5ZLK 79.83.11.55 +F5ZLM 88.121.60.200 +F5ZML 109.214.64.172 +F5ZQH 80.119.102.44 +F5ZSS 86.74.95.58 +GB3WL 81.149.15.21 +GB7CD 194.80.132.179 +GB7DC 81.174.242.218 +GB7DM 94.175.78.230 +GB7DN 86.157.42.132 +GB7HZ 92.28.227.216 +GB7JD 212.56.100.200 +GB7KH 85.119.82.151 +GB7SM 86.133.136.170 +GB7SO 109.145.76.188 +GB7TP 82.31.87.63 +GB7WT 185.49.92.226 +HB9BO 213.202.33.211 +HB9CSR 188.60.43.206 +HB9DR 178.193.253.23 +HB9DS 194.29.11.9 +HB9VD 51.254.122.59 +HB9ZRH 77.57.117.248 +IR0AAB 87.17.208.105 +IR0CJ 185.82.114.251 +IR0DV 94.39.94.213 +IR0K 185.78.18.13 +IR0UBT 78.15.153.11 +IR0UEZ 185.82.114.253 +IR1CT 2.40.23.41 +IR1DC 88.149.181.240 +IR1UAW 79.30.54.193 +IR1UBR 81.30.11.81 +IR1UBY 79.44.127.10 +IR1UFV 151.16.215.69 +IR1UGO 82.50.132.89 +IR1UIM 151.16.108.239 +IR1UIV 217.19.159.207 +IR1UIW 2.235.33.50 +IR2AY 79.21.171.25 +IR2UDW 91.142.66.115 +IR2UEZ 78.134.30.121 +IR3EE 213.21.185.184 +IR3EF 79.6.136.177 +IR3UBK 46.19.235.134 +IR3UBZ 79.6.136.178 +IR3UG 95.142.180.57 +IR3UIB 79.6.136.179 +IR3UJ 79.6.136.181 +IR4MO 80.17.240.27 +IR4UCJ 31.3.184.38 +IR5AF 79.20.189.118 +IR5AN 62.48.40.65 +IR5AR 95.239.125.53 +IR5AY 79.35.129.25 +IR5UBM 46.226.178.80 +IR5UBO 93.188.115.147 +IR5UBS 46.226.178.83 +IR5UCK 46.226.176.11 +IR5UCL 79.53.51.208 +IR5UCM 91.214.61.109 +IR5UCQ 188.13.250.107 +IR5UDB 46.226.178.84 +IR6UCX 95.247.183.177 +IR6UDO 185.47.96.11 +IR7UBL 87.1.250.55 +IR7UBP 213.45.9.196 +IR7UBX 2.237.73.137 +IR7UE 87.11.254.122 +IR9P 87.11.163.158 +IR9UBM 5.170.220.181 +IR9UBQ 185.152.140.1 +IR9UBV 151.54.10.175 +JE4YLP 122.20.168.4 +JH3ZMD 180.145.113.1 +JL3ZBS 111.64.21.179 +JL3ZDF 125.207.29.216 +JQ1ZBD 122.249.235.110 +JQ1ZKF 180.50.81.49 +JQ1ZKG 118.243.253.222 +JQ1ZOR 118.241.159.202 +JQ1ZRY 221.27.66.171 +K0PRA 72.1.108.245 +K1MRA 207.180.168.249 +K1RFI 173.166.94.77 +K2BWK 24.213.133.213 +K3AWS 76.190.233.121 +K3CR 146.186.33.234 +K4BRK 73.20.208.61 +K4HPT 68.225.85.83 +K5PSA 24.54.146.202 +K6CLX 72.134.1.68 +K6PUW 162.219.58.134 +K7EVR 72.201.150.71 +K7LWH 63.226.225.249 +K7YI 67.22.175.38 +KB1TIX 71.255.118.133 +KB1UVD 73.47.74.3 +KB1UVE 72.65.115.44 +KB1WUW 71.184.97.85 +KB3KWD 199.193.59.214 +KB5DRP 52.144.103.54 +KB8EOC 192.180.5.104 +KC1ACI 68.185.127.105 +KC1AZZ 108.7.32.84 +KC1EGN 71.181.20.21 +KC2TGB 73.226.52.46 +KC3BIY 184.89.158.48 +KC3BMB 71.58.65.44 +KC3FHC 71.244.175.15 +KC4UG 64.91.93.185 +KC8ARJ 174.84.8.3 +KD0PKU 67.55.181.66 +KD0QPG 162.255.157.234 +KD0YLG 199.17.47.23 +KD0ZSA 71.37.237.68 +KD2DIP 74.88.18.162 +KD2FET 174.224.139.213 +KD2GBR 70.13.94.158 +KD2LWX 71.7.10.101 +KD2LYO 66.243.219.222 +KD2MNA 67.241.251.13 +KD5RCA 173.185.79.204 +KD8SWP 76.189.143.248 +KD8TUZ 74.140.148.77 +KD9AKF 158.222.16.101 +KD9CVF 69.174.171.8 +KD9IPR 97.83.196.212 +KE0KKN 24.111.240.142 +KE0MVE 156.98.131.33 +KE0MVG 69.76.160.34 +KE5YAP 71.97.89.126 +KE8AOQ 168.215.61.3 +KE8BUO 98.29.31.4 +KE8EVF 68.61.246.212 +KF5MMX 47.32.251.186 +KF7CLD 70.89.134.123 +KF7NOD 73.193.45.223 +KF7NPL 63.225.171.156 +KF7VJO 67.169.255.93 +KG5JPJ 98.172.10.197 +KG5OXR 24.49.102.111 +KG5RED 24.182.107.171 +KG7QPU 66.235.18.176 +KG7WZG 168.103.142.41 +KJ6KTV 98.150.91.5 +KK4IQW 68.47.133.52 +KK4PGE 74.131.186.40 +KK4QXJ 173.214.218.208 +KK4WIB 73.184.164.110 +KK4YOE 71.91.69.74 +KK6GIZ 76.178.49.69 +KK6JA 73.70.240.127 +KM4LNN 216.221.204.103 +KN4BDJ 74.137.13.22 +KN4BOF 64.234.50.153 +KR7ST 204.89.198.102 +KS1R 73.119.107.231 +KY4HS 71.28.168.77 +LD1XB 46.46.205.177 +LD2EM 82.148.173.251 +LD2HT 84.214.96.91 +LD4FH 91.149.30.230 +LD4LA 46.66.178.25 +LD5BG 93.184.115.59 +LD7FF 148.252.102.235 +LD8BS 89.162.85.130 +LD8LK 81.167.105.194 +LD8MM 88.89.35.121 +LD8NA 193.212.207.139 +LD8NN 85.166.209.165 +LD8SA 89.162.67.118 +LU5FB 179.60.235.222 +LX0DML 78.141.137.66 +LX0DRD 213.135.244.146 +LX0DRH 88.207.174.219 +LX0DRJ 78.141.137.66 +LX0DRN 213.135.244.146 +LX0DRV 88.207.202.202 +LX0RL 146.0.189.212 +LX9EPF 158.64.26.2 +LZ0DAA 78.83.103.163 +LZ0DAD 213.16.55.2 +LZ0DAH 95.158.175.90 +LZ0DAM 151.237.6.74 +LZ0DAO 212.39.89.30 +LZ0DAR 212.73.131.203 +LZ0DAV 213.16.49.230 +LZ0DBS 185.18.57.21 +LZ0DVB 62.176.87.194 +LZ0SUN 151.237.49.30 +MB6AB 81.98.206.178 +MB6AF 213.121.3.16 +MB6BA 80.6.17.181 +MB6CA 81.151.69.117 +MB6CE 90.195.155.188 +MB6CY 86.143.115.28 +MB6EG 176.24.39.74 +MB6EY 86.184.9.11 +MB6FG 147.147.164.234 +MB6HU 86.168.101.171 +MB6IOG 86.145.6.185 +MB6JD 212.56.100.200 +MB6LY 86.142.208.37 +MB6NK 188.29.164.237 +N0CXX 65.103.49.196 +N1HIT 73.249.54.16 +N4ARG 71.41.121.229 +N7JN 192.231.186.217 +N7RDS 72.250.209.84 +NE1DV 198.0.181.254 +NJ2MC 174.225.6.77 +NR7SS 74.95.68.73 +NU7TS 72.250.210.9 +NW7DR 192.231.186.5 +OE1XDS 80.109.80.41 +OE1XIK 178.115.227.153 +OE3XWW 194.166.53.142 +OE5XKL 193.33.210.138 +OE5XOL 185.16.114.90 +OH0DST 79.133.3.134 +OK0BAF 84.16.107.229 +OK0BCA 151.249.105.57 +OK0BRQ 88.102.142.95 +OK0DIT 88.146.217.109 +OK0DJ 37.221.252.37 +OK0DPL 85.207.84.124 +OK0DRB 89.235.49.32 +OK0DRO 85.13.109.61 +OK0DV 37.221.252.37 +OK0EB 92.62.226.10 +ON0CPS 81.245.76.160 +ON0CVH 91.183.117.199 +ON0DP 84.198.145.44 +ON0DST 5.135.58.242 +ON0LB 188.210.92.86 +ON0LGE 44.144.12.194 +ON0LUS 87.64.154.241 +ON0OS 178.116.123.86 +ON0TB 78.94.50.214 +OZ0EVA 85.202.72.96 +OZ0REA 87.58.212.152 +OZ0RED 80.251.196.244 +OZ0REF 93.178.152.206 +OZ0REH 109.57.28.210 +OZ1DHS 212.112.154.128 +OZ1REC 109.59.28.68 +OZ1REJ 80.62.116.137 +OZ2REE 176.21.189.181 +OZ2REG 87.49.146.167 +OZ2REM 212.98.114.58 +OZ3DSR 212.112.156.53 +OZ3REQ 130.225.2.2 +OZ3REY 80.62.117.65 +OZ4REN 83.90.173.65 +OZ6DST 77.68.172.7 +OZ7DSD 62.242.112.138 +OZ7REL 62.44.134.179 +OZ9AFZ 185.109.76.192 +OZ9RET 87.55.118.187 +PI1CJP 83.87.195.38 +PI1DHD 94.211.247.46 +PI1DSE 88.159.83.58 +PI1HGD 83.85.108.198 +PI1MEP 44.137.69.19 +PI1RYS 44.137.37.37 +PI1SHA 84.83.171.182 +PI1SNK 145.129.86.235 +PI1UTR 44.137.72.10 +PJ2A 190.112.246.172 +PT2DV 201.87.243.130 +PT2MTD 200.96.200.110 +PY1CEU 179.55.35.114 +PY1EGR 189.82.114.34 +PY2KBH 189.92.85.70 +PY2KJP 189.28.159.114 +PY2KPE 177.38.42.86 +S55DLJ 90.157.180.200 +S55DMX 164.8.106.109 +S55DZA 88.200.95.123 +SE0O 80.216.190.189 +SE0S 193.150.254.146 +SE3XCH 80.170.3.193 +SG0AHH 2.248.47.171 +SG4UOF 77.53.38.251 +SG4UZM 44.140.128.254 +SG4VBO 155.4.32.228 +SG5EWE 77.218.246.190 +SG5TAH 90.224.101.245 +SG6JWU 176.10.223.2 +SG7HTP 46.162.115.187 +SG7IKJ 213.66.79.158 +SG7WDL 94.255.137.118 +SG7WSE 83.184.191.161 +SI9AM 44.140.102.134 +SK0AI 5.150.225.10 +SK0RMT 44.140.13.5 +SK2AT 88.83.52.159 +SK3GY 90.236.23.43 +SK3LH 46.230.233.3 +SK3RHU 95.143.207.93 +SK3XX 80.170.4.42 +SK4BW 44.140.128.254 +SK5UM 78.71.198.202 +SK6BA 78.72.45.233 +SK6DZ 31.31.161.42 +SK6EP 31.208.231.214 +SK6IF 2.64.169.90 +SK6MA 2.68.144.73 +SK6SA 90.144.170.73 +SK7BS 44.140.236.21 +SK7DS 77.107.16.191 +SK7RDS 46.230.239.7 +SK7RGM 46.195.13.179 +SK7RNQ 85.30.164.129 +SK7RRV 81.170.157.133 +SK7RSR 46.162.115.29 +SL2ZA 44.140.236.90 +SR1UVH 178.238.252.12 +SR1UVS 185.71.241.179 +SR2UVG 178.182.231.10 +SR2UVO 77.91.9.87 +SR2UVV 193.188.198.80 +SR2VVV 193.188.198.121 +SR3UVL 89.68.2.48 +SR3ZX 31.179.247.147 +SR4MR 89.229.112.15 +SR4UBI 109.231.36.129 +SR4UVD 213.73.1.97 +SR4UVM 213.73.1.96 +SR4UVN 82.160.168.159 +SR5RK 212.2.124.66 +SR5UOS 194.50.158.122 +SR5UVA 185.28.103.77 +SR5UVR 193.111.146.160 +SR5WC 195.137.246.150 +SR6DMR 79.190.47.27 +SR6UKB 46.231.77.40 +SR6UPK 192.162.98.59 +SR6UVO 79.162.252.86 +SR6UVW 94.254.131.164 +SR6UVX 213.199.207.199 +SR7LDZ 217.113.226.137 +SR7ULM 217.113.226.137 +SR7USC 93.105.207.178 +SR7UVK 46.45.109.210 +SR8UVC 95.160.212.234 +SR8UVL 46.21.222.34 +SR8UVP 212.2.124.234 +SR8UWD 94.246.175.66 +SR9CZ 193.93.90.190 +SR9KR 37.47.68.144 +SR9SZ 79.175.232.17 +SR9UV 89.174.117.157 +SR9UVK 194.187.236.178 +SR9UVP 85.190.240.120 +SR9UVZ 178.23.105.134 +SR9VVO 89.234.226.126 +SV1P 79.130.76.190 +SV2Q 80.106.24.223 +SV3G 83.212.248.94 +SV8S 94.66.26.109 +SV9K 85.72.39.67 +SW1I 178.59.23.138 +SW2A 109.242.193.199 +T79DV 77.242.223.46 +TF3RPI 194.144.104.195 +UR0HUA 193.200.175.69 +V53W 41.182.6.211 +VA2LX 45.42.113.14 +VA2REX 207.35.36.178 +VA2RKA 199.91.244.166 +VA2RKB 23.178.1.126 +VA2RVO 207.253.107.5 +VA2XNY 206.47.252.157 +VA3ITL 174.117.156.18 +VA3ODG 64.179.223.221 +VA3RDD 142.114.102.68 +VA3SNR 70.76.12.11 +VA3SRG 216.223.75.148 +VA3WDG 216.8.148.24 +VA5DR 128.233.238.66 +VA6ACW 68.147.27.52 +VA6MEO 70.73.156.104 +VA6SRG 199.126.180.49 +VA7REF 24.86.6.163 +VE1DNR 47.55.201.14 +VE2CSA 142.116.210.109 +VE2CST 192.99.111.170 +VE2FCT 173.177.48.60 +VE2QE 70.50.46.246 +VE2REX 209.226.17.162 +VE2RHH 70.27.229.10 +VE2RIO 192.81.14.31 +VE2RKI 104.245.152.243 +VE2RQT 132.203.129.20 +VE2RTO 148.59.220.178 +VE2RVI 104.192.17.255 +VE2SEW 207.253.181.227 +VE2SKG 74.210.140.143 +VE2VPS 66.159.41.113 +VE3DSL 208.114.128.164 +VE3EBX 99.228.74.129 +VE3FCD 99.237.33.210 +VE3NMN 97.107.59.241 +VE3RIG 108.161.115.76 +VE3RSB 184.151.178.34 +VE3STP 104.245.3.63 +VE3XBT 50.100.78.137 +VE3YRK 66.159.121.4 +VE5MBX 24.72.17.36 +VE6IPG 70.73.156.94 +VE6JKB 108.173.190.73 +VE6KM 69.196.80.40 +VE6MHD 198.53.218.88 +VE6WRE 70.73.93.106 +VE7RMR 216.13.198.52 +VK1RWN 43.225.61.4 +VK2RAG 202.182.150.242 +VK2RBV 202.182.133.44 +VK2RWN 112.213.33.196 +VK3RMM 120.157.89.133 +VK4RBD 110.141.198.177 +VK4RBX 203.201.137.251 +VK4RDK 123.211.29.67 +VK4RUS 103.102.229.98 +VK7RAA 118.208.246.183 +VK7RCR 120.29.244.4 +VK7RRR 118.208.244.133 +VY1RDS 174.90.251.92 +VY2CFB 96.30.171.235 +VY2DSR 96.30.161.195 +W0CDS 66.109.218.67 +W0QEY 129.82.254.231 +W0ZWY 184.169.107.74 +W1BCG 199.241.247.2 +W1CNH 65.175.188.230 +W1MRA 173.48.14.233 +W2ECA 163.151.247.12 +W2XRX 174.224.132.162 +W3DHS 69.140.91.192 +W3DRA 69.242.93.85 +W4BRM 108.18.217.86 +W4GSO 98.101.176.110 +W4GWM 64.234.103.45 +W4IAX 70.145.51.143 +W4VLD 192.119.238.197 +W5AW 208.68.71.94 +W5DRA 75.66.21.213 +W5SUL 173.216.181.178 +W5TC 129.15.109.18 +W5WIN 24.162.194.195 +W6CX 208.80.118.218 +W7AI 75.146.134.20 +W7NPC 97.113.104.185 +W7NPG 50.47.138.52 +W7RNK 70.89.121.130 +W8HEQ 74.218.95.46 +W8ORG 162.195.36.251 +W8RNL 74.218.136.51 +W8RTL 72.9.63.207 +W9WDX 74.126.231.228 +WA0RC 204.77.163.64 +WA2EMO 72.230.162.224 +WA4KIK 71.82.31.66 +WA7HJR 44.24.241.133 +WA7VC 64.91.53.130 +WB1GOF 108.7.45.17 +WB4KOG 44.34.128.175 +WB6BA 64.135.177.146 +WD1CRS 73.126.7.192 +WI8DX 24.209.195.47 +WI9WIN 216.246.177.7 +WR0AEN 66.109.209.220 +WR5FM 67.61.81.83 +WR7KCR 69.55.219.9 +WW9RS 216.222.190.20 +WX4PCA 107.141.141.203 +WX8GRR 96.36.57.251 +WX9NC 76.29.59.178 +XE2ITZ 189.237.150.227 +XE2NL 187.138.65.97 +YO6K 86.125.103.6 +YO6U 193.254.231.124 +ZL1CCT 131.203.124.1 +ZL1IBD 202.36.75.248 +ZL1TPD 222.154.227.90 +ZS6VTS 146.64.235.18 +ZU9DBI 154.73.157.17 From b74359f4d837ef56000a2b191cc9c58b147808e7 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Wed, 11 Jul 2018 17:57:31 +0100 Subject: [PATCH 014/166] Update the positions of the VC2017 run-time redistributable packages. --- BUILD.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/BUILD.txt b/BUILD.txt index d131984..43f4110 100644 --- a/BUILD.txt +++ b/BUILD.txt @@ -34,10 +34,10 @@ xxx30ud_xxxx instead. These can be found in the wxWidgets-3.0.4\lib\vc_dll directory. It is also probable that you'll need to install a copy of the latest Visual C++ -run-time libraries from Microsoft, if you are not running the Repeater software -on the same machine as the development/compilation was done on. To do this you -need to copy and run the Vcredist_x86.exe file which is found at - +run-time libraries from Microsoft, if you are not running the gateway software +on the same machine as the development/compilation was done on. For 32-bit systems +use https://go.microsoft.com/fwlink/?LinkId=746571 and for 64-bit systems use +https://go.microsoft.com/fwlink/?LinkId=746572 Linux ----- From 460d0dc87301851f84a95164fee185be9f725a39 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Thu, 12 Jul 2018 18:25:02 +0100 Subject: [PATCH 015/166] Add 32- and 64-bit NSIS installers. --- ircDDBGateway32.nsi | 131 ++++++++++++++++++++++++++++++++++++++++++++ ircDDBGateway64.nsi | 131 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 262 insertions(+) create mode 100644 ircDDBGateway32.nsi create mode 100644 ircDDBGateway64.nsi diff --git a/ircDDBGateway32.nsi b/ircDDBGateway32.nsi new file mode 100644 index 0000000..75d2ff2 --- /dev/null +++ b/ircDDBGateway32.nsi @@ -0,0 +1,131 @@ +;NSIS Modern User Interface +;Repeater install script +;Written by Jonathan Naylor + +;-------------------------------- +;Include Modern UI + + !include "MUI2.nsh" + +;-------------------------------- +;Configuration + + ;General + Name "ircDDB Gateway 20180627" + OutFile "ircDDBGateway32-20180627.exe" + + ;Folder selection page + InstallDir "$PROGRAMFILES\ircDDBGateway" + + ;Request application privileges for Windows Vista + RequestExecutionLevel admin + +;-------------------------------- +;Interface Settings + + !define MUI_ABORTWARNING + +;-------------------------------- +;Pages + + !insertmacro MUI_PAGE_LICENSE "COPYING.txt" + !insertmacro MUI_PAGE_DIRECTORY + !insertmacro MUI_PAGE_INSTFILES + !insertmacro MUI_UNPAGE_CONFIRM + !insertmacro MUI_UNPAGE_INSTFILES + +;-------------------------------- +;Languages + + !insertmacro MUI_LANGUAGE "English" + +;-------------------------------- +;Installer Sections + +Section "Repeater Program Files" SecProgram + + SetOutPath "$INSTDIR" + + File "Release\ircDDBGateway.exe" + File "Release\ircDDBGatewayConfig.exe" + File "Release\RemoteControl.exe" + File "Release\StarNetServer.exe" + File "Release\TextTransmit.exe" + File "Release\TimerControl.exe" + File "Release\TimeServer.exe" + File "Release\VoiceTransmit.exe" + File "C:\wxWidgets-3.0.4\lib\vc_dll\wxbase30u_vc_custom.dll" + File "C:\wxWidgets-3.0.4\lib\vc_dll\wxmsw30u_adv_vc_custom.dll" + File "C:\wxWidgets-3.0.4\lib\vc_dll\wxmsw30u_core_vc_custom.dll" + File "CHANGES.txt" + File "COPYING.txt" + File "Data\CCS_Hosts.txt" + File "Data\DCS_Hosts.txt" + File "Data\DExtra_Hosts.txt" + File "Data\DPlus_Hosts.txt" + File "Data\TIME_de_DE.ambe" + File "Data\TIME_de_DE.indx" + File "Data\TIME_en_GB.ambe" + File "Data\TIME_en_GB.indx" + File "Data\TIME_en_US.ambe" + File "Data\TIME_en_US.indx" + File "Data\TIME_fr_FR.ambe" + File "Data\TIME_fr_FR.indx" + File "Data\TIME_se_SE.ambe" + File "Data\TIME_se_SE.indx" + File "Data\de_DE.ambe" + File "Data\de_DE.indx" + File "Data\dk_DK.ambe" + File "Data\dk_DK.indx" + File "Data\en_GB.ambe" + File "Data\en_GB.indx" + File "Data\en_US.ambe" + File "Data\en_US.indx" + File "Data\es_ES.ambe" + File "Data\es_ES.indx" + File "Data\fr_FR.ambe" + File "Data\fr_FR.indx" + File "Data\it_IT.ambe" + File "Data\it_IT.indx" + File "Data\no_NO.ambe" + File "Data\no_NO.indx" + File "Data\pl_PL.ambe" + File "Data\pl_PL.indx" + File "Data\se_SE.ambe" + File "Data\se_SE.indx" + + ;Create start menu entry + CreateDirectory "$SMPROGRAMS\ircDDBGateway" + CreateShortCut "$SMPROGRAMS\ircDDBGateway\ircDDB Gateway.lnk" "$INSTDIR\ircDDBGateway.exe" + CreateShortCut "$SMPROGRAMS\ircDDBGateway\ircDDB Gateway Config.lnk" "$INSTDIR\ircDDBGatewayConfig.exe" + CreateShortCut "$SMPROGRAMS\ircDDBGateway\Remote Control.lnk" "$INSTDIR\RemoteControl.exe" + CreateShortCut "$SMPROGRAMS\ircDDBGateway\StarNet Server.lnk" "$INSTDIR\StarNetServer.exe" + CreateShortCut "$SMPROGRAMS\ircDDBGateway\Timer Control.lnk" "$INSTDIR\TimerControl.exe" + CreateShortCut "$SMPROGRAMS\ircDDBGateway\Time Server.lnk" "$INSTDIR\TimeServer.exe" + CreateShortCut "$SMPROGRAMS\ircDDBGateway\Changes.lnk" "$INSTDIR\CHANGES.txt" + CreateShortCut "$SMPROGRAMS\ircDDBGateway\Licence.lnk" "$INSTDIR\COPYING.txt" + CreateShortCut "$SMPROGRAMS\ircDDBGateway\Uninstall.lnk" "$INSTDIR\Uninstall.exe" + + ;Create uninstaller + WriteUninstaller "$INSTDIR\Uninstall.exe" + +SectionEnd + +;-------------------------------- +;Uninstaller Section + +Section "Uninstall" + + Delete "$INSTDIR\*.*" + RMDir "$INSTDIR" + + Delete "$SMPROGRAMS\ircDDBGateway\*.*" + RMDir "$SMPROGRAMS\ircDDBGateway" + + DeleteRegKey /ifempty HKCU "Software\G4KLX\IRCDDB Gateway" + DeleteRegKey /ifempty HKCU "Software\G4KLX\Remote Control" + DeleteRegKey /ifempty HKCU "Software\G4KLX\StarNet Server" + DeleteRegKey /ifempty HKCU "Software\G4KLX\Timer Control" + DeleteRegKey /ifempty HKCU "Software\G4KLX\Time Server" + +SectionEnd diff --git a/ircDDBGateway64.nsi b/ircDDBGateway64.nsi new file mode 100644 index 0000000..a94110e --- /dev/null +++ b/ircDDBGateway64.nsi @@ -0,0 +1,131 @@ +;NSIS Modern User Interface +;Repeater install script +;Written by Jonathan Naylor + +;-------------------------------- +;Include Modern UI + + !include "MUI2.nsh" + +;-------------------------------- +;Configuration + + ;General + Name "ircDDB Gateway 20180627" + OutFile "ircDDBGateway64-20180627.exe" + + ;Folder selection page + InstallDir "$PROGRAMFILES64\ircDDBGateway" + + ;Request application privileges for Windows Vista + RequestExecutionLevel admin + +;-------------------------------- +;Interface Settings + + !define MUI_ABORTWARNING + +;-------------------------------- +;Pages + + !insertmacro MUI_PAGE_LICENSE "COPYING.txt" + !insertmacro MUI_PAGE_DIRECTORY + !insertmacro MUI_PAGE_INSTFILES + !insertmacro MUI_UNPAGE_CONFIRM + !insertmacro MUI_UNPAGE_INSTFILES + +;-------------------------------- +;Languages + + !insertmacro MUI_LANGUAGE "English" + +;-------------------------------- +;Installer Sections + +Section "Repeater Program Files" SecProgram + + SetOutPath "$INSTDIR" + + File "x64\Release\ircDDBGateway.exe" + File "x64\Release\ircDDBGatewayConfig.exe" + File "x64\Release\RemoteControl.exe" + File "x64\Release\StarNetServer.exe" + File "x64\Release\TextTransmit.exe" + File "x64\Release\TimerControl.exe" + File "x64\Release\TimeServer.exe" + File "x64\Release\VoiceTransmit.exe" + File "C:\wxWidgets-3.0.4\lib\vc_x64_dll\wxbase30u_vc_x64_custom.dll" + File "C:\wxWidgets-3.0.4\lib\vc_x64_dll\wxmsw30u_adv_vc_x64_custom.dll" + File "C:\wxWidgets-3.0.4\lib\vc_x64_dll\wxmsw30u_core_vc_x64_custom.dll" + File "CHANGES.txt" + File "COPYING.txt" + File "Data\CCS_Hosts.txt" + File "Data\DCS_Hosts.txt" + File "Data\DExtra_Hosts.txt" + File "Data\DPlus_Hosts.txt" + File "Data\TIME_de_DE.ambe" + File "Data\TIME_de_DE.indx" + File "Data\TIME_en_GB.ambe" + File "Data\TIME_en_GB.indx" + File "Data\TIME_en_US.ambe" + File "Data\TIME_en_US.indx" + File "Data\TIME_fr_FR.ambe" + File "Data\TIME_fr_FR.indx" + File "Data\TIME_se_SE.ambe" + File "Data\TIME_se_SE.indx" + File "Data\de_DE.ambe" + File "Data\de_DE.indx" + File "Data\dk_DK.ambe" + File "Data\dk_DK.indx" + File "Data\en_GB.ambe" + File "Data\en_GB.indx" + File "Data\en_US.ambe" + File "Data\en_US.indx" + File "Data\es_ES.ambe" + File "Data\es_ES.indx" + File "Data\fr_FR.ambe" + File "Data\fr_FR.indx" + File "Data\it_IT.ambe" + File "Data\it_IT.indx" + File "Data\no_NO.ambe" + File "Data\no_NO.indx" + File "Data\pl_PL.ambe" + File "Data\pl_PL.indx" + File "Data\se_SE.ambe" + File "Data\se_SE.indx" + + ;Create start menu entry + CreateDirectory "$SMPROGRAMS\ircDDBGateway" + CreateShortCut "$SMPROGRAMS\ircDDBGateway\ircDDB Gateway.lnk" "$INSTDIR\ircDDBGateway.exe" + CreateShortCut "$SMPROGRAMS\ircDDBGateway\ircDDB Gateway Config.lnk" "$INSTDIR\ircDDBGatewayConfig.exe" + CreateShortCut "$SMPROGRAMS\ircDDBGateway\Remote Control.lnk" "$INSTDIR\RemoteControl.exe" + CreateShortCut "$SMPROGRAMS\ircDDBGateway\StarNet Server.lnk" "$INSTDIR\StarNetServer.exe" + CreateShortCut "$SMPROGRAMS\ircDDBGateway\Timer Control.lnk" "$INSTDIR\TimerControl.exe" + CreateShortCut "$SMPROGRAMS\ircDDBGateway\Time Server.lnk" "$INSTDIR\TimeServer.exe" + CreateShortCut "$SMPROGRAMS\ircDDBGateway\Changes.lnk" "$INSTDIR\CHANGES.txt" + CreateShortCut "$SMPROGRAMS\ircDDBGateway\Licence.lnk" "$INSTDIR\COPYING.txt" + CreateShortCut "$SMPROGRAMS\ircDDBGateway\Uninstall.lnk" "$INSTDIR\Uninstall.exe" + + ;Create uninstaller + WriteUninstaller "$INSTDIR\Uninstall.exe" + +SectionEnd + +;-------------------------------- +;Uninstaller Section + +Section "Uninstall" + + Delete "$INSTDIR\*.*" + RMDir "$INSTDIR" + + Delete "$SMPROGRAMS\ircDDBGateway\*.*" + RMDir "$SMPROGRAMS\ircDDBGateway" + + DeleteRegKey /ifempty HKCU "Software\G4KLX\IRCDDB Gateway" + DeleteRegKey /ifempty HKCU "Software\G4KLX\Remote Control" + DeleteRegKey /ifempty HKCU "Software\G4KLX\StarNet Server" + DeleteRegKey /ifempty HKCU "Software\G4KLX\Timer Control" + DeleteRegKey /ifempty HKCU "Software\G4KLX\Time Server" + +SectionEnd From f2e06a86d9030e6d9554d3184928df838ca4c977 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Thu, 12 Jul 2018 20:23:05 +0100 Subject: [PATCH 016/166] Add makefiles to build a GUI version under Linux. --- MakefileGUI | 76 +++++++++++++++++++++++++++++++++++++++ ircDDBGateway/MakefileGUI | 17 +++++++++ 2 files changed, 93 insertions(+) create mode 100644 MakefileGUI create mode 100644 ircDDBGateway/MakefileGUI diff --git a/MakefileGUI b/MakefileGUI new file mode 100644 index 0000000..a7e006a --- /dev/null +++ b/MakefileGUI @@ -0,0 +1,76 @@ +export DATADIR := "/usr/share/ircddbgateway" +export LOGDIR := "/var/log" +export CONFDIR := "/etc" +export BINDIR := "/usr/bin" + +export CXX := $(shell wx-config --cxx) +export CFLAGS := -O2 -Wall $(shell wx-config --cxxflags) -DLOG_DIR='$(LOGDIR)' -DCONF_DIR='$(CONFDIR)' -DDATA_DIR='$(DATADIR)' +export GUILIBS := $(shell wx-config --libs adv,core,base) +export LIBS := $(shell wx-config --libs base) +export LDFLAGS := + +all: ircDDBGateway/ircddbgatewayd ircDDBGatewayConfig/ircddbgatewayconfig APRSTransmit/aprstransmitd RemoteControl/remotecontrold \ + StarNetServer/starnetserverd TextTransmit/texttransmitd TimerControl/timercontrold TimeServer/timeserverd VoiceTransmit/voicetransmitd + +ircDDBGateway/ircddbgatewayd: GUICommon/GUICommon.a Common/Common.a ircDDB/IRCDDB.a + make -C ircDDBGateway -f MakefileGUI + +ircDDBGatewayConfig/ircddbgatewayconfig: GUICommon/GUICommon.a Common/Common.a + make -C ircDDBGatewayConfig + +APRSTransmit/aprstransmitd: Common/Common.a + make -C APRSTransmit + +RemoteControl/remotecontrold: Common/Common.a + make -C RemoteControl + +StarNetServer/starnetserverd: Common/Common.a ircDDB/IRCDDB.a + make -C StarNetServer + +TextTransmit/texttransmitd: Common/Common.a + make -C TextTransmit + +TimerControl/timercontrold: Common/Common.a GUICommon/GUICommon.a + make -C TimerControl + +TimeServer/timeserverd: Common/Common.a GUICommon/GUICommon.a + make -C TimeServer + +VoiceTransmit/voicetransmitd: Common/Common.a + make -C VoiceTransmit + +GUICommon/GUICommon.a: + make -C GUICommon + +Common/Common.a: + make -C Common + +ircDDB/IRCDDB.a: + make -C ircDDB + +install: all + make -C Data install + make -C APRSTransmit install + make -C ircDDBGateway install + make -C RemoteControl install + make -C StarNetServer install + make -C TextTransmit install + make -C TimerControl install + make -C TimeServer install + make -C VoiceTransmit install + make -C ircDDBGatewayConfig install + +clean: + make -C Common clean + make -C ircDDB clean + make -C GUICommon clean + make -C APRSTransmit clean + make -C ircDDBGateway clean + make -C RemoteControl clean + make -C StarNetServer clean + make -C TextTransmit clean + make -C TimerControl clean + make -C TimeServer clean + make -C VoiceTransmit clean + make -C ircDDBGatewayConfig clean + diff --git a/ircDDBGateway/MakefileGUI b/ircDDBGateway/MakefileGUI new file mode 100644 index 0000000..8ebf8fa --- /dev/null +++ b/ircDDBGateway/MakefileGUI @@ -0,0 +1,17 @@ +OBJECTS = IRCDDBGatewayApp.o IRCDDBGatewayFrame.o IRCDDBGatewayLogRedirect.o IRCDDBGatewayStatusData.o IRCDDBGatewayThread.o \ + IRCDDBGatewayThreadHelper.o + +all: ircddbgateway + +ircddbgateway: $(OBJECTS) + $(CXX) $(OBJECTS) ../GUICommon/GUICommon.a ../Common/Common.a ../ircDDB/IRCDDB.a $(LDFLAGS) $(GUILIBS) -o ircddbgateway + +%.o: %.cpp + $(CXX) $(CFLAGS) -I../Common -I../GUICommon -I../ircDDB -c -o $@ $< + +install: + install -g bin -o root -m 0775 ircddbgateway $(BINDIR) + +clean: + $(RM) ircddbgateway *.o *.d *.bak *~ + From ba7d848f782494abd868f5ac5df1484a716e4bb3 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Thu, 12 Jul 2018 20:27:30 +0100 Subject: [PATCH 017/166] Update the web address for the VC2017 downloads. --- BUILD.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/BUILD.txt b/BUILD.txt index 43f4110..0a29863 100644 --- a/BUILD.txt +++ b/BUILD.txt @@ -35,9 +35,9 @@ directory. It is also probable that you'll need to install a copy of the latest Visual C++ run-time libraries from Microsoft, if you are not running the gateway software -on the same machine as the development/compilation was done on. For 32-bit systems -use https://go.microsoft.com/fwlink/?LinkId=746571 and for 64-bit systems use -https://go.microsoft.com/fwlink/?LinkId=746572 +on the same machine as the development/compilation was done on. You can find the +latest versions at https://support.microsoft.com/en-gb/help/2977003/the-latest-supported-visual-c-downloads + Linux ----- From 71f388197f3fb166cbe012a09f0d5fa77a00a52d Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Tue, 17 Jul 2018 19:15:25 +0100 Subject: [PATCH 018/166] Use the header my callsign for the APRS callsign on a TH-D74. --- Common/APRSCollector.cpp | 50 ++++++++++++++++++++++++-------------- Common/APRSCollector.h | 8 ++++-- Common/APRSWriter.cpp | 28 ++++++++++++--------- Common/APRSWriter.h | 5 ++-- Common/RepeaterHandler.cpp | 2 +- 5 files changed, 58 insertions(+), 35 deletions(-) diff --git a/Common/APRSCollector.cpp b/Common/APRSCollector.cpp index c44a0a8..f6ab546 100644 --- a/Common/APRSCollector.cpp +++ b/Common/APRSCollector.cpp @@ -57,12 +57,15 @@ CAPRSCollector::~CAPRSCollector() delete[] m_buffer; } -bool CAPRSCollector::writeData(const wxString& callsign, const unsigned char* data) +void CAPRSCollector::writeHeader(const wxString& callsign) +{ + m_callsign = callsign; +} + +bool CAPRSCollector::writeData(const unsigned char* data) { wxASSERT(data != NULL); - m_callsign = callsign; - switch (m_slowData) { case SS_FIRST: m_buffer[0U] = data[0U] ^ SCRAMBLER_BYTE1; @@ -415,13 +418,7 @@ unsigned int CAPRSCollector::convertNMEA1(unsigned char* data, unsigned int) return 0U; char callsign[10U]; - ::memset(callsign, ' ', 10U); - for (unsigned int i = 0U; i < m_callsign.Len(); i++) - callsign[i] = m_callsign.GetChar(i); - - // This can't fail! - char* p = ::strchr(callsign, ' '); - *p = '\0'; + dstarCallsignToAPRS(m_callsign, callsign); ::sprintf((char*)data, "%s>APDPRS,DSTAR*:!%.7s%s%c%.8s%s%c", callsign, pGGA[2U], pGGA[3U], APRS_OVERLAY, pGGA[4U], pGGA[5U], APRS_SYMBOL); @@ -434,7 +431,7 @@ unsigned int CAPRSCollector::convertNMEA1(unsigned char* data, unsigned int) str = (char*)m_rmcData; for (;;) { - p = mystrsep(&str, ",\r\n"); + char* p = mystrsep(&str, ",\r\n"); pRMC[nRMC++] = p; if (p == NULL) @@ -484,13 +481,7 @@ unsigned int CAPRSCollector::convertNMEA2(unsigned char* data, unsigned int) return 0U; char callsign[10U]; - ::memset(callsign, ' ', 10U); - for (unsigned int i = 0U; i < m_callsign.Len(); i++) - callsign[i] = m_callsign.GetChar(i); - - // This can't fail! - char* p = ::strchr(callsign, ' '); - *p = '\0'; + dstarCallsignToAPRS(m_callsign, callsign); ::sprintf((char*)data, "%s>APDPRS,DSTAR*:!%.7s%s%c%.8s%s%c", callsign, pRMC[3U], pRMC[4U], APRS_OVERLAY, pRMC[5U], pRMC[6U], APRS_SYMBOL); @@ -504,6 +495,29 @@ unsigned int CAPRSCollector::convertNMEA2(unsigned char* data, unsigned int) return ::strlen((char*)data); } +void CAPRSCollector::dstarCallsignToAPRS(const wxString& dstarCallsign, char* aprsCallsign) const +{ + wxASSERT(aprsCallsign != NULL); + + wxString first = dstarCallsign.BeforeFirst(wxT(' ')); + wxString last = dstarCallsign.AfterLast(wxT(' ')); + + if (first.IsSameAs(last)) { + unsigned int n = 0U; + for (unsigned int i = 0U; i < dstarCallsign.Len(); i++) + aprsCallsign[n++] = dstarCallsign.GetChar(i); + aprsCallsign[n++] = '\0'; + } else { + unsigned int n = 0U; + for (unsigned int i = 0U; i < first.Len(); i++) + aprsCallsign[n++] = first.GetChar(i); + aprsCallsign[n++] = '-'; + for (unsigned int i = 0U; i < last.Len(); i++) + aprsCallsign[n++] = last.GetChar(i); + aprsCallsign[n++] = '\0'; + } +} + // Source found at char* CAPRSCollector::mystrsep(char** sp, const char* sep) const { diff --git a/Common/APRSCollector.h b/Common/APRSCollector.h index 85bd3da..16557cf 100644 --- a/Common/APRSCollector.h +++ b/Common/APRSCollector.h @@ -35,12 +35,14 @@ public: CAPRSCollector(); ~CAPRSCollector(); - bool writeData(const wxString& callsign, const unsigned char* data); + void writeHeader(const wxString& callsign); - void sync(); + bool writeData(const unsigned char* data); void reset(); + void sync(); + unsigned int getData(unsigned char* data, unsigned int length); private: @@ -74,6 +76,8 @@ private: unsigned int convertNMEA1(unsigned char* data, unsigned int length); unsigned int convertNMEA2(unsigned char* data, unsigned int length); + void dstarCallsignToAPRS(const wxString& dstarCallsign, char* aprsCallsign) const; + char* mystrsep(char** sp, const char* sep) const; }; diff --git a/Common/APRSWriter.cpp b/Common/APRSWriter.cpp index d34ab3c..279f4ab 100644 --- a/Common/APRSWriter.cpp +++ b/Common/APRSWriter.cpp @@ -158,6 +158,21 @@ bool CAPRSWriter::open() return m_thread->start(); } +void CAPRSWriter::writeHeader(const wxString& callsign, const CHeaderData& header) +{ + CAPRSEntry* entry = m_array[callsign]; + if (entry == NULL) { + wxLogError(wxT("Cannot find the callsign \"%s\" in the APRS array"), callsign.c_str()); + return; + } + + entry->reset(); + + CAPRSCollector* collector = entry->getCollector(); + + collector->writeHeader(header.getMyCall1()); +} + void CAPRSWriter::writeData(const wxString& callsign, const CAMBEData& data) { if (data.isEnd()) @@ -179,7 +194,7 @@ void CAPRSWriter::writeData(const wxString& callsign, const CAMBEData& data) unsigned char buffer[400U]; data.getData(buffer, DV_FRAME_MAX_LENGTH_BYTES); - bool complete = collector->writeData(callsign, buffer + VOICE_FRAME_LENGTH_BYTES); + bool complete = collector->writeData(buffer + VOICE_FRAME_LENGTH_BYTES); if (!complete) return; @@ -230,17 +245,6 @@ void CAPRSWriter::writeData(const wxString& callsign, const CAMBEData& data) collector->reset(); } -void CAPRSWriter::reset(const wxString& callsign) -{ - CAPRSEntry* entry = m_array[callsign]; - if (entry == NULL) { - wxLogError(wxT("Cannot find the callsign \"%s\" in the APRS array"), callsign.c_str()); - return; - } - - entry->reset(); -} - void CAPRSWriter::clock(unsigned int ms) { m_idTimer.clock(ms); diff --git a/Common/APRSWriter.h b/Common/APRSWriter.h index bf7f607..2a5485c 100644 --- a/Common/APRSWriter.h +++ b/Common/APRSWriter.h @@ -22,6 +22,7 @@ #include "APRSWriterThread.h" #include "APRSCollector.h" #include "DStarDefines.h" +#include "HeaderData.h" #include "AMBEData.h" #include "Timer.h" #include "Defs.h" @@ -73,9 +74,9 @@ public: void setPort(const wxString& callsign, const wxString& band, double frequency, double offset, double range, double latitude, double longitude, double agl); - void writeData(const wxString& callsign, const CAMBEData& data); + void writeHeader(const wxString& callsign, const CHeaderData& header); - void reset(const wxString& callsign); + void writeData(const wxString& callsign, const CAMBEData& data); bool isConnected() const; diff --git a/Common/RepeaterHandler.cpp b/Common/RepeaterHandler.cpp index 497c4c7..215e0dd 100644 --- a/Common/RepeaterHandler.cpp +++ b/Common/RepeaterHandler.cpp @@ -594,7 +594,7 @@ void CRepeaterHandler::processRepeater(CHeaderData& header) // Reset the APRS Writer if it's enabled if (m_aprsWriter != NULL) - m_aprsWriter->reset(m_rptCallsign); + m_aprsWriter->writeHeader(m_rptCallsign, header); // Write to Header.log if it's enabled if (m_headerLogger != NULL) From 7a8d63ccab3a1befb9e23f412275ba03f445010a Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Wed, 18 Jul 2018 07:41:14 +0100 Subject: [PATCH 019/166] Add APRS debugging message for the log. --- Common/APRSCollector.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Common/APRSCollector.cpp b/Common/APRSCollector.cpp index f6ab546..12333d2 100644 --- a/Common/APRSCollector.cpp +++ b/Common/APRSCollector.cpp @@ -60,6 +60,8 @@ CAPRSCollector::~CAPRSCollector() void CAPRSCollector::writeHeader(const wxString& callsign) { m_callsign = callsign; + + wxLogMessage(wxT("APRS: Received callsign from header of \"%s\""), m_callsign.c_str()); } bool CAPRSCollector::writeData(const unsigned char* data) @@ -453,6 +455,9 @@ unsigned int CAPRSCollector::convertNMEA1(unsigned char* data, unsigned int) ::sprintf((char*)data + ::strlen((char*)data), "/A=%06.0f", float(altitude) * 3.28F); } + wxString log((char*)data, wxConvLocal); + wxLogMessage(wxT("APRS: Created APRS string: %s"), log.c_str()); + return ::strlen((char*)data); } @@ -492,6 +497,9 @@ unsigned int CAPRSCollector::convertNMEA2(unsigned char* data, unsigned int) ::sprintf((char*)data + ::strlen((char*)data), "%03d/%03d", bearing, speed); } + wxString log((char*)data, wxConvLocal); + wxLogMessage(wxT("APRS: Created APRS string: %s"), log.c_str()); + return ::strlen((char*)data); } From 0bd94e25d3c3bfc6c94298c38bfa6df4a60ab5e8 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Wed, 18 Jul 2018 19:11:09 +0100 Subject: [PATCH 020/166] Change callsign conversion decision and base. --- Common/APRSCollector.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Common/APRSCollector.cpp b/Common/APRSCollector.cpp index 12333d2..02a8809 100644 --- a/Common/APRSCollector.cpp +++ b/Common/APRSCollector.cpp @@ -510,10 +510,10 @@ void CAPRSCollector::dstarCallsignToAPRS(const wxString& dstarCallsign, char* ap wxString first = dstarCallsign.BeforeFirst(wxT(' ')); wxString last = dstarCallsign.AfterLast(wxT(' ')); - if (first.IsSameAs(last)) { + if (last.IsEmpty() || first.IsSameAs(last)) { unsigned int n = 0U; - for (unsigned int i = 0U; i < dstarCallsign.Len(); i++) - aprsCallsign[n++] = dstarCallsign.GetChar(i); + for (unsigned int i = 0U; i < first.Len(); i++) + aprsCallsign[n++] = first.GetChar(i); aprsCallsign[n++] = '\0'; } else { unsigned int n = 0U; From 8bb96536d18cad1eab468a1dc739b4d49ce27174 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Thu, 19 Jul 2018 19:07:03 +0100 Subject: [PATCH 021/166] Add optional DCS_LINK and DEXTRA_LINK to the Makefiles. --- Makefile | 3 +++ MakefileGUI | 3 +++ 2 files changed, 6 insertions(+) diff --git a/Makefile b/Makefile index 55bdb1d..e3c3283 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,9 @@ export LOGDIR := "/var/log" export CONFDIR := "/etc" export BINDIR := "/usr/bin" +# Add -DDCS_LINK to the end of the CFLAGS line below to add DCS linking to StarNet +# Add -DDEXTRA_LINK to the end of the CFLAGS line below to add DExtra linking to StarNet + export CXX := $(shell wx-config --cxx) export CFLAGS := -O2 -Wall $(shell wx-config --cxxflags) -DLOG_DIR='$(LOGDIR)' -DCONF_DIR='$(CONFDIR)' -DDATA_DIR='$(DATADIR)' export GUILIBS := $(shell wx-config --libs adv,core,base) diff --git a/MakefileGUI b/MakefileGUI index a7e006a..50c3fc0 100644 --- a/MakefileGUI +++ b/MakefileGUI @@ -3,6 +3,9 @@ export LOGDIR := "/var/log" export CONFDIR := "/etc" export BINDIR := "/usr/bin" +# Add -DDCS_LINK to the end of the CFLAGS line below to add DCS linking to StarNet +# Add -DDEXTRA_LINK to the end of the CFLAGS line below to add DExtra linking to StarNet + export CXX := $(shell wx-config --cxx) export CFLAGS := -O2 -Wall $(shell wx-config --cxxflags) -DLOG_DIR='$(LOGDIR)' -DCONF_DIR='$(CONFDIR)' -DDATA_DIR='$(DATADIR)' export GUILIBS := $(shell wx-config --libs adv,core,base) From 18bd1c7a1521bc99c7acb07c839042a341e91253 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Wed, 25 Jul 2018 07:45:17 +0100 Subject: [PATCH 022/166] Clean up the DExtra hosts file. --- Data/DExtra_Hosts.txt | 606 +++++++++++++++++++++--------------------- 1 file changed, 296 insertions(+), 310 deletions(-) diff --git a/Data/DExtra_Hosts.txt b/Data/DExtra_Hosts.txt index 8565621..95bd1bd 100644 --- a/Data/DExtra_Hosts.txt +++ b/Data/DExtra_Hosts.txt @@ -1,388 +1,374 @@ -# DExtra_Hosts.txt downloaded from http://www.pistar.uk/downloads/DExtra_Hosts.txt -# DExtra Hosts resolved from the XReflector Directory (http://xrefl.net), -# additional host information sourced from http://xlxapi.rlx.lu/api.php?do=GetReflectorHostname -# Please report issues at https://www.facebook.com/groups/pistar/ -# File created at Tuesday 10th of July 2018 08:13:01 PM BST -XRF000 23.111.174.198 -XRF001 77.57.24.143 -XRF002 52.36.45.107 -XRF003 173.199.124.183 -XRF004 44.103.34.3 -XRF005 216.16.240.236 -XRF006 45.76.1.189 -XRF007 82.223.18.138 -XRF008 45.77.153.132 -XRF009 118.150.164.96 -XRF010 xlx010.n8qq.com -XRF011 xlx011.warn.org -XRF012 67.207.216.61 +XRF000 000.xreflector.org +XRF001 xlx001.homepc.it +XRF002 xrf002.dstar.club +XRF003 xlx003.xrefl.net +XRF004 xrf004.kb8zgl.net +XRF005 216.16.240.236 +XRF006 xrf006.xrefl.net +XRF007 82.223.18.138 +XRF008 xrf008.kingsofdigital.net +XRF009 www.hamtalk.net +XRF010 85.197.129.86 +XRF011 81.95.126.168 +XRF012 xrf012.papasys.com XRF013 34.213.176.201 -XRF014 94.23.8.59 -XRF015 xrf015.theapplecore.me -XRF016 44.143.40.30 +XRF014 xrf014.iz0rin.it +XRF015 213.202.228.119 +XRF016 xrf016.ampr.at XRF017 92.177.212.64 -XRF018 199.167.129.166 -XRF019 31.7.247.58 -XRF020 94.177.164.25 +XRF018 99.167.129.166 +XRF019 46.28.108.233 +XRF020 xlx020.iz7auh.net XRF021 44.103.32.250 -XRF022 83.137.45.116 -XRF023 185.177.59.166 -XRF024 194.208.144.167 -XRF025 025.ham-digital.es +XRF022 xrf022.tms-it.net +XRF023 xlx023.dtdns.net +XRF024 xrf024.dstar.at +XRF025 89.38.150.252 XRF026 65.175.188.230 -XRF027 194.116.29.78 -XRF028 193.190.240.228 -XRF029 xrf029.tms-it.net -XRF030 193.170.118.253 -XRF031 xlx031.ddns.net -XRF032 158.64.26.140 -XRF033 46.226.178.81 -XRF034 91.92.136.68 -XRF035 45.79.94.184 -XRF036 151.12.36.112 +XRF027 194.116.29.78 +XRF028 stn028.dstar.be +XRF029 80.123.238.76 +XRF030 xrf030.oe3xht.at +XRF032 xlx032.epf.lu +XRF033 46.226.178.81 +XRF035 xrf035.wa7dre.org +XRF036 xlx036.macasoft.it XRF037 185.58.193.163 XRF038 66.6.171.228 XRF039 31.14.142.119 -XRF040 109.71.45.29 -XRF041 45.62.226.137 -XRF042 44.168.53.137 -XRF043 xrf043.aotnet.it -XRF044 82.1.185.173 -XRF045 xlx045.kc1amf.org -XRF046 212.91.156.69 -XRF047 121.94.194.251 -XRF048 64.39.69.11 -XRF049 212.71.234.224 -XRF050 213.186.33.5 +XRF040 xrf040.dyndns.org +XRF041 167.88.37.80 +XRF042 xrf042.luthienstar.fr +XRF044 82.1.185.173 +XRF045 45.62.233.223 +XRF046 xlx.c4fm.se +XRF047 xlx047.ddns.net +XRF048 xrf048.n5uxt.org +XRF049 212.71.234.224 +XRF050 dstar.emcomspain.xreflector.es XRF051 93.186.254.219 -XRF052 121.119.96.205 -XRF053 91.214.62.136 +XRF052 xrf052.dip.jp +XRF053 xlx.grvdc.eu XRF054 52.86.180.251 -XRF055 52.80.4.154 -XRF056 80.116.203.88 -XRF057 173.216.181.178 -XRF058 115.162.207.228 +XRF055 dstar.zzux.com +XRF056 xrf056.homepc.it +XRF057 xlx057.ddns.net +XRF058 xrf058.dip.jp XRF059 18.219.32.21 -XRF060 212.237.36.181 +XRF060 212.237.36.181 XRF061 68.115.205.110 -XRF062 70.88.145.163 +XRF062 xlx.maryland-dstar.net XRF063 162.248.141.148 -XRF064 122.222.1.50 -XRF066 80.116.203.88 -XRF067 xrf067.f5kav.org -XRF068 92.222.145.202 -XRF069 185.47.129.230 -XRF070 112.218.40.93 -XRF071 211.60.41.185 -XRF073 147.102.7.34 -XRF074 64.137.207.9 +XRF064 xrf064.owari.biz +XRF065 212.237.53.67 +XRF066 xlx066.homepc.it +XRF068 xrf068.ircddb.it +XRF070 xrf070.iptime.org +XRF071 xrf.elechomebrew.com +XRF073 147.102.7.34 +XRF074 xrf074.dyndns.org XRF075 5.135.162.136 -XRF076 203.137.116.117 -XRF077 5.249.151.111 -XRF078 91.214.62.136 -XRF079 59.6.196.35 -XRF080 121.86.66.52 -XRF081 121.86.66.52 -XRF085 27.92.11.123 +XRF076 xrf076.xreflector-jp.org +XRF077 xrf077.duckdns.org +XRF078 xlx.grvdc.eu +XRF079 xlx079.dvham.com +XRF080 jr3vh.dip.jp +XRF081 jr3vh.dip.jp +XRF085 jr1ofp.dip.jp XRF086 52.80.139.252 -XRF088 194.109.192.235 +XRF088 xrf088.pa4tw.nl XRF089 194.109.192.236 XRF090 91.92.136.252 -XRF091 5.196.3.184 XRF092 212.237.30.36 -XRF095 121.93.109.13 -XRF098 111.169.16.250 -XRF099 80.211.27.75 -XRF100 96.94.7.196 -XRF101 45.62.213.101 -XRF102 23.111.174.196 -XRF103 64.137.224.126 -XRF104 23.111.174.197 -XRF105 51.254.99.78 -XRF109 182.168.101.180 -XRF110 150.7.164.10 -XRF111 61.195.96.160 -XRF112 80.211.236.189 -XRF113 212.227.202.198 +XRF095 xrf095.xreflector-jp.org +XRF098 xrf098.dip.jp +XRF099 xlx099.iz7auh.net +XRF100 xlx100.xlxreflector.org +XRF101 xlx101.xlxreflector.org +XRF102 xlx102.xlxreflector.org +XRF103 xlx103.xlxreflector.org +XRF104 xlx104.xlxreflector.org +XRF105 51.254.99.78 +XRF109 xrf109.tokyo +XRF110 xrf110.xreflector-jp.org +XRF111 xrf111.xreflector-jp.org +XRF112 112.xreflector.es +XRF113 212.227.202.198 XRF114 5.135.188.16 -XRF115 217.182.128.3 +XRF115 reflector-xlx.hb9vd.ch XRF116 31.185.101.211 -XRF118 5.249.148.252 -XRF119 125.129.207.86 +XRF118 xlx118.ns0.it +XRF119 xlx119.dvham.com XRF120 81.150.10.63 XRF121 174.37.249.156 -XRF122 83.137.45.100 -XRF123 95.170.70.159 -XRF124 211.14.169.234 -XRF125 213.181.208.52 -XRF127 pj2man.hopto.org -XRF129 219.116.28.227 +XRF123 213.126.90.100 +XRF124 xrf124.xreflector-jp.org +XRF125 xlx125.dyndns.hu +XRF129 guwgw.cir-ins.com XRF130 194.59.177.45 -XRF131 80.127.118.226 -XRF132 91.203.55.87 -XRF133 23.97.163.212 -XRF134 159.89.176.86 +XRF131 xlx131.pe1er.nl +XRF132 xrf132.dstar.radom.pl +XRF133 xrf133.gb7de.co.uk +XRF134 159.89.176.86 XRF145 178.59.23.138 -XRF146 128.0.239.249 +XRF146 xlx146.ddns.net XRF147 46.41.1.127 -XRF150 argentina.mmdvm.es -XRF170 210.178.113.173 -XRF171 121.162.91.45 -XRF177 xlx177.webandcloud.net -XRF180 192.241.240.7 +XRF150 80.211.10.212 +XRF170 dvham.mooo.com +XRF171 xrf171.dvham.com +XRF180 xlx180.warn.org XRF199 153.126.179.214 -XRF200 185.203.119.158 +XRF200 185.203.119.158 XRF202 148.251.122.251 -XRF204 185.85.18.162 +XRF204 xlx204.ph0dv.nl XRF206 193.190.240.227 -XRF208 151.80.155.39 -XRF210 64.137.224.107 -XRF212 52.38.90.188 -XRF214 185.47.129.230 +XRF208 xlx208.f5kav.org +XRF210 210.xreflector.org +XRF212 xlx212.dstar.club +XRF214 xlx214.sustrai.org XRF215 185.87.96.172 XRF216 74.214.25.135 -XRF220 124.41.83.11 -XRF222 xlx222.webandcloud.net +XRF220 xlx220.sapotech.com +XRF222 212.43.96.84 XRF223 208.73.201.157 -XRF224 203.137.99.97 -XRF226 94.176.6.37 -XRF228 188.60.43.206 -XRF229 194.191.4.54 -XRF230 46.28.105.4 -XRF232 83.137.45.106 -XRF233 37.187.103.98 -XRF235 xlx235.duckdns.org -XRF238 172.104.239.219 -XRF241 151.80.158.227 -XRF242 184.168.221.22 -XRF246 172.93.48.159 -XRF248 158.69.206.45 -XRF250 88.212.221.81 -XRF252 118.21.66.186 -XRF255 52.35.115.245 -XRF262 88.198.73.251 +XRF224 xrf224.xreflector-jp.org +XRF226 xrf226.hamnet.ro +XRF228 212.237.33.114 +XRF229 194.191.4.54 +XRF230 ref.dstar.cz +XRF232 xrf232.tms-it.net +XRF233 xlx233.f1smf.com +XRF235 5.150.254.97 +XRF238 172.104.239.219 +XRF241 151.80.158.227 +XRF242 xrf242.k7edw.com +XRF246 xlx.mkagawa.com +XRF248 xrf248.dyndns.org +XRF250 xrf250.dstar.su +XRF252 je7zbu.jpn.ph +XRF255 xrf255.reflector.up4dar.de +XRF262 xrf262.reflector.up4dar.de XRF263 85.214.193.146 XRF264 52.2.131.118 XRF265 51.255.43.60 -XRF266 212.237.51.82 +XRF266 212.237.51.82 XRF268 194.38.140.204 -XRF270 158.64.26.132 -XRF275 64.137.232.33 -XRF277 64.137.185.24 -XRF282 210.188.25.17 -XRF284 193.93.24.29 +XRF270 xrf270.reflector.up4dar.de +XRF275 xrf275.dyndns.org +XRF277 xlx277.dyndns.org +XRF282 xrf282.dip.jp +XRF284 95.158.165.32 +XRF288 99.108.210.100 XRF290 94.176.6.45 -XRF291 60.112.168.104 -XRF295 64.137.160.185 -XRF298 111.169.17.74 -XRF299 125.236.227.43 -XRF300 45.62.213.101 -XRF302 144.217.241.23 -XRF307 72.21.76.154 -XRF310 54.201.104.146 -XRF311 78.47.206.12 -XRF313 34.213.108.164 -XRF315 65.101.7.50 -XRF317 xrf317.crossroadsdmr.org -XRF321 34.200.191.2 -XRF328 212.237.33.114 +XRF291 xrf291.xreflector-jp.org +XRF295 xrf295.dyndns.org +XRF298 xrf298.dip.jp +XRF299 xlx299.zl2ro.nz +XRF300 300.xreflector.org +XRF302 xlx302.hopto.org +XRF307 xlx307.ddns.net +XRF310 xrf310.xrefl.net +XRF311 xrf311.ernix.de +XRF313 xlx313.openstd.net +XRF315 65.101.7.50 +XRF317 44.48.8.15 +XRF321 vps.makeitrad.com +XRF328 cisarbasel.ddns.net XRF332 188.213.168.99 -XRF333 37.187.103.98 +XRF333 xrf333.f1smf.com XRF334 96.47.95.121 -XRF335 185.206.145.2 +XRF335 185.206.145.2 XRF336 23.226.233.133 -XRF339 198.98.53.247 -XRF345 45.62.237.34 -XRF350 5.196.3.184 -XRF357 52.39.82.54 +XRF339 xlx339.avarc.ca +XRF345 xrf345.dyndns.org +XRF353 94.173.206.53 +XRF357 xlx357.w6kd.com XRF359 94.156.172.213 -XRF360 222.229.25.105 -XRF365 59.139.141.204 -XRF370 188.213.168.24 -XRF371 216.146.38.125 +XRF360 xrf360.dip.jp +XRF365 xrf365.dip.jp +XRF370 xrf370.selfip.com +XRF371 xlx371.selfip.com XRF373 101.143.25.116 -XRF374 xlxreflectors.moe.hm +XRF374 xrf374.xreflector-jp.org XRF376 75.145.119.225 -XRF380 160.16.65.39 -XRF382 211.131.37.90 -XRF387 195.130.59.77 +XRF379 184.23.183.98 +XRF380 kdk.ddns.net +XRF382 xrf382.pgw.jp +XRF387 195.130.59.77 XRF388 138.197.67.52 -XRF389 106.70.187.224 -XRF390 xrf390.aotnet.it -XRF398 45.62.250.61 -XRF400 89.46.67.242 -XRF404 91.229.143.187 -XRF410 166.78.156.246 -XRF412 61.199.25.130 -XRF420 51.15.79.58 -XRF423 78.47.253.109 -XRF431 61.195.98.225 -XRF433 217.160.22.17 -XRF434 51.254.128.134 -XRF440 114.161.161.90 -XRF441 203.137.99.110 -XRF443 52.31.246.91 -XRF444 188.68.37.51 -XRF449 159.89.183.117 -XRF450 64.137.224.233 -XRF454 221.125.255.216 -XRF456 54.37.204.187 +XRF389 106.71.83.168 +XRF390 149.7.214.253 +XRF398 104.167.117.71 +XRF400 xlx400.iz7auh.net +XRF404 xlx.bendiksverden.net +XRF410 166.78.156.246 +XRF412 xrf412.dip.jp +XRF420 kc9qen.com +XRF423 4ix.hacktic.de +XRF431 xrf431.xreflector-jp.org +XRF433 xrf433.de +XRF434 51.254.128.134 +XRF438 80.211.189.236 +XRF440 xrf440.e-kyushu.net +XRF441 xrf441.xreflector-jp.org +XRF443 xrf443.arisondrio.it +XRF444 xlx444.pa3dfn.nl +XRF449 159.89.183.117 +XRF450 450.xreflector.org +XRF454 42.2.222.178 +XRF456 xrf456.de XRF464 52.192.129.174 XRF470 104.49.29.243 XRF477 139.162.213.89 -XRF486 51.255.172.249 -XRF490 xrf490.dyndns.org -XRF499 203.137.76.22 -XRF500 172.104.32.192 -XRF502 190.148.222.28 -XRF505 45.248.50.37 +XRF486 xlx486.iz8gur.it +XRF499 xrf499.xreflector-jp.org +XRF500 125.63.57.138 +XRF501 104.130.72.187 +XRF502 74.208.88.137 +XRF505 110.141.219.161 XRF508 185.188.4.15 -XRF510 91.223.115.32 -XRF511 84.52.159.10 +XRF510 xrf510.s56g.net +XRF511 xlx511.ddns.net XRF515 133.130.114.45 -XRF518 176.9.1.168 -XRF519 167.114.104.65 -XRF520 dstar.thdar.com +XRF518 xrf518.n18.de +XRF519 24.55.196.105 +XRF520 119.59.125.192 XRF521 150.129.184.54 -XRF522 14.102.146.160 +XRF523 175.141.51.82 XRF525 176.65.95.90 -XRF538 133.218.172.211 -XRF544 210.131.32.240 -XRF550 94.177.240.69 +XRF538 xrf538.dip.jp +XRF544 xlx544.ddns.net +XRF550 550.xreflector.es XRF554 52.35.183.178 -XRF555 54.191.67.121 -XRF556 162.244.28.131 +XRF555 xrf555.w6kd.com +XRF556 xrf556.w6kd.com XRF567 212.91.156.69 -XRF569 203.137.111.98 +XRF569 xlxreflector.jpn.ph XRF570 104.128.230.153 -XRF583 116.70.242.224 -XRF595 175.179.56.111 -XRF599 xrf599.n5wls.net -XRF600 13.69.14.204 +XRF573 216.189.148.204 +XRF580 67.20.31.79 +XRF583 183.76.149.117 +XRF587 68.32.126.21 +XRF595 hamradio.dip.jp +XRF599 203.137.118.190 +XRF600 xrf600.gb7de.co.uk XRF601 51.141.52.193 XRF602 212.56.100.200 -XRF603 216.10.169.35 -XRF608 219.122.253.83 -XRF610 103.1.213.21 -XRF616 xlx616.wmtg.me -XRF626 202.137.244.157 -XRF634 61.199.25.130 -XRF655 146.64.235.19 -XRF666 5.249.151.111 -XRF673 180.147.243.178 -XRF684 212.237.17.83 +XRF603 xlx603.cnharc.org +XRF608 xrf608.dip.jp +XRF610 xrf610.vkradio.com +XRF626 626.nz +XRF634 xrf634.dip.jp +XRF655 146.64.235.19 +XRF666 vpngrf.webandcloud.net +XRF673 xrf673.xreflector-jp.org +XRF684 212.237.17.83 XRF689 97.107.128.47 -XRF698 85.197.129.86 -XRF699 82.102.5.239 -XRF700 78.47.222.93 -XRF701 61.195.107.77 +XRF699 xlx.tekniksnack.se +XRF700 xrf700.d-star.se +XRF701 xrf701.xreflector-jp.org XRF703 61.195.98.254 -XRF706 93.186.255.126 -XRF707 162.250.144.132 -XRF708 202.218.37.62 +XRF706 xlx706.iz0rin.it +XRF707 xrf707.openquad.net +XRF708 xrf708.xreflector-jp.org XRF709 212.237.34.32 -XRF710 oe7mfi.ddns.net +XRF710 oe7mfi.ddns.net XRF711 212.237.18.27 -XRF712 xrf712.ddo.jp +XRF712 180.11.74.19 XRF714 85.214.119.76 -XRF715 81.169.228.115 -XRF716 79.147.230.179 -XRF717 44.137.70.100 -XRF720 23.237.16.149 -XRF722 80.211.2.161 -XRF724 66.55.64.14 -XRF727 108.33.72.83 -XRF730 186.64.123.59 -XRF732 190.159.68.105 -XRF733 45.56.117.158 +XRF715 xlx715.ea3hkb.net +XRF716 xlx716.duckdns.org +XRF717 44.137.70.100 +XRF719 199.227.117.121 +XRF720 xrf720.freestar.us +XRF722 722.xreflector.es +XRF724 xlx.dvbrazil.com.br +XRF727 w4icy.inerrantenergy.com +XRF730 186.64.123.59 +XRF732 xlx.hk4km.co +XRF733 45.56.117.158 XRF735 104.131.81.32 XRF737 195.130.75.246 -XRF740 imagewell.duckdns.org +XRF740 104.167.114.230 XRF746 178.254.34.44 -XRF747 87.147.133.4 -XRF748 64.137.197.36 -XRF750 119.47.114.165 -XRF752 66.154.105.195 -XRF755 178.22.148.229 -XRF757 107.191.121.105 -XRF766 201.62.48.61 -XRF767 92.210.130.60 -XRF773 94.177.175.230 -XRF775 149.202.61.17 -XRF776 218.221.163.75 -XRF777 112.218.40.91 -XRF781 220.145.56.130 -XRF787 81.169.145.151 +XRF747 xrf747.de +XRF748 xrf748.dyndns.org +XRF752 xlx752.zl2wl.nz +XRF755 xlx.radioamateur.tk +XRF757 xrf757.openquad.net +XRF766 xlx.amrase.org.br +XRF767 xrf767.de +XRF773 xrf773.iz0rin.it +XRF775 149.202.61.17 +XRF776 xlx776.tokyo +XRF777 112.218.40.91 +XRF781 xrf781.xreflector-jp.org +XRF787 xrf787.de XRF789 45.33.119.142 -XRF794 101.143.242.95 -XRF801 195.154.33.170 -XRF803 77.117.38.125 +XRF794 xrf794.xreflector-jp.org +XRF801 f4hin.fr +XRF803 77.117.77.117 XRF806 92.105.198.59 -XRF807 221.113.166.134 -XRF808 18.220.252.27 -XRF810 64.137.238.189 -XRF812 126.109.77.182 -XRF813 97.76.81.165 -XRF828 5.1.85.55 +XRF807 hajikko.iobb.net +XRF808 xrf808.n5wls.net +XRF810 810.xreflector.org +XRF812 xrf812.xreflector-jp.org +XRF813 xlx.inerrantenergy.com +XRF828 xlx828.ddnss.de XRF844 137.226.79.122 -XRF850 88.198.94.77 -XRF851 78.47.53.194 -XRF858 54.164.121.192 -XRF860 45.62.249.215 -XRF870 103.3.234.95 -XRF878 203.137.123.113 +XRF850 xrf850.xrfmaster.net +XRF851 xrf851.rsdt.de +XRF858 xrf858.ke0lmx.net +XRF860 xrf.njpaasterisk.org +XRF870 xrf870.ddns.net +XRF878 xrf878.xreflector-jp.org XRF880 176.10.105.211 -XRF883 153.185.38.99 -XRF886 118.163.103.178 +XRF883 xrf883.dip.jp +XRF886 xrf886.metropit.net XRF887 118.163.103.177 -XRF888 95.239.164.147 +XRF888 xlx888.ns0.it XRF893 103.235.127.147 -XRF897 92.222.23.124 -XRF900 94.177.237.192 -XRF901 45.62.254.159 -XRF902 104.233.76.150 -XRF903 80.211.29.226 -XRF905 199.212.121.20 -XRF906 185.50.196.134 -XRF907 88.11.249.48 -XRF908 92.222.23.124 -XRF909 216.86.147.198 -XRF910 94.177.207.26 +XRF900 94.177.237.192 +XRF901 xrf901.dyndns.org +XRF902 xrf902.dyndns.org +XRF903 80.211.29.226 +XRF905 199.212.121.20 +XRF906 xrf906.radioclubveleta.es +XRF907 xlx907.ddns.net +XRF908 92.222.23.124 +XRF909 www.ealink.es +XRF910 92.177.212.64 XRF911 5.196.73.89 XRF912 80.211.1.143 XRF919 80.211.232.174 -XRF920 44.143.184.83 -XRF921 44.143.184.83 -XRF922 81.150.10.62 +XRF920 xrf920.oe7xxr.ampr.at +XRF921 xlx921.oe7xxr.ampr.at +XRF922 xrf922.mb6er.com XRF925 90.255.232.101 -XRF929 158.69.166.132 -XRF930 94.177.160.5 -XRF931 71.120.181.98 +XRF929 xrf929.ddns.net +XRF930 xreflector.ddns.net +XRF931 xref.kw4yb.com XRF933 164.132.104.167 -XRF935 188.213.166.199 -XRF940 202.218.37.121 -XRF944 202.218.34.210 -XRF945 155.94.147.186 -XRF950 158.64.26.134 +XRF935 xlx935.ddns.net +XRF940 xrf940.xreflector-jp.org +XRF944 xrf944.xreflector-jp.org +XRF945 xlx945.xreflector.es +XRF950 xlx950.epf.lu XRF960 80.211.226.89 XRF964 52.173.142.244 -XRF967 xlx967.uk.to XRF972 46.121.158.50 -XRF973 153.136.102.253 -XRF974 94.177.217.52 -XRF975 176.31.161.9 -XRF976 212.237.36.71 -XRF977 47.88.171.246 -XRF978 193.70.0.229 +XRF973 xrf973.xreflector-jp.org +XRF974 xlx974.dynu.net +XRF975 176.31.161.9 +XRF976 212.237.36.71 XRF986 81.89.102.160 -XRF987 162.252.243.217 -XRF988 198.96.90.144 -XRF989 50.27.131.75 +XRF987 xrf987.metro-uhf.org +XRF988 988.xreflector.es +XRF989 xrf989.bbhill.net XRF990 35.164.237.63 -XRF991 91.92.136.118 -XRF995 158.69.201.255 -XRF996 47.104.177.248 -XRF997 94.177.187.40 -XRF998 44.140.236.20 -XRF999 94.177.173.53 -XRFWDX 159.89.87.33 +XRF991 91.92.136.118 +XRF995 xlx995.ddns.net +XRF996 47.104.177.248 +XRF997 xrf997.iw2gob.it +XRF998 xlx.sm7.hamnet.nu +XRF999 xrf999.no-ip.org From 2a4754e68b690399b1d1d96570b899ff6a510028 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Wed, 25 Jul 2018 07:46:05 +0100 Subject: [PATCH 023/166] Commit the release files, my mistake for forgetting. --- Common/APRSCollector.cpp | 8 -------- Common/Version.h | 4 ++-- ircDDBGateway32.nsi | 4 ++-- ircDDBGateway64.nsi | 4 ++-- 4 files changed, 6 insertions(+), 14 deletions(-) diff --git a/Common/APRSCollector.cpp b/Common/APRSCollector.cpp index 02a8809..fc55fd5 100644 --- a/Common/APRSCollector.cpp +++ b/Common/APRSCollector.cpp @@ -60,8 +60,6 @@ CAPRSCollector::~CAPRSCollector() void CAPRSCollector::writeHeader(const wxString& callsign) { m_callsign = callsign; - - wxLogMessage(wxT("APRS: Received callsign from header of \"%s\""), m_callsign.c_str()); } bool CAPRSCollector::writeData(const unsigned char* data) @@ -455,9 +453,6 @@ unsigned int CAPRSCollector::convertNMEA1(unsigned char* data, unsigned int) ::sprintf((char*)data + ::strlen((char*)data), "/A=%06.0f", float(altitude) * 3.28F); } - wxString log((char*)data, wxConvLocal); - wxLogMessage(wxT("APRS: Created APRS string: %s"), log.c_str()); - return ::strlen((char*)data); } @@ -497,9 +492,6 @@ unsigned int CAPRSCollector::convertNMEA2(unsigned char* data, unsigned int) ::sprintf((char*)data + ::strlen((char*)data), "%03d/%03d", bearing, speed); } - wxString log((char*)data, wxConvLocal); - wxLogMessage(wxT("APRS: Created APRS string: %s"), log.c_str()); - return ::strlen((char*)data); } diff --git a/Common/Version.h b/Common/Version.h index aa37246..a65d9b2 100644 --- a/Common/Version.h +++ b/Common/Version.h @@ -24,9 +24,9 @@ const wxString VENDOR_NAME = wxT("G4KLX"); #if defined(__WXDEBUG__) -const wxString VERSION = wxT("20180627 - DEBUG"); +const wxString VERSION = wxT("20180719 - DEBUG"); #else -const wxString VERSION = wxT("20180627"); +const wxString VERSION = wxT("20180719"); #endif #endif diff --git a/ircDDBGateway32.nsi b/ircDDBGateway32.nsi index 75d2ff2..6300ec4 100644 --- a/ircDDBGateway32.nsi +++ b/ircDDBGateway32.nsi @@ -11,8 +11,8 @@ ;Configuration ;General - Name "ircDDB Gateway 20180627" - OutFile "ircDDBGateway32-20180627.exe" + Name "ircDDB Gateway 20180719" + OutFile "ircDDBGateway32-20180719.exe" ;Folder selection page InstallDir "$PROGRAMFILES\ircDDBGateway" diff --git a/ircDDBGateway64.nsi b/ircDDBGateway64.nsi index a94110e..fb1b779 100644 --- a/ircDDBGateway64.nsi +++ b/ircDDBGateway64.nsi @@ -11,8 +11,8 @@ ;Configuration ;General - Name "ircDDB Gateway 20180627" - OutFile "ircDDBGateway64-20180627.exe" + Name "ircDDB Gateway 20180719" + OutFile "ircDDBGateway64-20180719.exe" ;Folder selection page InstallDir "$PROGRAMFILES64\ircDDBGateway" From f0801902947801d260cb985b74097cfce0591a48 Mon Sep 17 00:00:00 2001 From: Christoph Kottke Date: Wed, 8 Aug 2018 15:00:06 +0200 Subject: [PATCH 024/166] start idTimer fix #3 --- Common/APRSWriter.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Common/APRSWriter.cpp b/Common/APRSWriter.cpp index 279f4ab..a40f594 100644 --- a/Common/APRSWriter.cpp +++ b/Common/APRSWriter.cpp @@ -155,7 +155,14 @@ void CAPRSWriter::setPort(const wxString& callsign, const wxString& band, double bool CAPRSWriter::open() { - return m_thread->start(); + bool ret = m_thread->start(); + if(ret) { + sendIdFrames(); + m_idTimer.start(); + return ret; + } + + return false; } void CAPRSWriter::writeHeader(const wxString& callsign, const CHeaderData& header) From 6b668396db1894aadc7efa9786cb75ed84135c32 Mon Sep 17 00:00:00 2001 From: Christoph Kottke Date: Tue, 31 Jul 2018 13:07:31 +0200 Subject: [PATCH 025/166] update logging * aktivate verbose mode verbose messages are logged as the normal ones instead of being silently dropped * wxLogXXX from threads only the GUI wxApp called wxLog::FlushActive() in idle time. wxAppConsole doesn't show LogMessages from Threads. --- ircDDBGateway/IRCDDBGatewayAppD.cpp | 1 + ircDDBGateway/IRCDDBGatewayThread.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/ircDDBGateway/IRCDDBGatewayAppD.cpp b/ircDDBGateway/IRCDDBGatewayAppD.cpp index d0672c9..0132c92 100644 --- a/ircDDBGateway/IRCDDBGatewayAppD.cpp +++ b/ircDDBGateway/IRCDDBGatewayAppD.cpp @@ -182,6 +182,7 @@ bool CIRCDDBGatewayAppD::init() wxLog* log = new CLogger(m_logDir, logBaseName); wxLog::SetActiveTarget(log); + wxLog::SetVerbose(); } else { new wxLogNull; } diff --git a/ircDDBGateway/IRCDDBGatewayThread.cpp b/ircDDBGateway/IRCDDBGatewayThread.cpp index 917fb98..268a04d 100644 --- a/ircDDBGateway/IRCDDBGatewayThread.cpp +++ b/ircDDBGateway/IRCDDBGatewayThread.cpp @@ -405,6 +405,7 @@ void CIRCDDBGatewayThread::run() } } + wxLog::FlushActive(); ::wxMilliSleep(TIME_PER_TIC_MS); } } From 094f0d286da840c1efb33a5a16d9c47b21aca840 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Sun, 2 Sep 2018 13:04:46 +0100 Subject: [PATCH 026/166] Fix GUI install. --- MakefileGUI | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MakefileGUI b/MakefileGUI index 50c3fc0..a47a5be 100644 --- a/MakefileGUI +++ b/MakefileGUI @@ -54,7 +54,7 @@ ircDDB/IRCDDB.a: install: all make -C Data install make -C APRSTransmit install - make -C ircDDBGateway install + make -C ircDDBGateway -f MakefileGUI install make -C RemoteControl install make -C StarNetServer install make -C TextTransmit install From 9669d865b5be3a8a0f0bcc92b1a3bc394be34d45 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Wed, 19 Sep 2018 15:05:20 +0100 Subject: [PATCH 027/166] First stage of CCS removal. --- CHANGES.txt | 5 + Common/AMBEData.cpp | 68 +--- Common/AMBEData.h | 4 +- Common/AudioUnit.cpp | 6 +- Common/CCSCallback.h | 44 --- Common/CCSData.cpp | 192 --------- Common/CCSData.h | 74 ---- Common/CCSHandler.cpp | 700 --------------------------------- Common/CCSHandler.h | 155 -------- Common/CCSProtocolHandler.cpp | 235 ----------- Common/CCSProtocolHandler.h | 81 ---- Common/Common.vcxproj | 7 - Common/Common.vcxproj.filters | 21 - Common/ConnectData.cpp | 69 +--- Common/ConnectData.h | 4 +- Common/DStarDefines.h | 8 +- Common/DTMF.cpp | 98 +---- Common/DTMF.h | 3 +- Common/Defs.h | 10 +- Common/HeaderData.cpp | 32 +- Common/HeaderData.h | 4 +- Common/HeardData.cpp | 41 +- Common/HeardData.h | 4 +- Common/IRCDDBGatewayConfig.cpp | 29 +- Common/IRCDDBGatewayConfig.h | 6 +- Common/Makefile | 2 +- Common/PollData.cpp | 35 +- Common/PollData.h | 4 +- Common/RemoteHandler.cpp | 3 +- Common/RepeaterHandler.cpp | 347 +--------------- Common/RepeaterHandler.h | 16 +- Data/CCS_Hosts.txt | 15 - Data/Makefile | 1 - ircDDBGateway32.nsi | 1 - ircDDBGateway64.nsi | 1 - 35 files changed, 39 insertions(+), 2286 deletions(-) delete mode 100644 Common/CCSCallback.h delete mode 100644 Common/CCSData.cpp delete mode 100644 Common/CCSData.h delete mode 100644 Common/CCSHandler.cpp delete mode 100644 Common/CCSHandler.h delete mode 100644 Common/CCSProtocolHandler.cpp delete mode 100644 Common/CCSProtocolHandler.h delete mode 100644 Data/CCS_Hosts.txt diff --git a/CHANGES.txt b/CHANGES.txt index 0661426..8afb29f 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1481,3 +1481,8 @@ Simplify the Linux build. -------- Support the GPS data from the Kenwood TH-D74. + +201809xx +-------- + +Remove the CCS support. diff --git a/Common/AMBEData.cpp b/Common/AMBEData.cpp index c30aacd..bc24b1c 100644 --- a/Common/AMBEData.cpp +++ b/Common/AMBEData.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2013 by Jonathan Naylor G4KLX + * Copyright (C) 2010-2013,2018 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 @@ -203,28 +203,6 @@ bool CAMBEData::setDCSData(const unsigned char *data, unsigned int length, const return true; } -bool CAMBEData::setCCSData(const unsigned char *data, unsigned int length, const in_addr& yourAddress, unsigned int yourPort, unsigned int myPort) -{ - wxASSERT(data != NULL); - wxASSERT(length >= 100U); - - m_header.setCCSData(data, length, yourAddress, yourPort, myPort); - - m_id = data[44] * 256U + data[43]; - - m_outSeq = data[45]; - - ::memcpy(m_data, data + 46U, DV_FRAME_LENGTH_BYTES); - - m_rptSeq = data[60] * 65536U + data[59] * 256U + data[58]; - - m_yourAddress = yourAddress; - m_yourPort = yourPort; - m_myPort = myPort; - - return true; -} - unsigned int CAMBEData::getIcomRepeaterData(unsigned char *data, unsigned int length) const { wxASSERT(data != NULL); @@ -430,50 +408,6 @@ unsigned int CAMBEData::getDCSData(unsigned char* data, unsigned int length) con return 100U; } -unsigned int CAMBEData::getCCSData(unsigned char* data, unsigned int length) const -{ - wxASSERT(data != NULL); - wxASSERT(length >= 100U); - - ::memset(data, 0x00U, 100U); - - data[0] = '0'; - data[1] = '0'; - data[2] = '0'; - data[3] = '1'; - - data[43] = m_id % 256U; // Unique session id - data[44] = m_id / 256U; - - data[45] = m_outSeq; - - ::memcpy(data + 46U, m_data, DV_FRAME_LENGTH_BYTES); - - if (isEnd()) { - data[55] = 0x55U; - data[56] = 0x55U; - data[57] = 0x55U; - } - - data[58] = (m_rptSeq >> 0) & 0xFFU; - data[59] = (m_rptSeq >> 8) & 0xFFU; - data[60] = (m_rptSeq >> 16) & 0xFFU; - - data[61] = 0x01U; - data[62] = 0x00U; - - data[63] = 0x21U; - - for (unsigned int i = 0U; i < m_text.Len(); i++) - data[64 + i] = m_text.GetChar(i); - - data[93U] = 0x36U; - - m_header.getCCSData(data, 100U); - - return 100U; -} - unsigned int CAMBEData::getId() const { return m_id; diff --git a/Common/AMBEData.h b/Common/AMBEData.h index 773df7c..62fb8ff 100644 --- a/Common/AMBEData.h +++ b/Common/AMBEData.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2013 by Jonathan Naylor G4KLX + * Copyright (C) 2010-2013,2018 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 @@ -41,14 +41,12 @@ public: bool setDExtraData(const unsigned char* data, unsigned int length, const in_addr& yourAddress, unsigned int yourPort, unsigned int myPort); bool setDPlusData(const unsigned char* data, unsigned int length, const in_addr& yourAddress, unsigned int yourPort, unsigned int myPort); bool setDCSData(const unsigned char* data, unsigned int length, const in_addr& yourAddress, unsigned int yourPort, unsigned int myPort); - bool setCCSData(const unsigned char* data, unsigned int length, const in_addr& yourAddress, unsigned int yourPort, unsigned int myPort); unsigned int getIcomRepeaterData(unsigned char* data, unsigned int length) const; unsigned int getHBRepeaterData(unsigned char* data, unsigned int length) const; unsigned int getDExtraData(unsigned char* data, unsigned int length) const; unsigned int getDPlusData(unsigned char* data, unsigned int length) const; unsigned int getDCSData(unsigned char* data, unsigned int length) const; - unsigned int getCCSData(unsigned char* data, unsigned int length) const; unsigned int getG2Data(unsigned char* data, unsigned int length) const; unsigned int getId() const; diff --git a/Common/AudioUnit.cpp b/Common/AudioUnit.cpp index da9774b..36698ad 100644 --- a/Common/AudioUnit.cpp +++ b/Common/AudioUnit.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011-2014 by Jonathan Naylor G4KLX + * Copyright (C) 2011-2014,2018 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 @@ -295,8 +295,7 @@ void CAudioUnit::spellReflector(unsigned int id, const wxString &reflector) if (c == wxT(' ')) return; - if (m_linkStatus == LS_LINKING_DCS || m_linkStatus == LS_LINKED_DCS || - m_linkStatus == LS_LINKING_CCS || m_linkStatus == LS_LINKED_CCS) { + if (m_linkStatus == LS_LINKING_DCS || m_linkStatus == LS_LINKED_DCS) { lookup(id, wxString(c)); return; } @@ -467,7 +466,6 @@ void CAudioUnit::sendStatus(LINK_STATUS status, const wxString& reflector, const case LS_NONE: lookup(id, wxT("notlinked")); break; - case LS_LINKED_CCS: case LS_LINKED_DCS: case LS_LINKED_DPLUS: case LS_LINKED_DEXTRA: diff --git a/Common/CCSCallback.h b/Common/CCSCallback.h deleted file mode 100644 index 4fc8864..0000000 --- a/Common/CCSCallback.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (C) 2013 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 - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef CCSCallback_H -#define CCSCallback_H - -#include "DStarDefines.h" -#include "HeaderData.h" -#include "AMBEData.h" -#include "Defs.h" - -#include - -class ICCSCallback { -public: - virtual bool process(CHeaderData& header, DIRECTION direction, AUDIO_SOURCE source) = 0; - - virtual bool process(CAMBEData& data, DIRECTION direction, AUDIO_SOURCE source) = 0; - - virtual void ccsLinkMade(const wxString& callsign, DIRECTION direction) = 0; - - virtual void ccsLinkFailed(const wxString& dtmf, DIRECTION direction) = 0; - - virtual void ccsLinkEnded(const wxString& callsign, DIRECTION direction) = 0; - -private: -}; - -#endif diff --git a/Common/CCSData.cpp b/Common/CCSData.cpp deleted file mode 100644 index a589f62..0000000 --- a/Common/CCSData.cpp +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Copyright (C) 2013 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 - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include "DStarDefines.h" -#include "CCSData.h" -#include "Utils.h" - -CCCSData::CCCSData(const wxString& local, double latitude, double longitude, double frequency, double offset, const wxString& description1, const wxString& description2, const wxString& url, CC_TYPE type) : -m_local(local), -m_remote(), -m_latitude(latitude), -m_longitude(longitude), -m_frequency(frequency), -m_offset(offset), -m_description1(description1), -m_description2(description2), -m_url(url), -m_type(type), -m_yourAddress(), -m_yourPort(0U), -m_myPort(0U) -{ -} - -CCCSData::CCCSData(const wxString& local, const wxString& remote, CC_TYPE type) : -m_local(local), -m_remote(remote), -m_latitude(0.0), -m_longitude(0.0), -m_frequency(0.0), -m_offset(0.0), -m_description1(), -m_description2(), -m_url(), -m_type(type), -m_yourAddress(), -m_yourPort(0U), -m_myPort(0U) -{ -} - -CCCSData::CCCSData() : -m_local(), -m_remote(), -m_latitude(0.0), -m_longitude(0.0), -m_frequency(0.0), -m_offset(0.0), -m_description1(), -m_description2(), -m_url(), -m_type(), -m_yourAddress(), -m_yourPort(0U), -m_myPort(0U) -{ -} - -CCCSData::~CCCSData() -{ -} - -bool CCCSData::setCCSData(const unsigned char *data, unsigned int length, const in_addr& yourAddress, unsigned int yourPort, unsigned int myPort) -{ - wxASSERT(data != NULL); - - switch (length) { - case 100U: - m_remote = wxString((char*)(data + 0U), wxConvLocal, LONG_CALLSIGN_LENGTH); - - if (::memcmp(data + 8U, "0001", 4U) == 0) { - m_type = CT_TERMINATE; - } else { - // CUtils::dump(wxT("Invalid CCS packet"), data, length); - return false; - } - - m_local = wxString((char*)(data + 12U), wxConvLocal, LONG_CALLSIGN_LENGTH); - break; - - case 20U: - if (::memcmp(data + 0U, "DTMF_CALL:", 10U) == 0) { - m_type = CT_DTMFFOUND; - } else { - CUtils::dump(wxT("Invalid CCS packet"), data, length); - return false; - } - - m_remote = wxString((char*)(data + 10U), wxConvLocal, LONG_CALLSIGN_LENGTH); - break; - - case 17U: - if (::memcmp(data + 0U, "NODTMFCALL", 10U) == 0) { - m_type = CT_DTMFNOTFOUND; - } else { - CUtils::dump(wxT("Invalid CCS packet"), data, length); - return false; - } - break; - - default: - CUtils::dump(wxT("Invalid CCS packet"), data, length); - return false; - } - - m_yourAddress = yourAddress; - m_yourPort = yourPort; - m_myPort = myPort; - - return true; -} - -unsigned int CCCSData::getCCSData(unsigned char* data, unsigned int length) const -{ - wxASSERT(data != NULL); - wxASSERT(length >= 133U); - - if (m_type == CT_TERMINATE) { - ::memset(data, ' ', 38U); - - for (unsigned int i = 0U; i < m_remote.Len() && i < LONG_CALLSIGN_LENGTH; i++) - data[i + 0U] = m_remote.GetChar(i); - - ::memcpy(data + 8U, "0001", 4U); - - for (unsigned int i = 0U; i < m_local.Len() && i < LONG_CALLSIGN_LENGTH; i++) - data[i + 12U] = m_local.GetChar(i); - - return 38U; - } else if (m_type == CT_INFO) { - wxString buffer; - buffer.Printf(wxT("IRPT%.7s %s%-10.4lf%-10.4lf%-10.4lf%-10.4lf%-20s%-20s%-40s"), m_local.Mid(0U, LONG_CALLSIGN_LENGTH - 1U).c_str(), m_local.Mid(LONG_CALLSIGN_LENGTH - 1U, 1U).c_str(), m_latitude, m_longitude, m_frequency, m_offset, m_description1.c_str(), m_description2.c_str(), m_url.c_str()); - - for (unsigned int i = 0U; i < buffer.Len() && i < 133U; i++) - data[i] = buffer.GetChar(i); - - return 133U; - } - - return 0U; -} - -wxString CCCSData::getLocal() const -{ - return m_local; -} - -wxString CCCSData::getRemote() const -{ - return m_remote; -} - -CC_TYPE CCCSData::getType() const -{ - return m_type; -} - -void CCCSData::setDestination(const in_addr& address, unsigned int port) -{ - m_yourAddress = address; - m_yourPort = port; -} - -in_addr CCCSData::getYourAddress() const -{ - return m_yourAddress; -} - -unsigned int CCCSData::getYourPort() const -{ - return m_yourPort; -} - -unsigned int CCCSData::getMyPort() const -{ - return m_myPort; -} diff --git a/Common/CCSData.h b/Common/CCSData.h deleted file mode 100644 index 1488dcd..0000000 --- a/Common/CCSData.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (C) 2013 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 - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef CCSData_H -#define CCSData_H - -#include - -#if defined(__WINDOWS__) -#include "Inaddr.h" -#else -#include -#endif - -enum CC_TYPE { - CT_TERMINATE, - CT_DTMFNOTFOUND, - CT_DTMFFOUND, - CT_INFO -}; - -class CCCSData { -public: - CCCSData(const wxString& local, double latitude, double longitude, double frequency, double offset, const wxString& description1, const wxString& description2, const wxString& url, CC_TYPE type); - CCCSData(const wxString& local, const wxString& remote, CC_TYPE type); - CCCSData(); - ~CCCSData(); - - bool setCCSData(const unsigned char* data, unsigned int length, const in_addr& yourAddress, unsigned int yourPort, unsigned int myPort); - - unsigned int getCCSData(unsigned char* data, unsigned int length) const; - - void setDestination(const in_addr& address, unsigned int port); - - wxString getLocal() const; - wxString getRemote() const; - CC_TYPE getType() const; - - in_addr getYourAddress() const; - unsigned int getYourPort() const; - unsigned int getMyPort() const; - -private: - wxString m_local; - wxString m_remote; - double m_latitude; - double m_longitude; - double m_frequency; - double m_offset; - wxString m_description1; - wxString m_description2; - wxString m_url; - CC_TYPE m_type; - in_addr m_yourAddress; - unsigned int m_yourPort; - unsigned int m_myPort; -}; - -#endif diff --git a/Common/CCSHandler.cpp b/Common/CCSHandler.cpp deleted file mode 100644 index 470d648..0000000 --- a/Common/CCSHandler.cpp +++ /dev/null @@ -1,700 +0,0 @@ -/* - * Copyright (C) 2013,2014 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 - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include "RepeaterHandler.h" -#include "DStarDefines.h" -#include "CCSHandler.h" -#include "Utils.h" - - -CCCSHandler** CCCSHandler::m_handlers = NULL; - -unsigned int CCCSHandler::m_count = 0U; - -wxString CCCSHandler::m_localAddress; -CHeaderLogger* CCCSHandler::m_headerLogger = NULL; - -wxString CCCSHandler::m_ccsHost; - -CCCSCache_t CCCSHandler::m_cache; -wxMutex CCCSHandler::m_mutex; - -bool CCCSHandler::m_stateChange = false; - - -void CCCSHandler::initialise(unsigned int count) -{ - wxASSERT(count > 0U); - - m_count = count; - m_handlers = new CCCSHandler*[m_count]; - - for (unsigned int i = 0U; i < m_count; i++) - m_handlers[i] = NULL; -} - -void CCCSHandler::setLocalAddress(const wxString& address) -{ - m_localAddress = address; -} - -void CCCSHandler::setHeaderLogger(CHeaderLogger* logger) -{ - m_headerLogger = logger; -} - -void CCCSHandler::setHost(const wxString& host) -{ - m_ccsHost = host; -} - -void CCCSHandler::process() -{ - for (unsigned int i = 0U; i < m_count; i++) { - if (m_handlers[i] != NULL) - m_handlers[i]->processInt(); - } -} - -void CCCSHandler::disconnect() -{ - for (unsigned int i = 0U; i < m_count; i++) { - if (m_handlers[i] != NULL) - m_handlers[i]->disconnectInt(); - } -} - -void CCCSHandler::clock(unsigned int ms) -{ - for (unsigned int i = 0U; i < m_count; i++) { - if (m_handlers[i] != NULL) - m_handlers[i]->clockInt(ms); - } -} - -void CCCSHandler::getInfo(ICCSCallback* handler, CRemoteRepeaterData& data) -{ - wxASSERT(handler != NULL); - - for (unsigned int i = 0U; i < m_count; i++) { - CCCSHandler* ccs = m_handlers[i]; - if (ccs != NULL && ccs->m_handler == handler && ccs->m_state == CS_ACTIVE) - data.addLink(ccs->m_yourCall, PROTO_CCS, true, ccs->m_direction, false); - } -} - -wxString CCCSHandler::getIncoming(const wxString& callsign) -{ - wxString incoming; - - for (unsigned int i = 0U; i < m_count; i++) { - CCCSHandler* handler = m_handlers[i]; - if (handler != NULL && handler->m_direction == DIR_INCOMING && handler->m_state == CS_ACTIVE && handler->m_callsign.IsSameAs(callsign)) { - incoming.Append(handler->m_yourCall); - incoming.Append(wxT(" ")); - } - } - - return incoming; -} - -void CCCSHandler::finalise() -{ - for (unsigned int i = 0U; i < m_count; i++) - delete m_handlers[i]; - - delete[] m_handlers; -} - -CCCSHandler::CCCSHandler(ICCSCallback* handler, const wxString& callsign, unsigned int delay, double latitude, double longitude, double frequency, double offset, const wxString& description1, const wxString& description2, const wxString& url, unsigned int localPort) : -m_handler(handler), -m_callsign(callsign), -m_reflector(), -m_latitude(latitude), -m_longitude(longitude), -m_frequency(frequency), -m_offset(offset), -m_description1(description1), -m_description2(description2), -m_url(url), -m_ccsAddress(), -m_protocol(localPort, m_localAddress), -m_state(CS_DISABLED), -m_local(), -m_announceTimer(1000U, 20U), // 20 seconds -m_inactivityTimer(1000U, 300U), // 5 minutes -m_pollInactivityTimer(1000U, 60U), // 60 seconds -m_pollTimer(1000U, 10U), // 10 seconds -m_waitTimer(1000U, delay), -m_tryTimer(1000U, 1U), // 1 second -m_tryCount(0U), -m_id(0x00U), -m_seqNo(0U), -m_time(), -m_direction(DIR_OUTGOING), -m_yourCall(), -m_myCall1(), -m_myCall2(), -m_rptCall1() -{ - wxASSERT(handler != NULL); - - // Add to the global list - for (unsigned int i = 0U; i < m_count; i++) { - if (m_handlers[i] == NULL) { - m_handlers[i] = this; - break; - } - } -} - -CCCSHandler::~CCCSHandler() -{ -} - -void CCCSHandler::setReflector(const wxString& callsign) -{ - m_reflector = callsign; - - if (m_reflector.IsEmpty()) - m_reflector = wxT(" "); -} - -void CCCSHandler::processInt() -{ - if (m_state == CS_DISABLED) - return; - - for (;;) { - CCS_TYPE type = m_protocol.read(); - - switch (type) { - case CT_DATA: { - CAMBEData* data = m_protocol.readData(); - if (data != NULL) { - process(*data); - delete data; - } - } - break; - - case CT_POLL: { - CPollData* poll = m_protocol.readPoll(); - if (poll != NULL) { - process(*poll); - delete poll; - } - } - break; - - case CT_CONNECT: { - CConnectData* connect = m_protocol.readConnect(); - if (connect != NULL) { - process(*connect); - delete connect; - } - } - break; - - case CT_MISC: { - CCCSData* data = m_protocol.readMisc(); - if (data != NULL) { - process(*data); - delete data; - } - } - break; - - default: - return; - } - } -} - -void CCCSHandler::process(CAMBEData& data) -{ - CHeaderData& header = data.getHeader(); - wxString myCall1 = header.getMyCall1(); - wxString rptCall1 = header.getRptCall1(); - wxString yourCall = header.getYourCall(); - unsigned int seqNo = data.getSeq(); - unsigned int id = data.getId(); - - if (m_state != CS_CONNECTED && m_state != CS_ACTIVE) - return; - - // This is a new incoming CCS call - if (m_state == CS_CONNECTED) { - m_yourCall = myCall1; - m_local = yourCall; - m_rptCall1 = rptCall1; - m_direction = DIR_INCOMING; - m_time = ::time(NULL); - m_state = CS_ACTIVE; - m_stateChange = true; - m_inactivityTimer.start(); - - m_handler->ccsLinkMade(m_yourCall, m_direction); - - wxLogMessage(wxT("CCS: New incoming link to %s from %s @ %s"), m_local.c_str(), m_yourCall.c_str(), m_rptCall1.c_str()); - } else { - if (!m_yourCall.IsSameAs(myCall1) && !m_rptCall1.IsSameAs(rptCall1)) { - wxLogMessage(wxT("CCS: Rejecting new incoming CCS link from %s @ %s to %s"), myCall1.c_str(), rptCall1.c_str(), yourCall.c_str()); - - CCCSData data(yourCall, myCall1, CT_TERMINATE); - data.setDestination(m_ccsAddress, CCS_PORT); - - m_protocol.writeMisc(data); - m_protocol.writeMisc(data); - m_protocol.writeMisc(data); - m_protocol.writeMisc(data); - m_protocol.writeMisc(data); - - return; - } - - // Allow for the fact that the distant repeater may change during the QSO - if (m_yourCall.IsSameAs(myCall1) && !m_rptCall1.IsSameAs(rptCall1)) { - wxLogMessage(wxT("CCS: %s has moved from repeater %s to %s"), m_yourCall.c_str(), m_rptCall1.c_str(), rptCall1.c_str()); - m_rptCall1 = rptCall1; - } - } - - m_pollInactivityTimer.start(); - m_inactivityTimer.start(); - - if (m_id != id) { - // Write to Header.log if it's enabled - if (m_headerLogger != NULL) - m_headerLogger->write(wxT("CCS"), header); - - header.setCQCQCQ(); - m_handler->process(header, DIR_INCOMING, AS_CCS); - - m_id = id; - } else if (seqNo == 0U) { - header.setCQCQCQ(); - m_handler->process(header, DIR_INCOMING, AS_DUP); - } - - m_handler->process(data, DIR_INCOMING, AS_CCS); -} - -void CCCSHandler::process(CCCSData& data) -{ - CC_TYPE type = data.getType(); - - switch (type) { - case CT_TERMINATE: - if (m_state == CS_ACTIVE) { - wxLogMessage(wxT("CCS: Link between %s and %s has been terminated"), data.getLocal().c_str(), data.getRemote().c_str()); - m_stateChange = true; - m_state = CS_CONNECTED; - m_inactivityTimer.stop(); - m_handler->ccsLinkEnded(data.getRemote(), m_direction); - } - break; - - case CT_DTMFNOTFOUND: - wxLogMessage(wxT("CCS: Cannot map %s to a callsign"), m_yourCall.c_str()); - m_stateChange = true; - m_state = CS_CONNECTED; - m_inactivityTimer.stop(); - m_handler->ccsLinkFailed(m_yourCall, m_direction); - break; - - case CT_DTMFFOUND: - wxLogMessage(wxT("CCS: Mapped %s to %s, added to the cache"), m_yourCall.c_str(), data.getRemote().c_str()); - addToCache(m_yourCall, data.getRemote()); - m_stateChange = true; - m_yourCall = data.getRemote(); - m_rptCall1 = data.getRemote(); - m_handler->ccsLinkMade(m_yourCall, m_direction); - break; - - default: - break; - } -} - -void CCCSHandler::process(CPollData&) -{ - m_pollInactivityTimer.start(); -} - -void CCCSHandler::process(CConnectData& connect) -{ - CD_TYPE type = connect.getType(); - - if (type == CT_ACK && m_state == CS_CONNECTING) { - wxLogMessage(wxT("CCS: %s connected to server %s"), m_callsign.c_str(), m_ccsHost.c_str()); - - m_announceTimer.start(); - m_pollInactivityTimer.start(); - m_pollTimer.start(); - m_tryTimer.stop(); - - // Give our location, frequency, etc - CCCSData data(m_callsign, m_latitude, m_longitude, m_frequency, m_offset, m_description1, m_description2, m_url, CT_INFO); - data.setDestination(m_ccsAddress, CCS_PORT); - m_protocol.writeMisc(data); - - m_state = CS_CONNECTED; - - return; - } - - if (type == CT_NAK && m_state == CS_CONNECTING) { - wxLogMessage(wxT("CCS: Connection refused for %s"), m_callsign.c_str()); - m_tryTimer.stop(); - m_state = CS_DISABLED; - return; - } -} - -bool CCCSHandler::connect() -{ - // Is CCS disabled? - if (m_localAddress.IsSameAs(wxT("127.0.0.1"))) - return false; - - // Can we resolve the CCS server address? - m_ccsAddress = CUDPReaderWriter::lookup(m_ccsHost); - if (m_ccsAddress.s_addr == INADDR_NONE) { - wxLogError(wxT("CCS: Unable to find the IP address for %s"), m_ccsHost.c_str()); - return false; - } - - bool res = m_protocol.open(); - if (!res) - return false; - - wxLogMessage(wxT("CCS: Opening UDP port %u for %s"), m_protocol.getPort(), m_callsign.c_str()); - - m_waitTimer.start(); - - m_state = CS_CONNECTING; - - return true; -} - -void CCCSHandler::disconnectInt() -{ - if (m_state == CS_CONNECTED || m_state == CS_ACTIVE) { - CConnectData connect(m_callsign, CT_UNLINK, m_ccsAddress, CCS_PORT); - m_protocol.writeConnect(connect); - } - - m_announceTimer.stop(); - m_pollInactivityTimer.stop(); - m_inactivityTimer.stop(); - m_pollTimer.stop(); - m_tryTimer.stop(); - - if (m_state != CS_DISABLED) - m_protocol.close(); - - m_state = CS_DISABLED; -} - -void CCCSHandler::startLink(const wxString& dtmf, const wxString& user, const wxString& type) -{ - if (m_state != CS_CONNECTED) - return; - - wxString callsign = findInCache(dtmf); - if (!callsign.IsEmpty()) { - wxLogMessage(wxT("CCS: New outgoing link to %s/%s via %s by %s"), dtmf.c_str(), callsign.c_str(), type.c_str(), user.c_str()); - m_handler->ccsLinkMade(callsign, m_direction); - m_yourCall = callsign; - m_rptCall1 = callsign; - } else { - wxLogMessage(wxT("CCS: New outgoing link to %s via %s by %s"), dtmf.c_str(), type.c_str(), user.c_str()); - m_yourCall = dtmf; - m_yourCall.resize(LONG_CALLSIGN_LENGTH, wxT(' ')); - m_rptCall1.Clear(); - } - - m_local = user; - m_seqNo = 0U; - - m_time = ::time(NULL); - m_stateChange = true; - m_state = CS_ACTIVE; - m_direction = DIR_OUTGOING; - m_inactivityTimer.start(); -} - -void CCCSHandler::stopLink(const wxString& user, const wxString& type) -{ - if (m_state != CS_ACTIVE) - return; - - if (!user.IsEmpty() && !type.IsEmpty()) - wxLogMessage(wxT("CCS: Link to %s from %s has been terminated via %s by %s"), m_yourCall.c_str(), m_local.c_str(), type.c_str(), user.c_str()); - - CCCSData data(m_local, m_yourCall, CT_TERMINATE); - data.setDestination(m_ccsAddress, CCS_PORT); - - m_protocol.writeMisc(data); - m_protocol.writeMisc(data); - m_protocol.writeMisc(data); - m_protocol.writeMisc(data); - m_protocol.writeMisc(data); - - m_stateChange = true; - m_state = CS_CONNECTED; - m_inactivityTimer.stop(); - - m_handler->ccsLinkEnded(m_yourCall, m_direction); -} - -void CCCSHandler::unlink(const wxString& callsign) -{ - if (m_state != CS_ACTIVE) - return; - - if (!m_yourCall.IsSameAs(callsign)) - return; - - wxLogMessage(wxT("CCS: Link to %s from %s has been terminated by command"), m_yourCall.c_str(), m_local.c_str()); - - CCCSData data(m_local, m_yourCall, CT_TERMINATE); - data.setDestination(m_ccsAddress, CCS_PORT); - - m_protocol.writeMisc(data); - m_protocol.writeMisc(data); - m_protocol.writeMisc(data); - m_protocol.writeMisc(data); - m_protocol.writeMisc(data); - - m_stateChange = true; - m_state = CS_CONNECTED; - m_inactivityTimer.stop(); - - m_handler->ccsLinkEnded(m_yourCall, m_direction); -} - -void CCCSHandler::writeHeard(CHeaderData& header) -{ - if (m_state != CS_CONNECTED && m_state != CS_ACTIVE) - return; - - CHeardData heard(header, m_callsign, m_reflector); - heard.setDestination(m_ccsAddress, CCS_PORT); - m_protocol.writeHeard(heard); -} - -void CCCSHandler::writeHeader(CHeaderData& header) -{ - m_myCall1 = header.getMyCall1(); - m_myCall2 = header.getMyCall2(); - - m_seqNo = 0U; -} - -void CCCSHandler::writeAMBE(CAMBEData& data) -{ - if (m_state != CS_ACTIVE) - return; - - CAMBEData temp(data); - - CHeaderData& header = temp.getHeader(); - header.setMyCall1(m_myCall1); - header.setMyCall2(m_myCall2); - header.setYourCall(m_yourCall); - header.setRptCall1(m_callsign); - header.setRptCall2(m_reflector); - - temp.setRptSeq(m_seqNo++); - temp.setDestination(m_ccsAddress, CCS_PORT); - m_protocol.writeData(temp); -} - -CCS_STATUS CCCSHandler::getStatus() const -{ - return m_state; -} - -void CCCSHandler::clockInt(unsigned int ms) -{ - m_announceTimer.clock(ms); - m_pollInactivityTimer.clock(ms); - m_inactivityTimer.clock(ms); - m_pollTimer.clock(ms); - m_waitTimer.clock(ms); - m_tryTimer.clock(ms); - - if (m_pollInactivityTimer.isRunning() && m_pollInactivityTimer.hasExpired()) { - wxLogMessage(wxT("CCS: Connection has failed (poll inactivity) for %s, reconnecting"), m_callsign.c_str()); - - m_announceTimer.stop(); - m_pollInactivityTimer.stop(); - m_inactivityTimer.stop(); - m_pollTimer.stop(); - - if (m_state == CS_ACTIVE) { - m_stateChange = true; - m_handler->ccsLinkEnded(m_yourCall, m_direction); - } - - m_waitTimer.start(); - - m_state = CS_CONNECTING; - - return; - } - - if (m_tryTimer.isRunning() && m_tryTimer.hasExpired()) { - CConnectData connect(m_callsign, CT_LINK1, m_ccsAddress, CCS_PORT); - if (m_latitude != 0.0 && m_longitude != 0.0) { - wxString locator = CUtils::latLonToLoc(m_latitude, m_longitude); - connect.setLocator(locator); - } - m_protocol.writeConnect(connect); - - unsigned int t = calcBackoff(); - m_tryTimer.start(t); - } - - if (m_pollTimer.isRunning() && m_pollTimer.hasExpired()) { - CPollData poll(m_callsign, m_ccsAddress, CCS_PORT); - m_protocol.writePoll(poll); - - m_pollTimer.start(); - } - - if (m_inactivityTimer.isRunning() && m_inactivityTimer.hasExpired()) { - wxLogMessage(wxT("CCS: Activity timeout on link for %s"), m_callsign.c_str(), m_callsign.c_str()); - - CCCSData data(m_local, m_yourCall, CT_TERMINATE); - data.setDestination(m_ccsAddress, CCS_PORT); - - m_protocol.writeMisc(data); - m_protocol.writeMisc(data); - m_protocol.writeMisc(data); - m_protocol.writeMisc(data); - m_protocol.writeMisc(data); - - m_stateChange = true; - m_state = CS_CONNECTED; - m_inactivityTimer.stop(); - - m_handler->ccsLinkEnded(m_yourCall, m_direction); - } - - if (m_waitTimer.isRunning() && m_waitTimer.hasExpired()) { - CConnectData connect(m_callsign, CT_LINK1, m_ccsAddress, CCS_PORT); - if (m_latitude != 0.0 && m_longitude != 0.0) { - wxString locator = CUtils::latLonToLoc(m_latitude, m_longitude); - connect.setLocator(locator); - } - m_protocol.writeConnect(connect); - - m_tryTimer.start(1U); - m_tryCount = 1U; - - m_waitTimer.stop(); - } - - if (m_announceTimer.isRunning() && m_announceTimer.hasExpired()) { - CHeaderData header; - header.setMyCall1(m_callsign.Left(LONG_CALLSIGN_LENGTH - 1U)); - CHeardData heard(header, m_callsign, wxEmptyString); - heard.setDestination(m_ccsAddress, CCS_PORT); - m_protocol.writeHeard(heard); - - m_announceTimer.start(3600U); - } -} - -unsigned int CCCSHandler::calcBackoff() -{ - if (m_tryCount >= 7U) { - m_tryCount++; - return 60U; - } - - unsigned int timeout = 1U; - - for (unsigned int i = 0U; i < m_tryCount; i++) - timeout *= 2U; - - m_tryCount++; - - if (timeout > 60U) - return 60U; - else - return timeout; -} - -bool CCCSHandler::stateChange() -{ - bool stateChange = m_stateChange; - - m_stateChange = false; - - return stateChange; -} - -void CCCSHandler::writeStatus(wxFFile& file) -{ - for (unsigned int i = 0U; i < m_count; i++) { - CCCSHandler* handler = m_handlers[i]; - if (handler != NULL) { - struct tm* tm = ::gmtime(&handler->m_time); - - switch (handler->m_direction) { - case DIR_OUTGOING: - if (handler->m_state == CS_ACTIVE) { - wxString text; - text.Printf(wxT("%04d-%02d-%02d %02d:%02d:%02d: CCS link - Rptr: %s Remote: %s Dir: Outgoing\n"), - tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec, - handler->m_callsign.c_str(), handler->m_yourCall.c_str()); - file.Write(text); - } - break; - - case DIR_INCOMING: - if (handler->m_state == CS_ACTIVE) { - wxString text; - text.Printf(wxT("%04d-%02d-%02d %02d:%02d:%02d: CCS link - Rptr: %s Remote: %s Dir: Incoming\n"), - tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec, - handler->m_callsign.c_str(), handler->m_yourCall.c_str()); - file.Write(text); - } - break; - } - } - } -} - -void CCCSHandler::addToCache(const wxString& dtmf, const wxString& callsign) -{ - wxMutexLocker locker(m_mutex); - - m_cache[dtmf] = callsign; -} - -wxString CCCSHandler::findInCache(const wxString& dtmf) -{ - wxMutexLocker locker(m_mutex); - - return m_cache[dtmf]; -} diff --git a/Common/CCSHandler.h b/Common/CCSHandler.h deleted file mode 100644 index 81f5a1a..0000000 --- a/Common/CCSHandler.h +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Copyright (C) 2013 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 - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef CCSHandler_H -#define CCSHandler_H - -#include "CCSProtocolHandler.h" -#include "DStarDefines.h" -#include "HeaderLogger.h" -#include "ConnectData.h" -#include "CCSCallback.h" -#include "AMBEData.h" -#include "PollData.h" -#include "Timer.h" -#include "Defs.h" - -#if defined(__WINDOWS__) -#include "Inaddr.h" -#else -#include -#endif - -#include -#include - -enum CCS_STATUS { - CS_DISABLED, - CS_CONNECTING, - CS_CONNECTED, - CS_ACTIVE -}; - -WX_DECLARE_STRING_HASH_MAP(wxString, CCCSCache_t); - -class CCCSHandler { -public: - CCCSHandler(ICCSCallback* handler, const wxString& callsign, unsigned int delay, double latitude, double longitude, double frequency, double offset, const wxString& description1, const wxString& description2, const wxString& url, unsigned int localPort); - ~CCCSHandler(); - - bool connect(); - - void writeHeard(CHeaderData& header); - void writeHeader(CHeaderData& header); - void writeAMBE(CAMBEData& data); - - void startLink(const wxString& dtmf, const wxString& user, const wxString& type); - void stopLink(const wxString& user = wxEmptyString, const wxString& type = wxEmptyString); - - void unlink(const wxString& callsign); - - void setReflector(const wxString& callsign = wxEmptyString); - - CCS_STATUS getStatus() const; - - static void disconnect(); - - static void initialise(unsigned int count); - - static void process(); - - static void clock(unsigned int ms); - - static void setHeaderLogger(CHeaderLogger* logger); - - static void setLocalAddress(const wxString& address); - - static void setHost(const wxString& host); - - static bool stateChange(); - static void writeStatus(wxFFile& file); - - static void getInfo(ICCSCallback* handler, CRemoteRepeaterData& data); - - static wxString getIncoming(const wxString& callsign); - - static void finalise(); - -protected: - void clockInt(unsigned int ms); - - void processInt(); - - void disconnectInt(); - -private: - static CCCSHandler** m_handlers; - static unsigned int m_count; - - static wxString m_localAddress; - static CHeaderLogger* m_headerLogger; - - static wxString m_ccsHost; - - static CCCSCache_t m_cache; - static wxMutex m_mutex; - - static bool m_stateChange; - - ICCSCallback* m_handler; - wxString m_callsign; - wxString m_reflector; - double m_latitude; - double m_longitude; - double m_frequency; - double m_offset; - wxString m_description1; - wxString m_description2; - wxString m_url; - in_addr m_ccsAddress; - CCCSProtocolHandler m_protocol; - CCS_STATUS m_state; - wxString m_local; - CTimer m_announceTimer; - CTimer m_inactivityTimer; - CTimer m_pollInactivityTimer; - CTimer m_pollTimer; - CTimer m_waitTimer; - CTimer m_tryTimer; - unsigned int m_tryCount; - unsigned int m_id; - unsigned int m_seqNo; - time_t m_time; - DIRECTION m_direction; - wxString m_yourCall; - wxString m_myCall1; - wxString m_myCall2; - wxString m_rptCall1; - - void process(CAMBEData& header); - void process(CPollData& data); - void process(CConnectData& connect); - void process(CCCSData& data); - - unsigned int calcBackoff(); - - static void addToCache(const wxString& dtmf, const wxString& callsign); - static wxString findInCache(const wxString& dtmf); -}; - -#endif diff --git a/Common/CCSProtocolHandler.cpp b/Common/CCSProtocolHandler.cpp deleted file mode 100644 index 9c22456..0000000 --- a/Common/CCSProtocolHandler.cpp +++ /dev/null @@ -1,235 +0,0 @@ -/* - * Copyright (C) 2013 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 - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include "CCSProtocolHandler.h" - -#include "DStarDefines.h" -#include "Utils.h" - -// #define DUMP_TX - -const unsigned int BUFFER_LENGTH = 2000U; - -CCCSProtocolHandler::CCCSProtocolHandler(unsigned int port, const wxString& addr) : -m_socket(addr, port), -m_type(CT_NONE), -m_buffer(NULL), -m_length(0U), -m_yourAddress(), -m_yourPort(0U), -m_myPort(port) -{ - m_buffer = new unsigned char[BUFFER_LENGTH]; -} - -CCCSProtocolHandler::~CCCSProtocolHandler() -{ - delete[] m_buffer; -} - -bool CCCSProtocolHandler::open() -{ - return m_socket.open(); -} - -unsigned int CCCSProtocolHandler::getPort() const -{ - return m_myPort; -} - -bool CCCSProtocolHandler::writeData(const CAMBEData& data) -{ - unsigned char buffer[100U]; - unsigned int length = data.getCCSData(buffer, 100U); - -#if defined(DUMP_TX) - CUtils::dump(wxT("Sending Data"), buffer, length); -#endif - - return m_socket.write(buffer, length, data.getYourAddress(), data.getYourPort()); -} - -bool CCCSProtocolHandler::writePoll(const CPollData& poll) -{ - unsigned char buffer[30U]; - unsigned int length = poll.getCCSData(buffer, 30U); - -#if defined(DUMP_TX) - CUtils::dump(wxT("Sending Poll"), buffer, length); -#endif - - return m_socket.write(buffer, length, poll.getYourAddress(), poll.getYourPort()); -} - -bool CCCSProtocolHandler::writeHeard(const CHeardData& heard) -{ - unsigned char buffer[100U]; - unsigned int length = heard.getCCSData(buffer, 100U); - -#if defined(DUMP_TX) - CUtils::dump(wxT("Sending Heard"), buffer, length); -#endif - - return m_socket.write(buffer, length, heard.getAddress(), heard.getPort()); -} - -bool CCCSProtocolHandler::writeConnect(const CConnectData& connect) -{ - unsigned char buffer[40U]; - unsigned int length = connect.getCCSData(buffer, 40U); - -#if defined(DUMP_TX) - CUtils::dump(wxT("Sending Connect"), buffer, length); -#endif - - return m_socket.write(buffer, length, connect.getYourAddress(), connect.getYourPort()); -} - -bool CCCSProtocolHandler::writeMisc(const CCCSData& data) -{ - unsigned char buffer[140U]; - unsigned int length = data.getCCSData(buffer, 140U); - -#if defined(DUMP_TX) - CUtils::dump(wxT("Sending Misc"), buffer, length); -#endif - - return m_socket.write(buffer, length, data.getYourAddress(), data.getYourPort()); -} - -CCS_TYPE CCCSProtocolHandler::read() -{ - bool res = true; - - // Loop until we have no more data from the socket or we have data for the higher layers - while (res) - res = readPackets(); - - return m_type; -} - -bool CCCSProtocolHandler::readPackets() -{ - m_type = CT_NONE; - - // No more data? - int length = m_socket.read(m_buffer, BUFFER_LENGTH, m_yourAddress, m_yourPort); - if (length <= 0) - return false; - - m_length = length; - - if (m_buffer[0] == '0' && m_buffer[1] == '0' && m_buffer[2] == '0' && m_buffer[3] == '1') { - m_type = CT_DATA; - return false; - } else if (m_buffer[0] == 'L' && m_buffer[1] == 'L' && m_buffer[2] == 'L') { - return true; - } else { - switch (m_length) { - case 14U: - m_type = CT_CONNECT; - return false; - case 25U: - m_type = CT_POLL; - return false; - case 100U: - case 20U: - case 17U: - m_type = CT_MISC; - return false; - case 39U: - return true; - default: - break; - } - } - - // An unknown type - CUtils::dump(wxT("Unknown packet type from CCS"), m_buffer, m_length); - - return true; -} - -CAMBEData* CCCSProtocolHandler::readData() -{ - if (m_type != CT_DATA) - return NULL; - - CAMBEData* data = new CAMBEData; - - bool res = data->setCCSData(m_buffer, m_length, m_yourAddress, m_yourPort, m_myPort); - if (!res) { - delete data; - return NULL; - } - - return data; -} - -CConnectData* CCCSProtocolHandler::readConnect() -{ - if (m_type != CT_CONNECT) - return NULL; - - CConnectData* connect = new CConnectData; - - bool res = connect->setCCSData(m_buffer, m_length, m_yourAddress, m_yourPort, m_myPort); - if (!res) { - delete connect; - return NULL; - } - - return connect; -} - -CPollData* CCCSProtocolHandler::readPoll() -{ - if (m_type != CT_POLL) - return NULL; - - CPollData* poll = new CPollData; - - bool res = poll->setCCSData(m_buffer, m_length, m_yourAddress, m_yourPort, m_myPort); - if (!res) { - delete poll; - return NULL; - } - - return poll; -} - -CCCSData* CCCSProtocolHandler::readMisc() -{ - if (m_type != CT_MISC) - return NULL; - - CCCSData* data = new CCCSData; - - bool res = data->setCCSData(m_buffer, m_length, m_yourAddress, m_yourPort, m_myPort); - if (!res) { - delete data; - return NULL; - } - - return data; -} - -void CCCSProtocolHandler::close() -{ - m_socket.close(); -} diff --git a/Common/CCSProtocolHandler.h b/Common/CCSProtocolHandler.h deleted file mode 100644 index 87bc9f1..0000000 --- a/Common/CCSProtocolHandler.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (C) 2013 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 - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef CCSProtocolHandler_H -#define CCSProtocolHandler_H - -#include "UDPReaderWriter.h" -#include "DStarDefines.h" -#include "ConnectData.h" -#include "HeardData.h" -#include "AMBEData.h" -#include "PollData.h" -#include "CCSData.h" - -#if defined(__WINDOWS__) -#include "Inaddr.h" -#else -#include -#endif - -#include - -enum CCS_TYPE { - CT_NONE, - CT_DATA, - CT_POLL, - CT_CONNECT, - CT_MISC -}; - -class CCCSProtocolHandler { -public: - CCCSProtocolHandler(unsigned int port, const wxString& addr = wxEmptyString); - ~CCCSProtocolHandler(); - - bool open(); - - unsigned int getPort() const; - - bool writeData(const CAMBEData& data); - bool writeConnect(const CConnectData& connect); - bool writePoll(const CPollData& poll); - bool writeHeard(const CHeardData& heard); - bool writeMisc(const CCCSData& data); - - CCS_TYPE read(); - CAMBEData* readData(); - CPollData* readPoll(); - CConnectData* readConnect(); - CCCSData* readMisc(); - - void close(); - -private: - CUDPReaderWriter m_socket; - CCS_TYPE m_type; - unsigned char* m_buffer; - unsigned int m_length; - in_addr m_yourAddress; - unsigned int m_yourPort; - unsigned int m_myPort; - - bool readPackets(); -}; - -#endif diff --git a/Common/Common.vcxproj b/Common/Common.vcxproj index bdbcfc3..10fcc19 100644 --- a/Common/Common.vcxproj +++ b/Common/Common.vcxproj @@ -156,9 +156,6 @@ - - - @@ -224,10 +221,6 @@ - - - - diff --git a/Common/Common.vcxproj.filters b/Common/Common.vcxproj.filters index 8365240..a42af77 100644 --- a/Common/Common.vcxproj.filters +++ b/Common/Common.vcxproj.filters @@ -41,15 +41,6 @@ Source Files - - Source Files - - - Source Files - - - Source Files - Source Files @@ -241,18 +232,6 @@ Header Files - - Header Files - - - Header Files - - - Header Files - - - Header Files - Header Files diff --git a/Common/ConnectData.cpp b/Common/ConnectData.cpp index 2489b73..73f128a 100644 --- a/Common/ConnectData.cpp +++ b/Common/ConnectData.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010,2012,2013 by Jonathan Naylor G4KLX + * Copyright (C) 2010,2012,2013,2018 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 @@ -203,33 +203,6 @@ bool CConnectData::setDCSData(const unsigned char* data, unsigned int length, co return true; } -bool CConnectData::setCCSData(const unsigned char* data, unsigned int length, const in_addr& yourAddress, unsigned int yourPort, unsigned int myPort) -{ - wxASSERT(data != NULL); - wxASSERT(length >= 14U); - wxASSERT(yourPort > 0U); - - m_repeater = wxString((const char*)data, wxConvLocal, LONG_CALLSIGN_LENGTH); - m_repeater.SetChar(LONG_CALLSIGN_LENGTH - 1U, data[LONG_CALLSIGN_LENGTH + 0U]); - - if (data[LONG_CALLSIGN_LENGTH + 2U] == 'A' && - data[LONG_CALLSIGN_LENGTH + 3U] == 'C' && - data[LONG_CALLSIGN_LENGTH + 4U] == 'K') - m_type = CT_ACK; - else if (data[LONG_CALLSIGN_LENGTH + 2U] == 'N' && - data[LONG_CALLSIGN_LENGTH + 3U] == 'A' && - data[LONG_CALLSIGN_LENGTH + 4U] == 'K') - m_type = CT_NAK; - else - return false; - - m_yourAddress = yourAddress; - m_yourPort = yourPort; - m_myPort = myPort; - - return true; -} - bool CConnectData::setDPlusData(const unsigned char* data, unsigned int length, const in_addr& yourAddress, unsigned int yourPort, unsigned int myPort) { wxASSERT(data != NULL); @@ -392,46 +365,6 @@ unsigned int CConnectData::getDCSData(unsigned char *data, unsigned int length) } } -unsigned int CConnectData::getCCSData(unsigned char *data, unsigned int length) const -{ - wxASSERT(data != NULL); - wxASSERT(length >= 39U); - - ::memset(data, ' ', 39U); - - for (unsigned int i = 0U; i < m_repeater.Len() && i < (LONG_CALLSIGN_LENGTH - 1U); i++) - data[i] = m_repeater.GetChar(i); - - data[LONG_CALLSIGN_LENGTH + 0U] = m_repeater.GetChar(LONG_CALLSIGN_LENGTH - 1U); - - switch (m_type) { - case CT_LINK1: - case CT_LINK2: { - data[9U] = 0x41U; - data[10U] = '@'; - - for (unsigned int i = 0U; i < m_locator.Len(); i++) - data[11U + i] = m_locator.GetChar(i); - - data[17U] = 0x20U; - data[18U] = '@'; - - wxString text; - text.Printf(wxT("ircDDB_GW-%s"), VERSION.Left(8U).c_str()); - - for (unsigned int i = 0U; i < text.Len(); i++) - data[19U + i] = text.GetChar(i); - } - return 39U; - - case CT_UNLINK: - return 19U; - - default: - return 0U; - } -} - unsigned int CConnectData::getDPlusData(unsigned char *data, unsigned int length) const { wxASSERT(data != NULL); diff --git a/Common/ConnectData.h b/Common/ConnectData.h index da6ea78..f3cb287 100644 --- a/Common/ConnectData.h +++ b/Common/ConnectData.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010,2012,2013 by Jonathan Naylor G4KLX + * Copyright (C) 2010,2012,2013,2018 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 @@ -50,12 +50,10 @@ public: bool setDExtraData(const unsigned char* data, unsigned int length, const in_addr& yourAddress, unsigned int yourPort, unsigned int myPort); bool setDPlusData(const unsigned char* data, unsigned int length, const in_addr& yourAddress, unsigned int yourPort, unsigned int myPort); bool setDCSData(const unsigned char* data, unsigned int length, const in_addr& yourAddress, unsigned int yourPort, unsigned int myPort); - bool setCCSData(const unsigned char* data, unsigned int length, const in_addr& yourAddress, unsigned int yourPort, unsigned int myPort); unsigned int getDExtraData(unsigned char* data, unsigned int length) const; unsigned int getDPlusData(unsigned char* data, unsigned int length) const; unsigned int getDCSData(unsigned char* data, unsigned int length) const; - unsigned int getCCSData(unsigned char* data, unsigned int length) const; wxString getRepeater() const; wxString getReflector() const; diff --git a/Common/DStarDefines.h b/Common/DStarDefines.h index 8ea9ae6..a2dc448 100644 --- a/Common/DStarDefines.h +++ b/Common/DStarDefines.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009-2015 by Jonathan Naylor, G4KLX + * Copyright (C) 2009-2015,2018 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 @@ -112,11 +112,10 @@ const unsigned char SCRAMBLER_BYTE3 = 0x93U; const unsigned int DPLUS_PORT = 20001U; const unsigned int DEXTRA_PORT = 30001U; const unsigned int DCS_PORT = 30051U; -const unsigned int CCS_PORT = 30062U; // Port for CCS7 const unsigned int G2_DV_PORT = 40000U; const unsigned int G2_DD_PORT = 40001U; -const unsigned int NETWORK_TIMEOUT = 2U; // Network timeout for G2, CCS, DCS, DExtra, and D-Plus +const unsigned int NETWORK_TIMEOUT = 2U; // Network timeout for G2, DCS, DExtra, and D-Plus const unsigned int REPEATER_TIMEOUT = 2U; // Repeater timeout const unsigned int REPLY_TIME = 2U; // The turnaround time for version, echo, audio prompts @@ -138,8 +137,7 @@ enum AUDIO_SOURCE { AS_DEXTRA, AS_DCS, AS_DUP, - AS_VERSION, - AS_CCS + AS_VERSION }; enum DSTAR_RX_STATE { diff --git a/Common/DTMF.cpp b/Common/DTMF.cpp index a05cbed..05ca390 100644 --- a/Common/DTMF.cpp +++ b/Common/DTMF.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012,2013,2015 by Jonathan Naylor G4KLX + * Copyright (C) 2012,2013,2015,2018 by Jonathan Naylor G4KLX * Copyright (C) 2011 by DV Developer Group. DJ0ABR * * This program is free software; you can redistribute it and/or modify @@ -167,8 +167,6 @@ wxString CDTMF::translate() return processReflector(wxT("XRF"), command.Mid(1U)); else if (command.GetChar(0U) == wxT('D')) return processReflector(wxT("DCS"), command.Mid(1U)); - else - return processCCS(command); } void CDTMF::reset() @@ -221,97 +219,3 @@ wxString CDTMF::processReflector(const wxString& prefix, const wxString& command return out; } } - -wxString CDTMF::processCCS(const wxString& command) const -{ - unsigned int len = command.Len(); - - wxString out = wxEmptyString; - - switch (len) { - case 3U: { - // CCS7 for local repeater without band - unsigned long n; - command.ToULong(&n); - if (n == 0UL) - return wxEmptyString; - out.Printf(wxT("C%03lu "), n); - } - break; - case 4U: { - wxChar c = command.GetChar(3U); - if (c == wxT('A') || c == wxT('B') || c == wxT('C') || c == wxT('D')) { - // CCS7 for local repeater with band - unsigned long n; - command.Mid(0U, 3U).ToULong(&n); - if (n == 0UL) - return wxEmptyString; - out.Printf(wxT("C%03lu%c "), n, c); - } else { - // CCS7 for local user - unsigned long n; - command.ToULong(&n); - if (n == 0UL) - return wxEmptyString; - out.Printf(wxT("C%04lu "), n); - } - } - break; - case 5U: { - wxChar c = command.GetChar(4U); - if (c == wxT('A') || c == wxT('B') || c == wxT('C') || c == wxT('D')) { - // CCS7 for local hostspot with band - unsigned long n; - command.Mid(0U, 4U).ToULong(&n); - if (n == 0UL) - return wxEmptyString; - out.Printf(wxT("C%04lu%c "), n, c); - } - } - break; - case 6U: { - // CCS7 for full repeater without band - unsigned long n; - command.ToULong(&n); - if (n == 0UL) - return wxEmptyString; - out.Printf(wxT("C%06lu "), n); - } - break; - case 7U: { - wxChar c = command.GetChar(6U); - if (c == wxT('A') || c == wxT('B') || c == wxT('C') || c == wxT('D')) { - // CCS7 for full repeater with band - unsigned long n; - command.Mid(0U, 6U).ToULong(&n); - if (n == 0UL) - return wxEmptyString; - out.Printf(wxT("C%06lu%c"), n, c); - } else { - // CCS7 for full user or CCS7 for full hostpot without band - unsigned long n; - command.ToULong(&n); - if (n == 0UL) - return wxEmptyString; - out.Printf(wxT("C%07lu"), n); - } - } - break; - case 8U: { - wxChar c = command.GetChar(7U); - if (c == wxT('A') || c == wxT('B') || c == wxT('C') || c == wxT('D')) { - // CCS7 for full hotspot with band - unsigned long n; - command.Mid(0U, 7U).ToULong(&n); - if (n == 0UL) - return wxEmptyString; - out.Printf(wxT("C%07lu%c"), n, c); - } - } - break; - default: - break; - } - - return out; -} diff --git a/Common/DTMF.h b/Common/DTMF.h index 71ab364..09e60a8 100644 --- a/Common/DTMF.h +++ b/Common/DTMF.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012,2013 by Jonathan Naylor G4KLX + * Copyright (C) 2012,2013,2018 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 @@ -43,7 +43,6 @@ private: wxChar m_lastChar; wxString processReflector(const wxString& prefix, const wxString& command) const; - wxString processCCS(const wxString& command) const; }; #endif diff --git a/Common/Defs.h b/Common/Defs.h index f2c5c31..8422954 100644 --- a/Common/Defs.h +++ b/Common/Defs.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2015 by Jonathan Naylor G4KLX + * Copyright (C) 2010-2015,2018 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 @@ -24,7 +24,6 @@ const wxString DEXTRA_HOSTS_FILE_NAME = wxT("DExtra_Hosts.txt"); const wxString DPLUS_HOSTS_FILE_NAME = wxT("DPlus_Hosts.txt"); const wxString DCS_HOSTS_FILE_NAME = wxT("DCS_Hosts.txt"); -const wxString CCS_HOSTS_FILE_NAME = wxT("CCS_Hosts.txt"); const wxString GATEWAY_HOSTS_FILE_NAME = wxT("Gateway_Hosts.txt"); const wxString LINKS_BASE_NAME = wxT("Links"); @@ -57,8 +56,7 @@ enum DIRECTION { enum PROTOCOL { PROTO_DEXTRA, PROTO_DPLUS, - PROTO_DCS, - PROTO_CCS + PROTO_DCS }; enum HW_TYPE { @@ -109,12 +107,10 @@ enum LINK_STATUS { LS_LINKING_DEXTRA, LS_LINKING_DPLUS, LS_LINKING_DCS, - LS_LINKING_CCS, LS_LINKED_LOOPBACK, LS_LINKED_DEXTRA, LS_LINKED_DPLUS, - LS_LINKED_DCS, - LS_LINKED_CCS + LS_LINKED_DCS }; enum SLOWDATA_STATE { diff --git a/Common/HeaderData.cpp b/Common/HeaderData.cpp index fd518bd..dd49ba3 100644 --- a/Common/HeaderData.cpp +++ b/Common/HeaderData.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2014 by Jonathan Naylor G4KLX + * Copyright (C) 2010-2014,2018 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 @@ -256,24 +256,6 @@ void CHeaderData::setDCSData(const unsigned char *data, unsigned int length, con m_myPort = myPort; } -void CHeaderData::setCCSData(const unsigned char *data, unsigned int length, const in_addr& yourAddress, unsigned int yourPort, unsigned int myPort) -{ - wxASSERT(data != NULL); - wxASSERT(length >= 100U); - - m_id = data[44U] * 256U + data[43U]; - - ::memcpy(m_rptCall2, data + 7U, LONG_CALLSIGN_LENGTH); - ::memcpy(m_rptCall1, data + 15U, LONG_CALLSIGN_LENGTH); - ::memcpy(m_yourCall, data + 23U, LONG_CALLSIGN_LENGTH); - ::memcpy(m_myCall1, data + 31U, LONG_CALLSIGN_LENGTH); - ::memcpy(m_myCall2, data + 39U, SHORT_CALLSIGN_LENGTH); - - m_yourAddress = yourAddress; - m_yourPort = yourPort; - m_myPort = myPort; -} - bool CHeaderData::setG2Data(const unsigned char *data, unsigned int length, bool check, const in_addr& yourAddress, unsigned int yourPort) { wxASSERT(data != NULL); @@ -528,18 +510,6 @@ void CHeaderData::getDCSData(unsigned char *data, unsigned int length) const ::memcpy(data + 39U, m_myCall2, SHORT_CALLSIGN_LENGTH); } -void CHeaderData::getCCSData(unsigned char *data, unsigned int length) const -{ - wxASSERT(data != NULL); - wxASSERT(length >= 100U); - - ::memcpy(data + 7U, m_rptCall2, LONG_CALLSIGN_LENGTH); - ::memcpy(data + 15U, m_rptCall1, LONG_CALLSIGN_LENGTH); - ::memcpy(data + 23U, m_yourCall, LONG_CALLSIGN_LENGTH); - ::memcpy(data + 31U, m_myCall1, LONG_CALLSIGN_LENGTH); - ::memcpy(data + 39U, m_myCall2, SHORT_CALLSIGN_LENGTH); -} - unsigned int CHeaderData::getG2Data(unsigned char *data, unsigned int length, bool check) const { wxASSERT(data != NULL); diff --git a/Common/HeaderData.h b/Common/HeaderData.h index 791ec36..ba21b57 100644 --- a/Common/HeaderData.h +++ b/Common/HeaderData.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2014 by Jonathan Naylor G4KLX + * Copyright (C) 2010-2014,2018 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 @@ -42,7 +42,6 @@ public: bool setDExtraData(const unsigned char* data, unsigned int length, bool check, const in_addr& yourAddress, unsigned int yourPort, unsigned int myPort); bool setDPlusData(const unsigned char* data, unsigned int length, bool check, const in_addr& yourAddress, unsigned int yourPort, unsigned int myPort); void setDCSData(const unsigned char* data, unsigned int length, const in_addr& yourAddress, unsigned int yourPort, unsigned int myPort); - void setCCSData(const unsigned char* data, unsigned int length, const in_addr& yourAddress, unsigned int yourPort, unsigned int myPort); unsigned int getIcomRepeaterData(unsigned char* data, unsigned int length, bool check) const; unsigned int getHBRepeaterData(unsigned char* data, unsigned int length, bool check) const; @@ -50,7 +49,6 @@ public: unsigned int getDPlusData(unsigned char* data, unsigned int length, bool check) const; unsigned int getG2Data(unsigned char* data, unsigned int length, bool check) const; void getDCSData(unsigned char* data, unsigned int length) const; - void getCCSData(unsigned char* data, unsigned int length) const; bool setDVTOOLData(const unsigned char* data, unsigned int length, bool check); diff --git a/Common/HeardData.cpp b/Common/HeardData.cpp index e2d8f2e..9e97dbc 100644 --- a/Common/HeardData.cpp +++ b/Common/HeardData.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012,2013 by Jonathan Naylor G4KLX + * Copyright (C) 2012,2013,2018 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 @@ -68,45 +68,6 @@ bool CHeardData::setIcomRepeaterData(const unsigned char *data, unsigned int len return true; } -unsigned int CHeardData::getCCSData(unsigned char *data, unsigned int length) const -{ - wxASSERT(data != NULL); - wxASSERT(length >= 100U); - - ::memset(data, 0x00U, 100U); - - data[0U] = '0'; - data[1U] = '0'; - data[2U] = '0'; - data[3U] = '1'; - - ::memset(data + 7U, ' ', 36U); - - for (unsigned int i = 0U; i < m_reflector.Len(); i++) - data[i + 7U] = m_reflector.GetChar(i); - - for (unsigned int i = 0U; i < m_repeater.Len(); i++) - data[i + 15U] = m_repeater.GetChar(i); - - ::memcpy(data + 23U, "CQCQCQ ", LONG_CALLSIGN_LENGTH); - - for (unsigned int i = 0U; i < m_user.Len(); i++) - data[i + 31U] = m_user.GetChar(i); - - for (unsigned int i = 0U; i < m_ext.Len(); i++) - data[i + 39U] = m_ext.GetChar(i); - - data[61U] = 0x01U; - - data[63U] = 0x21U; - - ::memset(data + 64U, ' ', 20U); - - data[93U] = 0x36U; - - return 100U; -} - wxString CHeardData::getRepeater() const { return m_repeater; diff --git a/Common/HeardData.h b/Common/HeardData.h index 61010fa..e1b2eed 100644 --- a/Common/HeardData.h +++ b/Common/HeardData.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012,2013 by Jonathan Naylor G4KLX + * Copyright (C) 2012,2013,2018 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 @@ -39,8 +39,6 @@ public: bool setIcomRepeaterData(const unsigned char* data, unsigned int length, const in_addr& address, unsigned int port); - unsigned int getCCSData(unsigned char* data, unsigned int length) const; - wxString getRepeater() const; wxString getUser() const; diff --git a/Common/IRCDDBGatewayConfig.cpp b/Common/IRCDDBGatewayConfig.cpp index 7e3da47..7062737 100644 --- a/Common/IRCDDBGatewayConfig.cpp +++ b/Common/IRCDDBGatewayConfig.cpp @@ -138,8 +138,6 @@ const wxString KEY_DPLUS_ENABLED = wxT("dplusEnabled"); const wxString KEY_DPLUS_MAXDONGLES = wxT("dplusMaxDongles"); const wxString KEY_DPLUS_LOGIN = wxT("dplusLogin"); const wxString KEY_DCS_ENABLED = wxT("dcsEnabled"); -const wxString KEY_CCS_ENABLED = wxT("ccsEnabled"); -const wxString KEY_CCS_HOST = wxT("ccsHost"); const wxString KEY_XLX_ENABLED = wxT("xlxEnabled"); const wxString KEY_XLX_OVERRIDE_LOCAL = wxT("xlxOverrideLocal"); const wxString KEY_XLX_HOSTS_FILE_URL = wxT("xlxHostsFileUrl"); @@ -261,8 +259,6 @@ const bool DEFAULT_DPLUS_ENABLED = false; const unsigned int DEFAULT_DPLUS_MAXDONGLES = 5U; const wxString DEFAULT_DPLUS_LOGIN = wxEmptyString; const bool DEFAULT_DCS_ENABLED = true; -const bool DEFAULT_CCS_ENABLED = true; -const wxString DEFAULT_CCS_HOST = wxT("CCS704 "); const bool DEFAULT_XLX_ENABLED = true; const bool DEFAULT_XLX_OVERRIDE_LOCAL = true; const wxString DEFAULT_XLX_HOSTS_FILE_URL = _T("http://xlxapi.rlx.lu/api.php?do=GetReflectorHostname"); @@ -413,8 +409,6 @@ m_dplusEnabled(DEFAULT_DPLUS_ENABLED), m_dplusMaxDongles(DEFAULT_DPLUS_MAXDONGLES), m_dplusLogin(DEFAULT_DPLUS_LOGIN), m_dcsEnabled(DEFAULT_DCS_ENABLED), -m_ccsEnabled(DEFAULT_CCS_ENABLED), -m_ccsHost(DEFAULT_CCS_HOST), m_xlxEnabled(DEFAULT_XLX_ENABLED), m_xlxOverrideLocal(DEFAULT_XLX_OVERRIDE_LOCAL), m_xlxHostsFileUrl(DEFAULT_XLX_HOSTS_FILE_URL), @@ -747,10 +741,6 @@ m_y(DEFAULT_WINDOW_Y) m_config->Read(m_name + KEY_DCS_ENABLED, &m_dcsEnabled, DEFAULT_DCS_ENABLED); - m_config->Read(m_name + KEY_CCS_ENABLED, &m_ccsEnabled, DEFAULT_CCS_ENABLED); - - m_config->Read(m_name + KEY_CCS_HOST, &m_ccsHost, DEFAULT_CCS_HOST); - m_config->Read(m_name + KEY_XLX_ENABLED, &m_xlxEnabled, DEFAULT_XLX_ENABLED); m_config->Read(m_name + KEY_XLX_OVERRIDE_LOCAL, &m_xlxOverrideLocal, DEFAULT_XLX_OVERRIDE_LOCAL); @@ -1026,8 +1016,6 @@ m_dplusEnabled(DEFAULT_DPLUS_ENABLED), m_dplusMaxDongles(DEFAULT_DPLUS_MAXDONGLES), m_dplusLogin(DEFAULT_DPLUS_LOGIN), m_dcsEnabled(DEFAULT_DCS_ENABLED), -m_ccsEnabled(DEFAULT_CCS_ENABLED), -m_ccsHost(DEFAULT_CCS_HOST), m_xlxEnabled(DEFAULT_XLX_ENABLED), m_xlxOverrideLocal(DEFAULT_XLX_OVERRIDE_LOCAL), m_xlxHostsFileUrl(DEFAULT_XLX_HOSTS_FILE_URL), @@ -1411,11 +1399,6 @@ m_y(DEFAULT_WINDOW_Y) } else if (key.IsSameAs(KEY_DCS_ENABLED)) { val.ToLong(&temp1); m_dcsEnabled = temp1 == 1L; - } else if (key.IsSameAs(KEY_CCS_ENABLED)) { - val.ToLong(&temp1); - m_ccsEnabled = temp1 == 1L; - } else if (key.IsSameAs(KEY_CCS_HOST)) { - m_ccsHost = val; } else if (key.IsSameAs(KEY_XLX_ENABLED)) { val.ToLong(&temp1); m_xlxEnabled = temp1 == 1L; @@ -1927,18 +1910,14 @@ void CIRCDDBGatewayConfig::setDPlus(bool enabled, unsigned int maxDongles, const m_dplusLogin = login; } -void CIRCDDBGatewayConfig::getDCS(bool& dcsEnabled, bool& ccsEnabled, wxString& ccsHost) const +void CIRCDDBGatewayConfig::getDCS(bool& dcsEnabled) const { dcsEnabled = m_dcsEnabled; - ccsEnabled = m_ccsEnabled; - ccsHost = m_ccsHost; } -void CIRCDDBGatewayConfig::setDCS(bool dcsEnabled, bool ccsEnabled, const wxString& ccsHost) +void CIRCDDBGatewayConfig::setDCS(bool dcsEnabled) { m_dcsEnabled = dcsEnabled; - m_ccsEnabled = ccsEnabled; - m_ccsHost = ccsHost; } void CIRCDDBGatewayConfig::getXLX(bool& xlxEnabled, bool& xlxOverrideLocal, wxString& xlxHostsFileUrl) @@ -2375,8 +2354,6 @@ bool CIRCDDBGatewayConfig::write() m_config->Write(m_name + KEY_DPLUS_MAXDONGLES, long(m_dplusMaxDongles)); m_config->Write(m_name + KEY_DPLUS_LOGIN, m_dplusLogin); m_config->Write(m_name + KEY_DCS_ENABLED, m_dcsEnabled); - m_config->Write(m_name + KEY_CCS_ENABLED, m_ccsEnabled); - m_config->Write(m_name + KEY_CCS_HOST, m_ccsHost); m_config->Write(m_name + KEY_XLX_ENABLED, m_xlxEnabled); m_config->Write(m_name + KEY_XLX_OVERRIDE_LOCAL, m_xlxOverrideLocal); m_config->Write(m_name + KEY_XLX_HOSTS_FILE_URL, m_xlxHostsFileUrl); @@ -2583,8 +2560,6 @@ bool CIRCDDBGatewayConfig::write() buffer.Printf(wxT("%s=%u"), KEY_DPLUS_MAXDONGLES.c_str(), m_dplusMaxDongles); file.AddLine(buffer); buffer.Printf(wxT("%s=%s"), KEY_DPLUS_LOGIN.c_str(), m_dplusLogin.c_str()); file.AddLine(buffer); buffer.Printf(wxT("%s=%d"), KEY_DCS_ENABLED.c_str(), m_dcsEnabled ? 1 : 0); file.AddLine(buffer); - buffer.Printf(wxT("%s=%d"), KEY_CCS_ENABLED.c_str(), m_ccsEnabled ? 1 : 0); file.AddLine(buffer); - buffer.Printf(wxT("%s=%s"), KEY_CCS_HOST.c_str(), m_ccsHost.c_str()); file.AddLine(buffer); buffer.Printf(wxT("%s=%d"), KEY_XLX_ENABLED.c_str(), m_xlxEnabled ? 1 : 0); file.AddLine(buffer); buffer.Printf(wxT("%s=%d"), KEY_XLX_OVERRIDE_LOCAL.c_str(), m_xlxOverrideLocal ? 1 : 0); file.AddLine(buffer); buffer.Printf(wxT("%s=%s"), KEY_XLX_HOSTS_FILE_URL.c_str(), m_xlxHostsFileUrl.c_str()); file.AddLine(buffer); diff --git a/Common/IRCDDBGatewayConfig.h b/Common/IRCDDBGatewayConfig.h index 5583b91..24f3c53 100644 --- a/Common/IRCDDBGatewayConfig.h +++ b/Common/IRCDDBGatewayConfig.h @@ -68,8 +68,8 @@ public: void getDPlus(bool& enabled, unsigned int& maxDongles, wxString& login) const; void setDPlus(bool enabled, unsigned int maxDongles, const wxString& login); - void getDCS(bool& dcsEnabled, bool& ccsEnabled, wxString& ccsHost) const; - void setDCS(bool dcsEnabled, bool ccsEnabled, const wxString& ccsHost); + void getDCS(bool& dcsEnabled) const; + void setDCS(bool dcsEnabled); void getXLX(bool& xlxEnabled, bool& xlxOverrideLocal, wxString& xlxHostsFileUrl); void setXLX(bool xlxEnabled, bool xlxOverrideLocal, wxString xlxHostsFileUrl); @@ -241,8 +241,6 @@ private: unsigned int m_dplusMaxDongles; wxString m_dplusLogin; bool m_dcsEnabled; - bool m_ccsEnabled; - wxString m_ccsHost; bool m_xlxEnabled; bool m_xlxOverrideLocal; wxString m_xlxHostsFileUrl; diff --git a/Common/Makefile b/Common/Makefile index 8643148..9e569ad 100644 --- a/Common/Makefile +++ b/Common/Makefile @@ -1,5 +1,5 @@ OBJECTS = AMBEData.o AnnouncementUnit.o APRSCollector.o APRSWriter.o APRSWriterThread.o AudioUnit.o CacheManager.o CallsignList.o \ - CallsignServer.o CCITTChecksum.o CCSData.o CCSHandler.o CCSProtocolHandler.o ConnectData.o DCSHandler.o DCSProtocolHandler.o \ + CallsignServer.o CCITTChecksum.o ConnectData.o DCSHandler.o DCSProtocolHandler.o \ DCSProtocolHandlerPool.o DDData.o DDHandler.o DExtraHandler.o DExtraProtocolHandler.o DExtraProtocolHandlerPool.o \ DPlusAuthenticator.o DPlusHandler.o DPlusProtocolHandler.o DPlusProtocolHandlerPool.o DRATSServer.o DTMF.o \ DummyRepeaterProtocolHandler.o DVTOOLFileReader.o EchoUnit.o G2Handler.o G2ProtocolHandler.o GatewayCache.o \ diff --git a/Common/PollData.cpp b/Common/PollData.cpp index 04b2569..52123af 100644 --- a/Common/PollData.cpp +++ b/Common/PollData.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010,2012,2013 by Jonathan Naylor G4KLX + * Copyright (C) 2010,2012,2013,2018 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 @@ -125,21 +125,6 @@ bool CPollData::setDCSData(const unsigned char* data, unsigned int length, const return true; } -bool CPollData::setCCSData(const unsigned char* data, unsigned int length, const in_addr& yourAddress, unsigned int yourPort, unsigned int myPort) -{ - wxASSERT(data != NULL); - wxASSERT(length >= 25U); - wxASSERT(yourPort > 0U); - - m_data1 = wxString((const char*)(data + 0U), wxConvLocal, 25U); - m_length = length; - m_yourAddress = yourAddress; - m_yourPort = yourPort; - m_myPort = myPort; - - return true; -} - bool CPollData::setDPlusData(const unsigned char*, unsigned int length, const in_addr& yourAddress, unsigned int yourPort, unsigned int myPort) { wxASSERT(yourPort > 0U); @@ -203,24 +188,6 @@ unsigned int CPollData::getDCSData(unsigned char *data, unsigned int length) con } } -unsigned int CPollData::getCCSData(unsigned char *data, unsigned int length) const -{ - wxASSERT(data != NULL); - wxASSERT(length >= 25U); - - ::memset(data, ' ', 25U); - - for (unsigned int i = 0U; i < m_data1.Len() && i < LONG_CALLSIGN_LENGTH; i++) - data[i + 0U] = m_data1.GetChar(i); - - if (!m_data2.IsEmpty()) { - for (unsigned int i = 0U; i < m_data2.Len() && i < LONG_CALLSIGN_LENGTH; i++) - data[i + 8U] = m_data2.GetChar(i); - } - - return 25U; -} - unsigned int CPollData::getDPlusData(unsigned char *data, unsigned int length) const { wxASSERT(data != NULL); diff --git a/Common/PollData.h b/Common/PollData.h index d85ec78..5e9822f 100644 --- a/Common/PollData.h +++ b/Common/PollData.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010,2012,2013 by Jonathan Naylor G4KLX + * Copyright (C) 2010,2012,2013,2018 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 @@ -40,12 +40,10 @@ public: bool setDExtraData(const unsigned char* data, unsigned int length, const in_addr& yourAddress, unsigned int yourPort, unsigned int myPort); bool setDPlusData(const unsigned char* data, unsigned int length, const in_addr& yourAddress, unsigned int yourPort, unsigned int myPort); bool setDCSData(const unsigned char* data, unsigned int length, const in_addr& yourAddress, unsigned int yourPort, unsigned int myPort); - bool setCCSData(const unsigned char* data, unsigned int length, const in_addr& yourAddress, unsigned int yourPort, unsigned int myPort); unsigned int getDExtraData(unsigned char* data, unsigned int length) const; unsigned int getDPlusData(unsigned char* data, unsigned int length) const; unsigned int getDCSData(unsigned char* data, unsigned int length) const; - unsigned int getCCSData(unsigned char* data, unsigned int length) const; wxString getData1() const; void setData1(const wxString& data); diff --git a/Common/RemoteHandler.cpp b/Common/RemoteHandler.cpp index dbbe1fd..e0cfee9 100644 --- a/Common/RemoteHandler.cpp +++ b/Common/RemoteHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011,2012,2013 by Jonathan Naylor G4KLX + * Copyright (C) 2011,2012,2013,2018 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 @@ -148,7 +148,6 @@ void CRemoteHandler::sendRepeater(const wxString& callsign) CDExtraHandler::getInfo(repeater, *data); CDPlusHandler::getInfo(repeater, *data); CDCSHandler::getInfo(repeater, *data); - CCCSHandler::getInfo(repeater, *data); m_handler.sendRepeater(*data); } diff --git a/Common/RepeaterHandler.cpp b/Common/RepeaterHandler.cpp index 215e0dd..5548fc3 100644 --- a/Common/RepeaterHandler.cpp +++ b/Common/RepeaterHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2015 by Jonathan Naylor G4KLX + * Copyright (C) 2010-2015,2018 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 @@ -21,7 +21,6 @@ #include "DPlusHandler.h" #include "DStarDefines.h" #include "DCSHandler.h" -#include "CCSHandler.h" #include "HeaderData.h" #include "DDHandler.h" #include "AMBEData.h" @@ -127,7 +126,6 @@ m_version(NULL), m_drats(NULL), m_dtmf(), m_pollTimer(1000U, 900U), // 15 minutes -m_ccsHandler(NULL), m_lastReflector(), m_heardUser(), m_heardRepeater(), @@ -567,10 +565,6 @@ void CRepeaterHandler::processRepeater(CHeaderData& header) if (!m_heardUser.IsEmpty() && !m_myCall1.IsSameAs(m_heardUser) && m_irc != NULL) m_irc->sendHeard(m_heardUser, wxT(" "), wxT(" "), m_heardRepeater, wxT(" "), 0x00U, 0x00U, 0x00U); - // Inform CCS - m_ccsHandler->writeHeard(header); - m_ccsHandler->writeHeader(header); - // The Icom heard timer m_heardTimer.stop(); @@ -711,16 +705,11 @@ void CRepeaterHandler::processRepeater(CHeaderData& header) return; } - if (isCCSCommand(m_yourCall)) { - ccsCommandHandler(m_yourCall, m_myCall1, wxT("UR Call")); - sendToOutgoing(header); - } else { - g2CommandHandler(m_yourCall, m_myCall1, header); + g2CommandHandler(m_yourCall, m_myCall1, header); - if (m_g2Status == G2_NONE) { - reflectorCommandHandler(m_yourCall, m_myCall1, wxT("UR Call")); - sendToOutgoing(header); - } + if (m_g2Status == G2_NONE) { + reflectorCommandHandler(m_yourCall, m_myCall1, wxT("UR Call")); + sendToOutgoing(header); } } @@ -756,8 +745,6 @@ void CRepeaterHandler::processRepeater(CAMBEData& data) if (!m_restricted && m_yourCall.Left(4U).IsSameAs(wxT("CQCQ"))) { if (command.IsEmpty()) { // Do nothing - } else if (isCCSCommand(command)) { - ccsCommandHandler(command, m_myCall1, wxT("DTMF")); } else if (command.IsSameAs(wxT(" I"))) { m_infoNeeded = true; } else { @@ -770,9 +757,6 @@ void CRepeaterHandler::processRepeater(CAMBEData& data) // Incoming links get everything sendToIncoming(data); - // CCS gets everything - m_ccsHandler->writeAMBE(data); - if (m_drats != NULL) m_drats->writeData(data); @@ -957,10 +941,7 @@ void CRepeaterHandler::processBusy(CHeaderData& header) if (m_yourCall.Left(4).IsSameAs(wxT("CQCQ")) || m_yourCall.IsSameAs(wxT(" E")) || m_yourCall.IsSameAs(wxT(" I"))) return; - if (isCCSCommand(m_yourCall)) - ccsCommandHandler(m_yourCall, m_myCall1, wxT("background UR Call")); - else - reflectorCommandHandler(m_yourCall, m_myCall1, wxT("background UR Call")); + reflectorCommandHandler(m_yourCall, m_myCall1, wxT("background UR Call")); } void CRepeaterHandler::processBusy(CAMBEData& data) @@ -982,8 +963,6 @@ void CRepeaterHandler::processBusy(CAMBEData& data) if (!m_restricted && m_yourCall.Left(4U).IsSameAs(wxT("CQCQ"))) { if (command.IsEmpty()) { // Do nothing - } else if (isCCSCommand(command)) { - ccsCommandHandler(command, m_myCall1, wxT("background DTMF")); } else if (command.IsSameAs(wxT(" I"))) { // Do nothing } else { @@ -1117,9 +1096,6 @@ bool CRepeaterHandler::process(CHeaderData& header, DIRECTION, AUDIO_SOURCE sour sendToIncoming(header); - if (source == AS_DPLUS || source == AS_DEXTRA || source == AS_DCS) - m_ccsHandler->writeHeader(header); - if (source == AS_G2 || source == AS_INFO || source == AS_VERSION || source == AS_XBAND || source == AS_ECHO) return true; @@ -1154,9 +1130,6 @@ bool CRepeaterHandler::process(CAMBEData& data, DIRECTION, AUDIO_SOURCE source) sendToIncoming(data); - if (source == AS_DPLUS || source == AS_DEXTRA || source == AS_DCS) - m_ccsHandler->writeAMBE(data); - if (source == AS_G2 || source == AS_INFO || source == AS_VERSION || source == AS_XBAND || source == AS_ECHO) return true; @@ -1455,16 +1428,6 @@ void CRepeaterHandler::clockInt(unsigned int ms) writeNotLinked(); triggerInfo(); - } else if (m_linkStatus == LS_LINKING_CCS) { - // CCS didn't reply in time - wxLogMessage(wxT("CCS did not reply within five seconds")); - - m_ccsHandler->stopLink(); - - m_linkStatus = LS_NONE; - m_linkRepeater.Clear(); - - restoreLinks(); } } @@ -1745,17 +1708,6 @@ void CRepeaterHandler::linkRefused(DSTAR_PROTOCOL protocol, const wxString& call void CRepeaterHandler::link(RECONNECT reconnect, const wxString& reflector) { - // CCS removal - if (m_linkStatus == LS_LINKING_CCS || m_linkStatus == LS_LINKED_CCS) { - wxLogMessage(wxT("Dropping CCS link to %s"), m_linkRepeater.c_str()); - - m_ccsHandler->stopLink(); - - m_linkStatus = LS_NONE; - m_linkRepeater.Clear(); - m_queryTimer.stop(); - } - m_linkStartup = reflector; m_linkReconnect = reconnect; @@ -1892,11 +1844,6 @@ void CRepeaterHandler::link(RECONNECT reconnect, const wxString& reflector) void CRepeaterHandler::unlink(PROTOCOL protocol, const wxString& reflector) { - if (protocol == PROTO_CCS) { - m_ccsHandler->unlink(reflector); - return; - } - if (m_linkReconnect == RECONNECT_FIXED && m_linkRepeater.IsSameAs(reflector)) { wxLogMessage(wxT("Cannot unlink %s because it is fixed"), reflector.c_str()); return; @@ -1922,9 +1869,6 @@ void CRepeaterHandler::unlink(PROTOCOL protocol, const wxString& reflector) void CRepeaterHandler::g2CommandHandler(const wxString& callsign, const wxString& user, CHeaderData& header) { - if (m_linkStatus == LS_LINKING_CCS || m_linkStatus == LS_LINKED_CCS) - return; - if (callsign.Left(1).IsSameAs(wxT("/"))) { if (m_irc == NULL) { wxLogMessage(wxT("%s is trying to G2 route with ircDDB disabled"), user.c_str()); @@ -2017,27 +1961,8 @@ void CRepeaterHandler::g2CommandHandler(const wxString& callsign, const wxString } } -void CRepeaterHandler::ccsCommandHandler(const wxString& callsign, const wxString& user, const wxString& type) -{ - if (callsign.IsSameAs(wxT("CA "))) { - m_ccsHandler->stopLink(user, type); - } else { - CCS_STATUS status = m_ccsHandler->getStatus(); - if (status == CS_CONNECTED) { - suspendLinks(); - m_queryTimer.start(); - m_linkStatus = LS_LINKING_CCS; - m_linkRepeater = callsign.Mid(1U); - m_ccsHandler->startLink(m_linkRepeater, user, type); - } - } -} - void CRepeaterHandler::reflectorCommandHandler(const wxString& callsign, const wxString& user, const wxString& type) { - if (m_linkStatus == LS_LINKING_CCS || m_linkStatus == LS_LINKED_CCS) - return; - if (m_linkReconnect == RECONNECT_FIXED) return; @@ -2324,12 +2249,6 @@ void CRepeaterHandler::startupInt() } - m_ccsHandler = new CCCSHandler(this, m_rptCallsign, m_index + 1U, m_latitude, m_longitude, m_frequency, m_offset, m_description1, m_description2, m_url, CCS_PORT + m_index); - - // Start up our CCS link if we are DV mode - if (!m_ddMode) - m_ccsHandler->connect(); - // Link to a startup reflector/repeater if (m_linkAtStartup && !m_linkStartup.IsEmpty()) { wxLogMessage(wxT("Linking %s at startup to %s"), m_rptCallsign.c_str(), m_linkStartup.c_str()); @@ -2460,8 +2379,6 @@ void CRepeaterHandler::writeLinkingTo(const wxString &callsign) m_infoAudio->setStatus(m_linkStatus, m_linkRepeater, text); triggerInfo(); - - m_ccsHandler->setReflector(); } void CRepeaterHandler::writeLinkedTo(const wxString &callsign) @@ -2510,8 +2427,6 @@ void CRepeaterHandler::writeLinkedTo(const wxString &callsign) m_infoAudio->setStatus(m_linkStatus, m_linkRepeater, text); triggerInfo(); - - m_ccsHandler->setReflector(callsign); } void CRepeaterHandler::writeNotLinked() @@ -2560,8 +2475,6 @@ void CRepeaterHandler::writeNotLinked() m_infoAudio->setStatus(m_linkStatus, m_linkRepeater, text); triggerInfo(); - - m_ccsHandler->setReflector(); } void CRepeaterHandler::writeIsBusy(const wxString& callsign) @@ -2626,228 +2539,6 @@ void CRepeaterHandler::writeIsBusy(const wxString& callsign) m_infoAudio->setStatus(m_linkStatus, m_linkRepeater, text); m_infoAudio->setTempStatus(m_linkStatus, m_linkRepeater, tempText); triggerInfo(); - - m_ccsHandler->setReflector(); -} - -void CRepeaterHandler::ccsLinkMade(const wxString& callsign, DIRECTION direction) -{ - wxString text; - - switch (m_language) { - case TL_DEUTSCH: - text.Printf(wxT("Verlinkt zu %s"), callsign.c_str()); - break; - case TL_DANSK: - text.Printf(wxT("Linket til %s"), callsign.c_str()); - break; - case TL_FRANCAIS: - text.Printf(wxT("Connecte a %s"), callsign.c_str()); - break; - case TL_ITALIANO: - text.Printf(wxT("Connesso a %s"), callsign.c_str()); - break; - case TL_POLSKI: - text.Printf(wxT("Polaczony z %s"), callsign.c_str()); - break; - case TL_ESPANOL: - text.Printf(wxT("Enlazado %s"), callsign.c_str()); - break; - case TL_SVENSKA: - text.Printf(wxT("Lankad till %s"), callsign.c_str()); - break; - case TL_NEDERLANDS_NL: - case TL_NEDERLANDS_BE: - text.Printf(wxT("Gelinkt met %s"), callsign.c_str()); - break; - case TL_NORSK: - text.Printf(wxT("Tilkoblet %s"), callsign.c_str()); - break; - case TL_PORTUGUES: - text.Printf(wxT("Conectado a %s"), callsign.c_str()); - break; - default: - text.Printf(wxT("Linked to %s"), callsign.c_str()); - break; - } - - if (direction == DIR_OUTGOING) { - suspendLinks(); - - m_linkStatus = LS_LINKED_CCS; - m_linkRepeater = callsign; - m_queryTimer.stop(); - - CTextData textData(m_linkStatus, callsign, text, m_address, m_port); - m_repeaterHandler->writeText(textData); - - m_infoAudio->setStatus(m_linkStatus, m_linkRepeater, text); - triggerInfo(); - } else { - CTextData textData(m_linkStatus, m_linkRepeater, text, m_address, m_port, true); - m_repeaterHandler->writeText(textData); - - m_infoAudio->setTempStatus(LS_LINKED_CCS, callsign, text); - triggerInfo(); - } -} - -void CRepeaterHandler::ccsLinkEnded(const wxString&, DIRECTION direction) -{ - wxString tempText; - wxString text; - - switch (m_language) { - case TL_DEUTSCH: - text = wxT("Nicht verbunden"); - tempText = wxT("CCS ist beendet"); - break; - case TL_DANSK: - text = wxT("Ikke forbundet"); - tempText = wxT("CCS er afsluttet"); - break; - case TL_FRANCAIS: - text = wxT("Non connecte"); - tempText = wxT("CCS a pris fin"); - break; - case TL_ITALIANO: - text = wxT("Non connesso"); - tempText = wxT("CCS e finita"); - break; - case TL_POLSKI: - text = wxT("Nie polaczony"); - tempText = wxT("CCS zakonczyl"); - break; - case TL_ESPANOL: - text = wxT("No enlazado"); - tempText = wxT("CCS ha terminado"); - break; - case TL_SVENSKA: - text = wxT("Ej lankad"); - tempText = wxT("CCS har upphort"); - break; - case TL_NEDERLANDS_NL: - case TL_NEDERLANDS_BE: - text = wxT("Niet gelinkt"); - tempText = wxT("CCS is afgelopen"); - break; - case TL_NORSK: - text = wxT("Ikke linket"); - tempText = wxT("CCS er avsluttet"); - break; - case TL_PORTUGUES: - text = wxT("Desconectado"); - tempText = wxT("CCS terminou"); - break; - default: - text = wxT("Not linked"); - tempText = wxT("CCS has ended"); - break; - } - - if (direction == DIR_OUTGOING) { - m_linkStatus = LS_NONE; - m_linkRepeater.Clear(); - m_queryTimer.stop(); - - bool res = restoreLinks(); - if (!res) { - CTextData textData1(m_linkStatus, m_linkRepeater, tempText, m_address, m_port, true); - m_repeaterHandler->writeText(textData1); - - CTextData textData2(m_linkStatus, m_linkRepeater, text, m_address, m_port); - m_repeaterHandler->writeText(textData2); - - m_infoAudio->setStatus(m_linkStatus, m_linkRepeater, text); - m_infoAudio->setTempStatus(m_linkStatus, m_linkRepeater, tempText); - triggerInfo(); - } - } else { - CTextData textData(m_linkStatus, m_linkRepeater, tempText, m_address, m_port, true); - m_repeaterHandler->writeText(textData); - - m_infoAudio->setTempStatus(m_linkStatus, m_linkRepeater, tempText); - triggerInfo(); - } -} - -void CRepeaterHandler::ccsLinkFailed(const wxString& dtmf, DIRECTION direction) -{ - wxString tempText; - wxString text; - - switch (m_language) { - case TL_DEUTSCH: - text = wxT("Nicht verbunden"); - tempText.Printf(wxT("%s unbekannt"), dtmf.c_str()); - break; - case TL_DANSK: - text = wxT("Ikke forbundet"); - tempText.Printf(wxT("%s unknown"), dtmf.c_str()); - break; - case TL_FRANCAIS: - text = wxT("Non connecte"); - tempText.Printf(wxT("%s inconnu"), dtmf.c_str()); - break; - case TL_ITALIANO: - text = wxT("Non connesso"); - tempText.Printf(wxT("Sconosciuto %s"), dtmf.c_str()); - break; - case TL_POLSKI: - text = wxT("Nie polaczony"); - tempText.Printf(wxT("%s nieznany"), dtmf.c_str()); - break; - case TL_ESPANOL: - text = wxT("No enlazado"); - tempText.Printf(wxT("Desconocido %s"), dtmf.c_str()); - break; - case TL_SVENSKA: - text = wxT("Ej lankad"); - tempText.Printf(wxT("%s okand"), dtmf.c_str()); - break; - case TL_NEDERLANDS_NL: - case TL_NEDERLANDS_BE: - text = wxT("Niet gelinkt"); - tempText.Printf(wxT("%s bekend"), dtmf.c_str()); - break; - case TL_NORSK: - text = wxT("Ikke linket"); - tempText.Printf(wxT("%s ukjent"), dtmf.c_str()); - break; - case TL_PORTUGUES: - text = wxT("Desconectado"); - tempText.Printf(wxT("%s desconhecido"), dtmf.c_str()); - break; - default: - text = wxT("Not linked"); - tempText.Printf(wxT("%s unknown"), dtmf.c_str()); - break; - } - - if (direction == DIR_OUTGOING) { - m_linkStatus = LS_NONE; - m_linkRepeater.Clear(); - m_queryTimer.stop(); - - bool res = restoreLinks(); - if (!res) { - CTextData textData1(m_linkStatus, m_linkRepeater, tempText, m_address, m_port, true); - m_repeaterHandler->writeText(textData1); - - CTextData textData2(m_linkStatus, m_linkRepeater, text, m_address, m_port); - m_repeaterHandler->writeText(textData2); - - m_infoAudio->setStatus(m_linkStatus, m_linkRepeater, text); - m_infoAudio->setTempStatus(m_linkStatus, m_linkRepeater, tempText); - triggerInfo(); - } - } else { - CTextData textData(m_linkStatus, m_linkRepeater, tempText, m_address, m_port, true); - m_repeaterHandler->writeText(textData); - - m_infoAudio->setTempStatus(m_linkStatus, m_linkRepeater, tempText); - triggerInfo(); - } } void CRepeaterHandler::writeStatus(CStatusData& statusData) @@ -2900,8 +2591,6 @@ void CRepeaterHandler::suspendLinks() m_linkStatus = LS_NONE; m_linkRepeater.Clear(); m_linkReconnectTimer.stop(); - - m_ccsHandler->setReflector(); } bool CRepeaterHandler::restoreLinks() @@ -2944,27 +2633,3 @@ void CRepeaterHandler::triggerInfo() m_infoNeeded = false; } } - -bool CRepeaterHandler::isCCSCommand(const wxString& command) const -{ - if (command.IsSameAs(wxT("CA "))) - return true; - - wxChar c = command.GetChar(0U); - if (c != wxT('C')) - return false; - - c = command.GetChar(1U); - if (c < wxT('0') || c > wxT('9')) - return false; - - c = command.GetChar(2U); - if (c < wxT('0') || c > wxT('9')) - return false; - - c = command.GetChar(3U); - if (c < wxT('0') || c > wxT('9')) - return false; - - return true; -} diff --git a/Common/RepeaterHandler.h b/Common/RepeaterHandler.h index 5871775..0e1af0c 100644 --- a/Common/RepeaterHandler.h +++ b/Common/RepeaterHandler.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2015 by Jonathan Naylor G4KLX + * Copyright (C) 2010-2015,2018 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 @@ -33,9 +33,7 @@ #include "HeaderLogger.h" #include "CallsignList.h" #include "DRATSServer.h" -#include "CCSCallback.h" #include "VersionUnit.h" -#include "CCSHandler.h" #include "StatusData.h" #include "APRSWriter.h" #include "HeardData.h" @@ -56,7 +54,7 @@ #include -class CRepeaterHandler : public IRepeaterCallback, public IReflectorCallback, public ICCSCallback { +class CRepeaterHandler : public IRepeaterCallback, public IReflectorCallback { public: static void initialise(unsigned int maxRepeaters); @@ -128,10 +126,6 @@ public: virtual void linkRefused(DSTAR_PROTOCOL protocol, const wxString& callsign); virtual bool linkFailed(DSTAR_PROTOCOL protocol, const wxString& callsign, bool isRecoverable); - virtual void ccsLinkMade(const wxString& callsign, DIRECTION direction); - virtual void ccsLinkFailed(const wxString& dtmf, DIRECTION direction); - virtual void ccsLinkEnded(const wxString& callsign, DIRECTION direction); - protected: CRepeaterHandler(const wxString& callsign, const wxString& band, const wxString& address, unsigned int port, HW_TYPE hwType, const wxString& reflector, bool atStartup, RECONNECT reconnect, bool dratsEnabled, double frequency, double offset, double range, double latitude, double longitude, double agl, const wxString& description1, const wxString& description2, const wxString& url, IRepeaterProtocolHandler* handler, unsigned char band1, unsigned char band2, unsigned char band3); virtual ~CRepeaterHandler(); @@ -265,9 +259,6 @@ private: // Poll timer CTimer m_pollTimer; - // CCS - CCCSHandler* m_ccsHandler; - // Reflector restoration wxString m_lastReflector; @@ -277,7 +268,6 @@ private: CTimer m_heardTimer; void g2CommandHandler(const wxString& callsign, const wxString& user, CHeaderData& header); - void ccsCommandHandler(const wxString& callsign, const wxString& user, const wxString& type); void reflectorCommandHandler(const wxString& callsign, const wxString& user, const wxString& type); void sendToOutgoing(const CHeaderData& header); void sendToOutgoing(const CAMBEData& data); @@ -298,8 +288,6 @@ private: bool restoreLinks(); void triggerInfo(); - - bool isCCSCommand(const wxString& command) const; }; #endif diff --git a/Data/CCS_Hosts.txt b/Data/CCS_Hosts.txt deleted file mode 100644 index e572182..0000000 --- a/Data/CCS_Hosts.txt +++ /dev/null @@ -1,15 +0,0 @@ -CCS701 ccs701.xreflector.net -CCS702 ccs702.xreflector.net -CCS703 ccs703.xreflector.net -CCS704 ccs704.xreflector.net -CCS705 ccs705.xreflector.net -CCS706 ccs706.xreflector.net -CCS707 ccs707.xreflector.net -CCS710 ccs710.xreflector.net -CCS711 ccs711.xreflector.net -CCS713 ccs713.xreflector.net -CCS721 ccs721.xreflector.net -CCS722 ccs722.xreflector.net -CCS724 ccs724.xreflector.net -CCS728 ccs728.xreflector.net -CCS732 ccs732.xreflector.net diff --git a/Data/Makefile b/Data/Makefile index 4350c30..7957e04 100644 --- a/Data/Makefile +++ b/Data/Makefile @@ -1,6 +1,5 @@ install: install -d -g bin -o root -m 0775 $(DATADIR) - install -g bin -o root -m 0664 CCS_Hosts.txt $(DATADIR) install -g bin -o root -m 0664 DCS_Hosts.txt $(DATADIR) install -g bin -o root -m 0664 DExtra_Hosts.txt $(DATADIR) install -g bin -o root -m 0664 DPlus_Hosts.txt $(DATADIR) diff --git a/ircDDBGateway32.nsi b/ircDDBGateway32.nsi index 6300ec4..ec64901 100644 --- a/ircDDBGateway32.nsi +++ b/ircDDBGateway32.nsi @@ -59,7 +59,6 @@ Section "Repeater Program Files" SecProgram File "C:\wxWidgets-3.0.4\lib\vc_dll\wxmsw30u_core_vc_custom.dll" File "CHANGES.txt" File "COPYING.txt" - File "Data\CCS_Hosts.txt" File "Data\DCS_Hosts.txt" File "Data\DExtra_Hosts.txt" File "Data\DPlus_Hosts.txt" diff --git a/ircDDBGateway64.nsi b/ircDDBGateway64.nsi index fb1b779..e5a7248 100644 --- a/ircDDBGateway64.nsi +++ b/ircDDBGateway64.nsi @@ -59,7 +59,6 @@ Section "Repeater Program Files" SecProgram File "C:\wxWidgets-3.0.4\lib\vc_x64_dll\wxmsw30u_core_vc_x64_custom.dll" File "CHANGES.txt" File "COPYING.txt" - File "Data\CCS_Hosts.txt" File "Data\DCS_Hosts.txt" File "Data\DExtra_Hosts.txt" File "Data\DPlus_Hosts.txt" From 5a5bfc9e89a18558d740fb4d3a10730d32115d36 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Wed, 19 Sep 2018 15:09:28 +0100 Subject: [PATCH 028/166] Revert "First stage of CCS removal." This reverts commit 9669d865b5be3a8a0f0bcc92b1a3bc394be34d45. --- CHANGES.txt | 5 - Common/AMBEData.cpp | 68 +++- Common/AMBEData.h | 4 +- Common/AudioUnit.cpp | 6 +- Common/CCSCallback.h | 44 +++ Common/CCSData.cpp | 192 +++++++++ Common/CCSData.h | 74 ++++ Common/CCSHandler.cpp | 700 +++++++++++++++++++++++++++++++++ Common/CCSHandler.h | 155 ++++++++ Common/CCSProtocolHandler.cpp | 235 +++++++++++ Common/CCSProtocolHandler.h | 81 ++++ Common/Common.vcxproj | 7 + Common/Common.vcxproj.filters | 21 + Common/ConnectData.cpp | 69 +++- Common/ConnectData.h | 4 +- Common/DStarDefines.h | 8 +- Common/DTMF.cpp | 98 ++++- Common/DTMF.h | 3 +- Common/Defs.h | 10 +- Common/HeaderData.cpp | 32 +- Common/HeaderData.h | 4 +- Common/HeardData.cpp | 41 +- Common/HeardData.h | 4 +- Common/IRCDDBGatewayConfig.cpp | 29 +- Common/IRCDDBGatewayConfig.h | 6 +- Common/Makefile | 2 +- Common/PollData.cpp | 35 +- Common/PollData.h | 4 +- Common/RemoteHandler.cpp | 3 +- Common/RepeaterHandler.cpp | 347 +++++++++++++++- Common/RepeaterHandler.h | 16 +- Data/CCS_Hosts.txt | 15 + Data/Makefile | 1 + ircDDBGateway32.nsi | 1 + ircDDBGateway64.nsi | 1 + 35 files changed, 2286 insertions(+), 39 deletions(-) create mode 100644 Common/CCSCallback.h create mode 100644 Common/CCSData.cpp create mode 100644 Common/CCSData.h create mode 100644 Common/CCSHandler.cpp create mode 100644 Common/CCSHandler.h create mode 100644 Common/CCSProtocolHandler.cpp create mode 100644 Common/CCSProtocolHandler.h create mode 100644 Data/CCS_Hosts.txt diff --git a/CHANGES.txt b/CHANGES.txt index 8afb29f..0661426 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1481,8 +1481,3 @@ Simplify the Linux build. -------- Support the GPS data from the Kenwood TH-D74. - -201809xx --------- - -Remove the CCS support. diff --git a/Common/AMBEData.cpp b/Common/AMBEData.cpp index bc24b1c..c30aacd 100644 --- a/Common/AMBEData.cpp +++ b/Common/AMBEData.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2013,2018 by Jonathan Naylor G4KLX + * Copyright (C) 2010-2013 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 @@ -203,6 +203,28 @@ bool CAMBEData::setDCSData(const unsigned char *data, unsigned int length, const return true; } +bool CAMBEData::setCCSData(const unsigned char *data, unsigned int length, const in_addr& yourAddress, unsigned int yourPort, unsigned int myPort) +{ + wxASSERT(data != NULL); + wxASSERT(length >= 100U); + + m_header.setCCSData(data, length, yourAddress, yourPort, myPort); + + m_id = data[44] * 256U + data[43]; + + m_outSeq = data[45]; + + ::memcpy(m_data, data + 46U, DV_FRAME_LENGTH_BYTES); + + m_rptSeq = data[60] * 65536U + data[59] * 256U + data[58]; + + m_yourAddress = yourAddress; + m_yourPort = yourPort; + m_myPort = myPort; + + return true; +} + unsigned int CAMBEData::getIcomRepeaterData(unsigned char *data, unsigned int length) const { wxASSERT(data != NULL); @@ -408,6 +430,50 @@ unsigned int CAMBEData::getDCSData(unsigned char* data, unsigned int length) con return 100U; } +unsigned int CAMBEData::getCCSData(unsigned char* data, unsigned int length) const +{ + wxASSERT(data != NULL); + wxASSERT(length >= 100U); + + ::memset(data, 0x00U, 100U); + + data[0] = '0'; + data[1] = '0'; + data[2] = '0'; + data[3] = '1'; + + data[43] = m_id % 256U; // Unique session id + data[44] = m_id / 256U; + + data[45] = m_outSeq; + + ::memcpy(data + 46U, m_data, DV_FRAME_LENGTH_BYTES); + + if (isEnd()) { + data[55] = 0x55U; + data[56] = 0x55U; + data[57] = 0x55U; + } + + data[58] = (m_rptSeq >> 0) & 0xFFU; + data[59] = (m_rptSeq >> 8) & 0xFFU; + data[60] = (m_rptSeq >> 16) & 0xFFU; + + data[61] = 0x01U; + data[62] = 0x00U; + + data[63] = 0x21U; + + for (unsigned int i = 0U; i < m_text.Len(); i++) + data[64 + i] = m_text.GetChar(i); + + data[93U] = 0x36U; + + m_header.getCCSData(data, 100U); + + return 100U; +} + unsigned int CAMBEData::getId() const { return m_id; diff --git a/Common/AMBEData.h b/Common/AMBEData.h index 62fb8ff..773df7c 100644 --- a/Common/AMBEData.h +++ b/Common/AMBEData.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2013,2018 by Jonathan Naylor G4KLX + * Copyright (C) 2010-2013 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 @@ -41,12 +41,14 @@ public: bool setDExtraData(const unsigned char* data, unsigned int length, const in_addr& yourAddress, unsigned int yourPort, unsigned int myPort); bool setDPlusData(const unsigned char* data, unsigned int length, const in_addr& yourAddress, unsigned int yourPort, unsigned int myPort); bool setDCSData(const unsigned char* data, unsigned int length, const in_addr& yourAddress, unsigned int yourPort, unsigned int myPort); + bool setCCSData(const unsigned char* data, unsigned int length, const in_addr& yourAddress, unsigned int yourPort, unsigned int myPort); unsigned int getIcomRepeaterData(unsigned char* data, unsigned int length) const; unsigned int getHBRepeaterData(unsigned char* data, unsigned int length) const; unsigned int getDExtraData(unsigned char* data, unsigned int length) const; unsigned int getDPlusData(unsigned char* data, unsigned int length) const; unsigned int getDCSData(unsigned char* data, unsigned int length) const; + unsigned int getCCSData(unsigned char* data, unsigned int length) const; unsigned int getG2Data(unsigned char* data, unsigned int length) const; unsigned int getId() const; diff --git a/Common/AudioUnit.cpp b/Common/AudioUnit.cpp index 36698ad..da9774b 100644 --- a/Common/AudioUnit.cpp +++ b/Common/AudioUnit.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011-2014,2018 by Jonathan Naylor G4KLX + * Copyright (C) 2011-2014 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 @@ -295,7 +295,8 @@ void CAudioUnit::spellReflector(unsigned int id, const wxString &reflector) if (c == wxT(' ')) return; - if (m_linkStatus == LS_LINKING_DCS || m_linkStatus == LS_LINKED_DCS) { + if (m_linkStatus == LS_LINKING_DCS || m_linkStatus == LS_LINKED_DCS || + m_linkStatus == LS_LINKING_CCS || m_linkStatus == LS_LINKED_CCS) { lookup(id, wxString(c)); return; } @@ -466,6 +467,7 @@ void CAudioUnit::sendStatus(LINK_STATUS status, const wxString& reflector, const case LS_NONE: lookup(id, wxT("notlinked")); break; + case LS_LINKED_CCS: case LS_LINKED_DCS: case LS_LINKED_DPLUS: case LS_LINKED_DEXTRA: diff --git a/Common/CCSCallback.h b/Common/CCSCallback.h new file mode 100644 index 0000000..4fc8864 --- /dev/null +++ b/Common/CCSCallback.h @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2013 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 + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef CCSCallback_H +#define CCSCallback_H + +#include "DStarDefines.h" +#include "HeaderData.h" +#include "AMBEData.h" +#include "Defs.h" + +#include + +class ICCSCallback { +public: + virtual bool process(CHeaderData& header, DIRECTION direction, AUDIO_SOURCE source) = 0; + + virtual bool process(CAMBEData& data, DIRECTION direction, AUDIO_SOURCE source) = 0; + + virtual void ccsLinkMade(const wxString& callsign, DIRECTION direction) = 0; + + virtual void ccsLinkFailed(const wxString& dtmf, DIRECTION direction) = 0; + + virtual void ccsLinkEnded(const wxString& callsign, DIRECTION direction) = 0; + +private: +}; + +#endif diff --git a/Common/CCSData.cpp b/Common/CCSData.cpp new file mode 100644 index 0000000..a589f62 --- /dev/null +++ b/Common/CCSData.cpp @@ -0,0 +1,192 @@ +/* + * Copyright (C) 2013 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 + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include "DStarDefines.h" +#include "CCSData.h" +#include "Utils.h" + +CCCSData::CCCSData(const wxString& local, double latitude, double longitude, double frequency, double offset, const wxString& description1, const wxString& description2, const wxString& url, CC_TYPE type) : +m_local(local), +m_remote(), +m_latitude(latitude), +m_longitude(longitude), +m_frequency(frequency), +m_offset(offset), +m_description1(description1), +m_description2(description2), +m_url(url), +m_type(type), +m_yourAddress(), +m_yourPort(0U), +m_myPort(0U) +{ +} + +CCCSData::CCCSData(const wxString& local, const wxString& remote, CC_TYPE type) : +m_local(local), +m_remote(remote), +m_latitude(0.0), +m_longitude(0.0), +m_frequency(0.0), +m_offset(0.0), +m_description1(), +m_description2(), +m_url(), +m_type(type), +m_yourAddress(), +m_yourPort(0U), +m_myPort(0U) +{ +} + +CCCSData::CCCSData() : +m_local(), +m_remote(), +m_latitude(0.0), +m_longitude(0.0), +m_frequency(0.0), +m_offset(0.0), +m_description1(), +m_description2(), +m_url(), +m_type(), +m_yourAddress(), +m_yourPort(0U), +m_myPort(0U) +{ +} + +CCCSData::~CCCSData() +{ +} + +bool CCCSData::setCCSData(const unsigned char *data, unsigned int length, const in_addr& yourAddress, unsigned int yourPort, unsigned int myPort) +{ + wxASSERT(data != NULL); + + switch (length) { + case 100U: + m_remote = wxString((char*)(data + 0U), wxConvLocal, LONG_CALLSIGN_LENGTH); + + if (::memcmp(data + 8U, "0001", 4U) == 0) { + m_type = CT_TERMINATE; + } else { + // CUtils::dump(wxT("Invalid CCS packet"), data, length); + return false; + } + + m_local = wxString((char*)(data + 12U), wxConvLocal, LONG_CALLSIGN_LENGTH); + break; + + case 20U: + if (::memcmp(data + 0U, "DTMF_CALL:", 10U) == 0) { + m_type = CT_DTMFFOUND; + } else { + CUtils::dump(wxT("Invalid CCS packet"), data, length); + return false; + } + + m_remote = wxString((char*)(data + 10U), wxConvLocal, LONG_CALLSIGN_LENGTH); + break; + + case 17U: + if (::memcmp(data + 0U, "NODTMFCALL", 10U) == 0) { + m_type = CT_DTMFNOTFOUND; + } else { + CUtils::dump(wxT("Invalid CCS packet"), data, length); + return false; + } + break; + + default: + CUtils::dump(wxT("Invalid CCS packet"), data, length); + return false; + } + + m_yourAddress = yourAddress; + m_yourPort = yourPort; + m_myPort = myPort; + + return true; +} + +unsigned int CCCSData::getCCSData(unsigned char* data, unsigned int length) const +{ + wxASSERT(data != NULL); + wxASSERT(length >= 133U); + + if (m_type == CT_TERMINATE) { + ::memset(data, ' ', 38U); + + for (unsigned int i = 0U; i < m_remote.Len() && i < LONG_CALLSIGN_LENGTH; i++) + data[i + 0U] = m_remote.GetChar(i); + + ::memcpy(data + 8U, "0001", 4U); + + for (unsigned int i = 0U; i < m_local.Len() && i < LONG_CALLSIGN_LENGTH; i++) + data[i + 12U] = m_local.GetChar(i); + + return 38U; + } else if (m_type == CT_INFO) { + wxString buffer; + buffer.Printf(wxT("IRPT%.7s %s%-10.4lf%-10.4lf%-10.4lf%-10.4lf%-20s%-20s%-40s"), m_local.Mid(0U, LONG_CALLSIGN_LENGTH - 1U).c_str(), m_local.Mid(LONG_CALLSIGN_LENGTH - 1U, 1U).c_str(), m_latitude, m_longitude, m_frequency, m_offset, m_description1.c_str(), m_description2.c_str(), m_url.c_str()); + + for (unsigned int i = 0U; i < buffer.Len() && i < 133U; i++) + data[i] = buffer.GetChar(i); + + return 133U; + } + + return 0U; +} + +wxString CCCSData::getLocal() const +{ + return m_local; +} + +wxString CCCSData::getRemote() const +{ + return m_remote; +} + +CC_TYPE CCCSData::getType() const +{ + return m_type; +} + +void CCCSData::setDestination(const in_addr& address, unsigned int port) +{ + m_yourAddress = address; + m_yourPort = port; +} + +in_addr CCCSData::getYourAddress() const +{ + return m_yourAddress; +} + +unsigned int CCCSData::getYourPort() const +{ + return m_yourPort; +} + +unsigned int CCCSData::getMyPort() const +{ + return m_myPort; +} diff --git a/Common/CCSData.h b/Common/CCSData.h new file mode 100644 index 0000000..1488dcd --- /dev/null +++ b/Common/CCSData.h @@ -0,0 +1,74 @@ +/* + * Copyright (C) 2013 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 + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef CCSData_H +#define CCSData_H + +#include + +#if defined(__WINDOWS__) +#include "Inaddr.h" +#else +#include +#endif + +enum CC_TYPE { + CT_TERMINATE, + CT_DTMFNOTFOUND, + CT_DTMFFOUND, + CT_INFO +}; + +class CCCSData { +public: + CCCSData(const wxString& local, double latitude, double longitude, double frequency, double offset, const wxString& description1, const wxString& description2, const wxString& url, CC_TYPE type); + CCCSData(const wxString& local, const wxString& remote, CC_TYPE type); + CCCSData(); + ~CCCSData(); + + bool setCCSData(const unsigned char* data, unsigned int length, const in_addr& yourAddress, unsigned int yourPort, unsigned int myPort); + + unsigned int getCCSData(unsigned char* data, unsigned int length) const; + + void setDestination(const in_addr& address, unsigned int port); + + wxString getLocal() const; + wxString getRemote() const; + CC_TYPE getType() const; + + in_addr getYourAddress() const; + unsigned int getYourPort() const; + unsigned int getMyPort() const; + +private: + wxString m_local; + wxString m_remote; + double m_latitude; + double m_longitude; + double m_frequency; + double m_offset; + wxString m_description1; + wxString m_description2; + wxString m_url; + CC_TYPE m_type; + in_addr m_yourAddress; + unsigned int m_yourPort; + unsigned int m_myPort; +}; + +#endif diff --git a/Common/CCSHandler.cpp b/Common/CCSHandler.cpp new file mode 100644 index 0000000..470d648 --- /dev/null +++ b/Common/CCSHandler.cpp @@ -0,0 +1,700 @@ +/* + * Copyright (C) 2013,2014 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 + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include "RepeaterHandler.h" +#include "DStarDefines.h" +#include "CCSHandler.h" +#include "Utils.h" + + +CCCSHandler** CCCSHandler::m_handlers = NULL; + +unsigned int CCCSHandler::m_count = 0U; + +wxString CCCSHandler::m_localAddress; +CHeaderLogger* CCCSHandler::m_headerLogger = NULL; + +wxString CCCSHandler::m_ccsHost; + +CCCSCache_t CCCSHandler::m_cache; +wxMutex CCCSHandler::m_mutex; + +bool CCCSHandler::m_stateChange = false; + + +void CCCSHandler::initialise(unsigned int count) +{ + wxASSERT(count > 0U); + + m_count = count; + m_handlers = new CCCSHandler*[m_count]; + + for (unsigned int i = 0U; i < m_count; i++) + m_handlers[i] = NULL; +} + +void CCCSHandler::setLocalAddress(const wxString& address) +{ + m_localAddress = address; +} + +void CCCSHandler::setHeaderLogger(CHeaderLogger* logger) +{ + m_headerLogger = logger; +} + +void CCCSHandler::setHost(const wxString& host) +{ + m_ccsHost = host; +} + +void CCCSHandler::process() +{ + for (unsigned int i = 0U; i < m_count; i++) { + if (m_handlers[i] != NULL) + m_handlers[i]->processInt(); + } +} + +void CCCSHandler::disconnect() +{ + for (unsigned int i = 0U; i < m_count; i++) { + if (m_handlers[i] != NULL) + m_handlers[i]->disconnectInt(); + } +} + +void CCCSHandler::clock(unsigned int ms) +{ + for (unsigned int i = 0U; i < m_count; i++) { + if (m_handlers[i] != NULL) + m_handlers[i]->clockInt(ms); + } +} + +void CCCSHandler::getInfo(ICCSCallback* handler, CRemoteRepeaterData& data) +{ + wxASSERT(handler != NULL); + + for (unsigned int i = 0U; i < m_count; i++) { + CCCSHandler* ccs = m_handlers[i]; + if (ccs != NULL && ccs->m_handler == handler && ccs->m_state == CS_ACTIVE) + data.addLink(ccs->m_yourCall, PROTO_CCS, true, ccs->m_direction, false); + } +} + +wxString CCCSHandler::getIncoming(const wxString& callsign) +{ + wxString incoming; + + for (unsigned int i = 0U; i < m_count; i++) { + CCCSHandler* handler = m_handlers[i]; + if (handler != NULL && handler->m_direction == DIR_INCOMING && handler->m_state == CS_ACTIVE && handler->m_callsign.IsSameAs(callsign)) { + incoming.Append(handler->m_yourCall); + incoming.Append(wxT(" ")); + } + } + + return incoming; +} + +void CCCSHandler::finalise() +{ + for (unsigned int i = 0U; i < m_count; i++) + delete m_handlers[i]; + + delete[] m_handlers; +} + +CCCSHandler::CCCSHandler(ICCSCallback* handler, const wxString& callsign, unsigned int delay, double latitude, double longitude, double frequency, double offset, const wxString& description1, const wxString& description2, const wxString& url, unsigned int localPort) : +m_handler(handler), +m_callsign(callsign), +m_reflector(), +m_latitude(latitude), +m_longitude(longitude), +m_frequency(frequency), +m_offset(offset), +m_description1(description1), +m_description2(description2), +m_url(url), +m_ccsAddress(), +m_protocol(localPort, m_localAddress), +m_state(CS_DISABLED), +m_local(), +m_announceTimer(1000U, 20U), // 20 seconds +m_inactivityTimer(1000U, 300U), // 5 minutes +m_pollInactivityTimer(1000U, 60U), // 60 seconds +m_pollTimer(1000U, 10U), // 10 seconds +m_waitTimer(1000U, delay), +m_tryTimer(1000U, 1U), // 1 second +m_tryCount(0U), +m_id(0x00U), +m_seqNo(0U), +m_time(), +m_direction(DIR_OUTGOING), +m_yourCall(), +m_myCall1(), +m_myCall2(), +m_rptCall1() +{ + wxASSERT(handler != NULL); + + // Add to the global list + for (unsigned int i = 0U; i < m_count; i++) { + if (m_handlers[i] == NULL) { + m_handlers[i] = this; + break; + } + } +} + +CCCSHandler::~CCCSHandler() +{ +} + +void CCCSHandler::setReflector(const wxString& callsign) +{ + m_reflector = callsign; + + if (m_reflector.IsEmpty()) + m_reflector = wxT(" "); +} + +void CCCSHandler::processInt() +{ + if (m_state == CS_DISABLED) + return; + + for (;;) { + CCS_TYPE type = m_protocol.read(); + + switch (type) { + case CT_DATA: { + CAMBEData* data = m_protocol.readData(); + if (data != NULL) { + process(*data); + delete data; + } + } + break; + + case CT_POLL: { + CPollData* poll = m_protocol.readPoll(); + if (poll != NULL) { + process(*poll); + delete poll; + } + } + break; + + case CT_CONNECT: { + CConnectData* connect = m_protocol.readConnect(); + if (connect != NULL) { + process(*connect); + delete connect; + } + } + break; + + case CT_MISC: { + CCCSData* data = m_protocol.readMisc(); + if (data != NULL) { + process(*data); + delete data; + } + } + break; + + default: + return; + } + } +} + +void CCCSHandler::process(CAMBEData& data) +{ + CHeaderData& header = data.getHeader(); + wxString myCall1 = header.getMyCall1(); + wxString rptCall1 = header.getRptCall1(); + wxString yourCall = header.getYourCall(); + unsigned int seqNo = data.getSeq(); + unsigned int id = data.getId(); + + if (m_state != CS_CONNECTED && m_state != CS_ACTIVE) + return; + + // This is a new incoming CCS call + if (m_state == CS_CONNECTED) { + m_yourCall = myCall1; + m_local = yourCall; + m_rptCall1 = rptCall1; + m_direction = DIR_INCOMING; + m_time = ::time(NULL); + m_state = CS_ACTIVE; + m_stateChange = true; + m_inactivityTimer.start(); + + m_handler->ccsLinkMade(m_yourCall, m_direction); + + wxLogMessage(wxT("CCS: New incoming link to %s from %s @ %s"), m_local.c_str(), m_yourCall.c_str(), m_rptCall1.c_str()); + } else { + if (!m_yourCall.IsSameAs(myCall1) && !m_rptCall1.IsSameAs(rptCall1)) { + wxLogMessage(wxT("CCS: Rejecting new incoming CCS link from %s @ %s to %s"), myCall1.c_str(), rptCall1.c_str(), yourCall.c_str()); + + CCCSData data(yourCall, myCall1, CT_TERMINATE); + data.setDestination(m_ccsAddress, CCS_PORT); + + m_protocol.writeMisc(data); + m_protocol.writeMisc(data); + m_protocol.writeMisc(data); + m_protocol.writeMisc(data); + m_protocol.writeMisc(data); + + return; + } + + // Allow for the fact that the distant repeater may change during the QSO + if (m_yourCall.IsSameAs(myCall1) && !m_rptCall1.IsSameAs(rptCall1)) { + wxLogMessage(wxT("CCS: %s has moved from repeater %s to %s"), m_yourCall.c_str(), m_rptCall1.c_str(), rptCall1.c_str()); + m_rptCall1 = rptCall1; + } + } + + m_pollInactivityTimer.start(); + m_inactivityTimer.start(); + + if (m_id != id) { + // Write to Header.log if it's enabled + if (m_headerLogger != NULL) + m_headerLogger->write(wxT("CCS"), header); + + header.setCQCQCQ(); + m_handler->process(header, DIR_INCOMING, AS_CCS); + + m_id = id; + } else if (seqNo == 0U) { + header.setCQCQCQ(); + m_handler->process(header, DIR_INCOMING, AS_DUP); + } + + m_handler->process(data, DIR_INCOMING, AS_CCS); +} + +void CCCSHandler::process(CCCSData& data) +{ + CC_TYPE type = data.getType(); + + switch (type) { + case CT_TERMINATE: + if (m_state == CS_ACTIVE) { + wxLogMessage(wxT("CCS: Link between %s and %s has been terminated"), data.getLocal().c_str(), data.getRemote().c_str()); + m_stateChange = true; + m_state = CS_CONNECTED; + m_inactivityTimer.stop(); + m_handler->ccsLinkEnded(data.getRemote(), m_direction); + } + break; + + case CT_DTMFNOTFOUND: + wxLogMessage(wxT("CCS: Cannot map %s to a callsign"), m_yourCall.c_str()); + m_stateChange = true; + m_state = CS_CONNECTED; + m_inactivityTimer.stop(); + m_handler->ccsLinkFailed(m_yourCall, m_direction); + break; + + case CT_DTMFFOUND: + wxLogMessage(wxT("CCS: Mapped %s to %s, added to the cache"), m_yourCall.c_str(), data.getRemote().c_str()); + addToCache(m_yourCall, data.getRemote()); + m_stateChange = true; + m_yourCall = data.getRemote(); + m_rptCall1 = data.getRemote(); + m_handler->ccsLinkMade(m_yourCall, m_direction); + break; + + default: + break; + } +} + +void CCCSHandler::process(CPollData&) +{ + m_pollInactivityTimer.start(); +} + +void CCCSHandler::process(CConnectData& connect) +{ + CD_TYPE type = connect.getType(); + + if (type == CT_ACK && m_state == CS_CONNECTING) { + wxLogMessage(wxT("CCS: %s connected to server %s"), m_callsign.c_str(), m_ccsHost.c_str()); + + m_announceTimer.start(); + m_pollInactivityTimer.start(); + m_pollTimer.start(); + m_tryTimer.stop(); + + // Give our location, frequency, etc + CCCSData data(m_callsign, m_latitude, m_longitude, m_frequency, m_offset, m_description1, m_description2, m_url, CT_INFO); + data.setDestination(m_ccsAddress, CCS_PORT); + m_protocol.writeMisc(data); + + m_state = CS_CONNECTED; + + return; + } + + if (type == CT_NAK && m_state == CS_CONNECTING) { + wxLogMessage(wxT("CCS: Connection refused for %s"), m_callsign.c_str()); + m_tryTimer.stop(); + m_state = CS_DISABLED; + return; + } +} + +bool CCCSHandler::connect() +{ + // Is CCS disabled? + if (m_localAddress.IsSameAs(wxT("127.0.0.1"))) + return false; + + // Can we resolve the CCS server address? + m_ccsAddress = CUDPReaderWriter::lookup(m_ccsHost); + if (m_ccsAddress.s_addr == INADDR_NONE) { + wxLogError(wxT("CCS: Unable to find the IP address for %s"), m_ccsHost.c_str()); + return false; + } + + bool res = m_protocol.open(); + if (!res) + return false; + + wxLogMessage(wxT("CCS: Opening UDP port %u for %s"), m_protocol.getPort(), m_callsign.c_str()); + + m_waitTimer.start(); + + m_state = CS_CONNECTING; + + return true; +} + +void CCCSHandler::disconnectInt() +{ + if (m_state == CS_CONNECTED || m_state == CS_ACTIVE) { + CConnectData connect(m_callsign, CT_UNLINK, m_ccsAddress, CCS_PORT); + m_protocol.writeConnect(connect); + } + + m_announceTimer.stop(); + m_pollInactivityTimer.stop(); + m_inactivityTimer.stop(); + m_pollTimer.stop(); + m_tryTimer.stop(); + + if (m_state != CS_DISABLED) + m_protocol.close(); + + m_state = CS_DISABLED; +} + +void CCCSHandler::startLink(const wxString& dtmf, const wxString& user, const wxString& type) +{ + if (m_state != CS_CONNECTED) + return; + + wxString callsign = findInCache(dtmf); + if (!callsign.IsEmpty()) { + wxLogMessage(wxT("CCS: New outgoing link to %s/%s via %s by %s"), dtmf.c_str(), callsign.c_str(), type.c_str(), user.c_str()); + m_handler->ccsLinkMade(callsign, m_direction); + m_yourCall = callsign; + m_rptCall1 = callsign; + } else { + wxLogMessage(wxT("CCS: New outgoing link to %s via %s by %s"), dtmf.c_str(), type.c_str(), user.c_str()); + m_yourCall = dtmf; + m_yourCall.resize(LONG_CALLSIGN_LENGTH, wxT(' ')); + m_rptCall1.Clear(); + } + + m_local = user; + m_seqNo = 0U; + + m_time = ::time(NULL); + m_stateChange = true; + m_state = CS_ACTIVE; + m_direction = DIR_OUTGOING; + m_inactivityTimer.start(); +} + +void CCCSHandler::stopLink(const wxString& user, const wxString& type) +{ + if (m_state != CS_ACTIVE) + return; + + if (!user.IsEmpty() && !type.IsEmpty()) + wxLogMessage(wxT("CCS: Link to %s from %s has been terminated via %s by %s"), m_yourCall.c_str(), m_local.c_str(), type.c_str(), user.c_str()); + + CCCSData data(m_local, m_yourCall, CT_TERMINATE); + data.setDestination(m_ccsAddress, CCS_PORT); + + m_protocol.writeMisc(data); + m_protocol.writeMisc(data); + m_protocol.writeMisc(data); + m_protocol.writeMisc(data); + m_protocol.writeMisc(data); + + m_stateChange = true; + m_state = CS_CONNECTED; + m_inactivityTimer.stop(); + + m_handler->ccsLinkEnded(m_yourCall, m_direction); +} + +void CCCSHandler::unlink(const wxString& callsign) +{ + if (m_state != CS_ACTIVE) + return; + + if (!m_yourCall.IsSameAs(callsign)) + return; + + wxLogMessage(wxT("CCS: Link to %s from %s has been terminated by command"), m_yourCall.c_str(), m_local.c_str()); + + CCCSData data(m_local, m_yourCall, CT_TERMINATE); + data.setDestination(m_ccsAddress, CCS_PORT); + + m_protocol.writeMisc(data); + m_protocol.writeMisc(data); + m_protocol.writeMisc(data); + m_protocol.writeMisc(data); + m_protocol.writeMisc(data); + + m_stateChange = true; + m_state = CS_CONNECTED; + m_inactivityTimer.stop(); + + m_handler->ccsLinkEnded(m_yourCall, m_direction); +} + +void CCCSHandler::writeHeard(CHeaderData& header) +{ + if (m_state != CS_CONNECTED && m_state != CS_ACTIVE) + return; + + CHeardData heard(header, m_callsign, m_reflector); + heard.setDestination(m_ccsAddress, CCS_PORT); + m_protocol.writeHeard(heard); +} + +void CCCSHandler::writeHeader(CHeaderData& header) +{ + m_myCall1 = header.getMyCall1(); + m_myCall2 = header.getMyCall2(); + + m_seqNo = 0U; +} + +void CCCSHandler::writeAMBE(CAMBEData& data) +{ + if (m_state != CS_ACTIVE) + return; + + CAMBEData temp(data); + + CHeaderData& header = temp.getHeader(); + header.setMyCall1(m_myCall1); + header.setMyCall2(m_myCall2); + header.setYourCall(m_yourCall); + header.setRptCall1(m_callsign); + header.setRptCall2(m_reflector); + + temp.setRptSeq(m_seqNo++); + temp.setDestination(m_ccsAddress, CCS_PORT); + m_protocol.writeData(temp); +} + +CCS_STATUS CCCSHandler::getStatus() const +{ + return m_state; +} + +void CCCSHandler::clockInt(unsigned int ms) +{ + m_announceTimer.clock(ms); + m_pollInactivityTimer.clock(ms); + m_inactivityTimer.clock(ms); + m_pollTimer.clock(ms); + m_waitTimer.clock(ms); + m_tryTimer.clock(ms); + + if (m_pollInactivityTimer.isRunning() && m_pollInactivityTimer.hasExpired()) { + wxLogMessage(wxT("CCS: Connection has failed (poll inactivity) for %s, reconnecting"), m_callsign.c_str()); + + m_announceTimer.stop(); + m_pollInactivityTimer.stop(); + m_inactivityTimer.stop(); + m_pollTimer.stop(); + + if (m_state == CS_ACTIVE) { + m_stateChange = true; + m_handler->ccsLinkEnded(m_yourCall, m_direction); + } + + m_waitTimer.start(); + + m_state = CS_CONNECTING; + + return; + } + + if (m_tryTimer.isRunning() && m_tryTimer.hasExpired()) { + CConnectData connect(m_callsign, CT_LINK1, m_ccsAddress, CCS_PORT); + if (m_latitude != 0.0 && m_longitude != 0.0) { + wxString locator = CUtils::latLonToLoc(m_latitude, m_longitude); + connect.setLocator(locator); + } + m_protocol.writeConnect(connect); + + unsigned int t = calcBackoff(); + m_tryTimer.start(t); + } + + if (m_pollTimer.isRunning() && m_pollTimer.hasExpired()) { + CPollData poll(m_callsign, m_ccsAddress, CCS_PORT); + m_protocol.writePoll(poll); + + m_pollTimer.start(); + } + + if (m_inactivityTimer.isRunning() && m_inactivityTimer.hasExpired()) { + wxLogMessage(wxT("CCS: Activity timeout on link for %s"), m_callsign.c_str(), m_callsign.c_str()); + + CCCSData data(m_local, m_yourCall, CT_TERMINATE); + data.setDestination(m_ccsAddress, CCS_PORT); + + m_protocol.writeMisc(data); + m_protocol.writeMisc(data); + m_protocol.writeMisc(data); + m_protocol.writeMisc(data); + m_protocol.writeMisc(data); + + m_stateChange = true; + m_state = CS_CONNECTED; + m_inactivityTimer.stop(); + + m_handler->ccsLinkEnded(m_yourCall, m_direction); + } + + if (m_waitTimer.isRunning() && m_waitTimer.hasExpired()) { + CConnectData connect(m_callsign, CT_LINK1, m_ccsAddress, CCS_PORT); + if (m_latitude != 0.0 && m_longitude != 0.0) { + wxString locator = CUtils::latLonToLoc(m_latitude, m_longitude); + connect.setLocator(locator); + } + m_protocol.writeConnect(connect); + + m_tryTimer.start(1U); + m_tryCount = 1U; + + m_waitTimer.stop(); + } + + if (m_announceTimer.isRunning() && m_announceTimer.hasExpired()) { + CHeaderData header; + header.setMyCall1(m_callsign.Left(LONG_CALLSIGN_LENGTH - 1U)); + CHeardData heard(header, m_callsign, wxEmptyString); + heard.setDestination(m_ccsAddress, CCS_PORT); + m_protocol.writeHeard(heard); + + m_announceTimer.start(3600U); + } +} + +unsigned int CCCSHandler::calcBackoff() +{ + if (m_tryCount >= 7U) { + m_tryCount++; + return 60U; + } + + unsigned int timeout = 1U; + + for (unsigned int i = 0U; i < m_tryCount; i++) + timeout *= 2U; + + m_tryCount++; + + if (timeout > 60U) + return 60U; + else + return timeout; +} + +bool CCCSHandler::stateChange() +{ + bool stateChange = m_stateChange; + + m_stateChange = false; + + return stateChange; +} + +void CCCSHandler::writeStatus(wxFFile& file) +{ + for (unsigned int i = 0U; i < m_count; i++) { + CCCSHandler* handler = m_handlers[i]; + if (handler != NULL) { + struct tm* tm = ::gmtime(&handler->m_time); + + switch (handler->m_direction) { + case DIR_OUTGOING: + if (handler->m_state == CS_ACTIVE) { + wxString text; + text.Printf(wxT("%04d-%02d-%02d %02d:%02d:%02d: CCS link - Rptr: %s Remote: %s Dir: Outgoing\n"), + tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec, + handler->m_callsign.c_str(), handler->m_yourCall.c_str()); + file.Write(text); + } + break; + + case DIR_INCOMING: + if (handler->m_state == CS_ACTIVE) { + wxString text; + text.Printf(wxT("%04d-%02d-%02d %02d:%02d:%02d: CCS link - Rptr: %s Remote: %s Dir: Incoming\n"), + tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec, + handler->m_callsign.c_str(), handler->m_yourCall.c_str()); + file.Write(text); + } + break; + } + } + } +} + +void CCCSHandler::addToCache(const wxString& dtmf, const wxString& callsign) +{ + wxMutexLocker locker(m_mutex); + + m_cache[dtmf] = callsign; +} + +wxString CCCSHandler::findInCache(const wxString& dtmf) +{ + wxMutexLocker locker(m_mutex); + + return m_cache[dtmf]; +} diff --git a/Common/CCSHandler.h b/Common/CCSHandler.h new file mode 100644 index 0000000..81f5a1a --- /dev/null +++ b/Common/CCSHandler.h @@ -0,0 +1,155 @@ +/* + * Copyright (C) 2013 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 + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef CCSHandler_H +#define CCSHandler_H + +#include "CCSProtocolHandler.h" +#include "DStarDefines.h" +#include "HeaderLogger.h" +#include "ConnectData.h" +#include "CCSCallback.h" +#include "AMBEData.h" +#include "PollData.h" +#include "Timer.h" +#include "Defs.h" + +#if defined(__WINDOWS__) +#include "Inaddr.h" +#else +#include +#endif + +#include +#include + +enum CCS_STATUS { + CS_DISABLED, + CS_CONNECTING, + CS_CONNECTED, + CS_ACTIVE +}; + +WX_DECLARE_STRING_HASH_MAP(wxString, CCCSCache_t); + +class CCCSHandler { +public: + CCCSHandler(ICCSCallback* handler, const wxString& callsign, unsigned int delay, double latitude, double longitude, double frequency, double offset, const wxString& description1, const wxString& description2, const wxString& url, unsigned int localPort); + ~CCCSHandler(); + + bool connect(); + + void writeHeard(CHeaderData& header); + void writeHeader(CHeaderData& header); + void writeAMBE(CAMBEData& data); + + void startLink(const wxString& dtmf, const wxString& user, const wxString& type); + void stopLink(const wxString& user = wxEmptyString, const wxString& type = wxEmptyString); + + void unlink(const wxString& callsign); + + void setReflector(const wxString& callsign = wxEmptyString); + + CCS_STATUS getStatus() const; + + static void disconnect(); + + static void initialise(unsigned int count); + + static void process(); + + static void clock(unsigned int ms); + + static void setHeaderLogger(CHeaderLogger* logger); + + static void setLocalAddress(const wxString& address); + + static void setHost(const wxString& host); + + static bool stateChange(); + static void writeStatus(wxFFile& file); + + static void getInfo(ICCSCallback* handler, CRemoteRepeaterData& data); + + static wxString getIncoming(const wxString& callsign); + + static void finalise(); + +protected: + void clockInt(unsigned int ms); + + void processInt(); + + void disconnectInt(); + +private: + static CCCSHandler** m_handlers; + static unsigned int m_count; + + static wxString m_localAddress; + static CHeaderLogger* m_headerLogger; + + static wxString m_ccsHost; + + static CCCSCache_t m_cache; + static wxMutex m_mutex; + + static bool m_stateChange; + + ICCSCallback* m_handler; + wxString m_callsign; + wxString m_reflector; + double m_latitude; + double m_longitude; + double m_frequency; + double m_offset; + wxString m_description1; + wxString m_description2; + wxString m_url; + in_addr m_ccsAddress; + CCCSProtocolHandler m_protocol; + CCS_STATUS m_state; + wxString m_local; + CTimer m_announceTimer; + CTimer m_inactivityTimer; + CTimer m_pollInactivityTimer; + CTimer m_pollTimer; + CTimer m_waitTimer; + CTimer m_tryTimer; + unsigned int m_tryCount; + unsigned int m_id; + unsigned int m_seqNo; + time_t m_time; + DIRECTION m_direction; + wxString m_yourCall; + wxString m_myCall1; + wxString m_myCall2; + wxString m_rptCall1; + + void process(CAMBEData& header); + void process(CPollData& data); + void process(CConnectData& connect); + void process(CCCSData& data); + + unsigned int calcBackoff(); + + static void addToCache(const wxString& dtmf, const wxString& callsign); + static wxString findInCache(const wxString& dtmf); +}; + +#endif diff --git a/Common/CCSProtocolHandler.cpp b/Common/CCSProtocolHandler.cpp new file mode 100644 index 0000000..9c22456 --- /dev/null +++ b/Common/CCSProtocolHandler.cpp @@ -0,0 +1,235 @@ +/* + * Copyright (C) 2013 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 + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include "CCSProtocolHandler.h" + +#include "DStarDefines.h" +#include "Utils.h" + +// #define DUMP_TX + +const unsigned int BUFFER_LENGTH = 2000U; + +CCCSProtocolHandler::CCCSProtocolHandler(unsigned int port, const wxString& addr) : +m_socket(addr, port), +m_type(CT_NONE), +m_buffer(NULL), +m_length(0U), +m_yourAddress(), +m_yourPort(0U), +m_myPort(port) +{ + m_buffer = new unsigned char[BUFFER_LENGTH]; +} + +CCCSProtocolHandler::~CCCSProtocolHandler() +{ + delete[] m_buffer; +} + +bool CCCSProtocolHandler::open() +{ + return m_socket.open(); +} + +unsigned int CCCSProtocolHandler::getPort() const +{ + return m_myPort; +} + +bool CCCSProtocolHandler::writeData(const CAMBEData& data) +{ + unsigned char buffer[100U]; + unsigned int length = data.getCCSData(buffer, 100U); + +#if defined(DUMP_TX) + CUtils::dump(wxT("Sending Data"), buffer, length); +#endif + + return m_socket.write(buffer, length, data.getYourAddress(), data.getYourPort()); +} + +bool CCCSProtocolHandler::writePoll(const CPollData& poll) +{ + unsigned char buffer[30U]; + unsigned int length = poll.getCCSData(buffer, 30U); + +#if defined(DUMP_TX) + CUtils::dump(wxT("Sending Poll"), buffer, length); +#endif + + return m_socket.write(buffer, length, poll.getYourAddress(), poll.getYourPort()); +} + +bool CCCSProtocolHandler::writeHeard(const CHeardData& heard) +{ + unsigned char buffer[100U]; + unsigned int length = heard.getCCSData(buffer, 100U); + +#if defined(DUMP_TX) + CUtils::dump(wxT("Sending Heard"), buffer, length); +#endif + + return m_socket.write(buffer, length, heard.getAddress(), heard.getPort()); +} + +bool CCCSProtocolHandler::writeConnect(const CConnectData& connect) +{ + unsigned char buffer[40U]; + unsigned int length = connect.getCCSData(buffer, 40U); + +#if defined(DUMP_TX) + CUtils::dump(wxT("Sending Connect"), buffer, length); +#endif + + return m_socket.write(buffer, length, connect.getYourAddress(), connect.getYourPort()); +} + +bool CCCSProtocolHandler::writeMisc(const CCCSData& data) +{ + unsigned char buffer[140U]; + unsigned int length = data.getCCSData(buffer, 140U); + +#if defined(DUMP_TX) + CUtils::dump(wxT("Sending Misc"), buffer, length); +#endif + + return m_socket.write(buffer, length, data.getYourAddress(), data.getYourPort()); +} + +CCS_TYPE CCCSProtocolHandler::read() +{ + bool res = true; + + // Loop until we have no more data from the socket or we have data for the higher layers + while (res) + res = readPackets(); + + return m_type; +} + +bool CCCSProtocolHandler::readPackets() +{ + m_type = CT_NONE; + + // No more data? + int length = m_socket.read(m_buffer, BUFFER_LENGTH, m_yourAddress, m_yourPort); + if (length <= 0) + return false; + + m_length = length; + + if (m_buffer[0] == '0' && m_buffer[1] == '0' && m_buffer[2] == '0' && m_buffer[3] == '1') { + m_type = CT_DATA; + return false; + } else if (m_buffer[0] == 'L' && m_buffer[1] == 'L' && m_buffer[2] == 'L') { + return true; + } else { + switch (m_length) { + case 14U: + m_type = CT_CONNECT; + return false; + case 25U: + m_type = CT_POLL; + return false; + case 100U: + case 20U: + case 17U: + m_type = CT_MISC; + return false; + case 39U: + return true; + default: + break; + } + } + + // An unknown type + CUtils::dump(wxT("Unknown packet type from CCS"), m_buffer, m_length); + + return true; +} + +CAMBEData* CCCSProtocolHandler::readData() +{ + if (m_type != CT_DATA) + return NULL; + + CAMBEData* data = new CAMBEData; + + bool res = data->setCCSData(m_buffer, m_length, m_yourAddress, m_yourPort, m_myPort); + if (!res) { + delete data; + return NULL; + } + + return data; +} + +CConnectData* CCCSProtocolHandler::readConnect() +{ + if (m_type != CT_CONNECT) + return NULL; + + CConnectData* connect = new CConnectData; + + bool res = connect->setCCSData(m_buffer, m_length, m_yourAddress, m_yourPort, m_myPort); + if (!res) { + delete connect; + return NULL; + } + + return connect; +} + +CPollData* CCCSProtocolHandler::readPoll() +{ + if (m_type != CT_POLL) + return NULL; + + CPollData* poll = new CPollData; + + bool res = poll->setCCSData(m_buffer, m_length, m_yourAddress, m_yourPort, m_myPort); + if (!res) { + delete poll; + return NULL; + } + + return poll; +} + +CCCSData* CCCSProtocolHandler::readMisc() +{ + if (m_type != CT_MISC) + return NULL; + + CCCSData* data = new CCCSData; + + bool res = data->setCCSData(m_buffer, m_length, m_yourAddress, m_yourPort, m_myPort); + if (!res) { + delete data; + return NULL; + } + + return data; +} + +void CCCSProtocolHandler::close() +{ + m_socket.close(); +} diff --git a/Common/CCSProtocolHandler.h b/Common/CCSProtocolHandler.h new file mode 100644 index 0000000..87bc9f1 --- /dev/null +++ b/Common/CCSProtocolHandler.h @@ -0,0 +1,81 @@ +/* + * Copyright (C) 2013 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 + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef CCSProtocolHandler_H +#define CCSProtocolHandler_H + +#include "UDPReaderWriter.h" +#include "DStarDefines.h" +#include "ConnectData.h" +#include "HeardData.h" +#include "AMBEData.h" +#include "PollData.h" +#include "CCSData.h" + +#if defined(__WINDOWS__) +#include "Inaddr.h" +#else +#include +#endif + +#include + +enum CCS_TYPE { + CT_NONE, + CT_DATA, + CT_POLL, + CT_CONNECT, + CT_MISC +}; + +class CCCSProtocolHandler { +public: + CCCSProtocolHandler(unsigned int port, const wxString& addr = wxEmptyString); + ~CCCSProtocolHandler(); + + bool open(); + + unsigned int getPort() const; + + bool writeData(const CAMBEData& data); + bool writeConnect(const CConnectData& connect); + bool writePoll(const CPollData& poll); + bool writeHeard(const CHeardData& heard); + bool writeMisc(const CCCSData& data); + + CCS_TYPE read(); + CAMBEData* readData(); + CPollData* readPoll(); + CConnectData* readConnect(); + CCCSData* readMisc(); + + void close(); + +private: + CUDPReaderWriter m_socket; + CCS_TYPE m_type; + unsigned char* m_buffer; + unsigned int m_length; + in_addr m_yourAddress; + unsigned int m_yourPort; + unsigned int m_myPort; + + bool readPackets(); +}; + +#endif diff --git a/Common/Common.vcxproj b/Common/Common.vcxproj index 10fcc19..bdbcfc3 100644 --- a/Common/Common.vcxproj +++ b/Common/Common.vcxproj @@ -156,6 +156,9 @@ + + + @@ -221,6 +224,10 @@ + + + + diff --git a/Common/Common.vcxproj.filters b/Common/Common.vcxproj.filters index a42af77..8365240 100644 --- a/Common/Common.vcxproj.filters +++ b/Common/Common.vcxproj.filters @@ -41,6 +41,15 @@ Source Files + + Source Files + + + Source Files + + + Source Files + Source Files @@ -232,6 +241,18 @@ Header Files + + Header Files + + + Header Files + + + Header Files + + + Header Files + Header Files diff --git a/Common/ConnectData.cpp b/Common/ConnectData.cpp index 73f128a..2489b73 100644 --- a/Common/ConnectData.cpp +++ b/Common/ConnectData.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010,2012,2013,2018 by Jonathan Naylor G4KLX + * Copyright (C) 2010,2012,2013 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 @@ -203,6 +203,33 @@ bool CConnectData::setDCSData(const unsigned char* data, unsigned int length, co return true; } +bool CConnectData::setCCSData(const unsigned char* data, unsigned int length, const in_addr& yourAddress, unsigned int yourPort, unsigned int myPort) +{ + wxASSERT(data != NULL); + wxASSERT(length >= 14U); + wxASSERT(yourPort > 0U); + + m_repeater = wxString((const char*)data, wxConvLocal, LONG_CALLSIGN_LENGTH); + m_repeater.SetChar(LONG_CALLSIGN_LENGTH - 1U, data[LONG_CALLSIGN_LENGTH + 0U]); + + if (data[LONG_CALLSIGN_LENGTH + 2U] == 'A' && + data[LONG_CALLSIGN_LENGTH + 3U] == 'C' && + data[LONG_CALLSIGN_LENGTH + 4U] == 'K') + m_type = CT_ACK; + else if (data[LONG_CALLSIGN_LENGTH + 2U] == 'N' && + data[LONG_CALLSIGN_LENGTH + 3U] == 'A' && + data[LONG_CALLSIGN_LENGTH + 4U] == 'K') + m_type = CT_NAK; + else + return false; + + m_yourAddress = yourAddress; + m_yourPort = yourPort; + m_myPort = myPort; + + return true; +} + bool CConnectData::setDPlusData(const unsigned char* data, unsigned int length, const in_addr& yourAddress, unsigned int yourPort, unsigned int myPort) { wxASSERT(data != NULL); @@ -365,6 +392,46 @@ unsigned int CConnectData::getDCSData(unsigned char *data, unsigned int length) } } +unsigned int CConnectData::getCCSData(unsigned char *data, unsigned int length) const +{ + wxASSERT(data != NULL); + wxASSERT(length >= 39U); + + ::memset(data, ' ', 39U); + + for (unsigned int i = 0U; i < m_repeater.Len() && i < (LONG_CALLSIGN_LENGTH - 1U); i++) + data[i] = m_repeater.GetChar(i); + + data[LONG_CALLSIGN_LENGTH + 0U] = m_repeater.GetChar(LONG_CALLSIGN_LENGTH - 1U); + + switch (m_type) { + case CT_LINK1: + case CT_LINK2: { + data[9U] = 0x41U; + data[10U] = '@'; + + for (unsigned int i = 0U; i < m_locator.Len(); i++) + data[11U + i] = m_locator.GetChar(i); + + data[17U] = 0x20U; + data[18U] = '@'; + + wxString text; + text.Printf(wxT("ircDDB_GW-%s"), VERSION.Left(8U).c_str()); + + for (unsigned int i = 0U; i < text.Len(); i++) + data[19U + i] = text.GetChar(i); + } + return 39U; + + case CT_UNLINK: + return 19U; + + default: + return 0U; + } +} + unsigned int CConnectData::getDPlusData(unsigned char *data, unsigned int length) const { wxASSERT(data != NULL); diff --git a/Common/ConnectData.h b/Common/ConnectData.h index f3cb287..da6ea78 100644 --- a/Common/ConnectData.h +++ b/Common/ConnectData.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010,2012,2013,2018 by Jonathan Naylor G4KLX + * Copyright (C) 2010,2012,2013 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 @@ -50,10 +50,12 @@ public: bool setDExtraData(const unsigned char* data, unsigned int length, const in_addr& yourAddress, unsigned int yourPort, unsigned int myPort); bool setDPlusData(const unsigned char* data, unsigned int length, const in_addr& yourAddress, unsigned int yourPort, unsigned int myPort); bool setDCSData(const unsigned char* data, unsigned int length, const in_addr& yourAddress, unsigned int yourPort, unsigned int myPort); + bool setCCSData(const unsigned char* data, unsigned int length, const in_addr& yourAddress, unsigned int yourPort, unsigned int myPort); unsigned int getDExtraData(unsigned char* data, unsigned int length) const; unsigned int getDPlusData(unsigned char* data, unsigned int length) const; unsigned int getDCSData(unsigned char* data, unsigned int length) const; + unsigned int getCCSData(unsigned char* data, unsigned int length) const; wxString getRepeater() const; wxString getReflector() const; diff --git a/Common/DStarDefines.h b/Common/DStarDefines.h index a2dc448..8ea9ae6 100644 --- a/Common/DStarDefines.h +++ b/Common/DStarDefines.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009-2015,2018 by Jonathan Naylor, G4KLX + * Copyright (C) 2009-2015 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 @@ -112,10 +112,11 @@ const unsigned char SCRAMBLER_BYTE3 = 0x93U; const unsigned int DPLUS_PORT = 20001U; const unsigned int DEXTRA_PORT = 30001U; const unsigned int DCS_PORT = 30051U; +const unsigned int CCS_PORT = 30062U; // Port for CCS7 const unsigned int G2_DV_PORT = 40000U; const unsigned int G2_DD_PORT = 40001U; -const unsigned int NETWORK_TIMEOUT = 2U; // Network timeout for G2, DCS, DExtra, and D-Plus +const unsigned int NETWORK_TIMEOUT = 2U; // Network timeout for G2, CCS, DCS, DExtra, and D-Plus const unsigned int REPEATER_TIMEOUT = 2U; // Repeater timeout const unsigned int REPLY_TIME = 2U; // The turnaround time for version, echo, audio prompts @@ -137,7 +138,8 @@ enum AUDIO_SOURCE { AS_DEXTRA, AS_DCS, AS_DUP, - AS_VERSION + AS_VERSION, + AS_CCS }; enum DSTAR_RX_STATE { diff --git a/Common/DTMF.cpp b/Common/DTMF.cpp index 05ca390..a05cbed 100644 --- a/Common/DTMF.cpp +++ b/Common/DTMF.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012,2013,2015,2018 by Jonathan Naylor G4KLX + * Copyright (C) 2012,2013,2015 by Jonathan Naylor G4KLX * Copyright (C) 2011 by DV Developer Group. DJ0ABR * * This program is free software; you can redistribute it and/or modify @@ -167,6 +167,8 @@ wxString CDTMF::translate() return processReflector(wxT("XRF"), command.Mid(1U)); else if (command.GetChar(0U) == wxT('D')) return processReflector(wxT("DCS"), command.Mid(1U)); + else + return processCCS(command); } void CDTMF::reset() @@ -219,3 +221,97 @@ wxString CDTMF::processReflector(const wxString& prefix, const wxString& command return out; } } + +wxString CDTMF::processCCS(const wxString& command) const +{ + unsigned int len = command.Len(); + + wxString out = wxEmptyString; + + switch (len) { + case 3U: { + // CCS7 for local repeater without band + unsigned long n; + command.ToULong(&n); + if (n == 0UL) + return wxEmptyString; + out.Printf(wxT("C%03lu "), n); + } + break; + case 4U: { + wxChar c = command.GetChar(3U); + if (c == wxT('A') || c == wxT('B') || c == wxT('C') || c == wxT('D')) { + // CCS7 for local repeater with band + unsigned long n; + command.Mid(0U, 3U).ToULong(&n); + if (n == 0UL) + return wxEmptyString; + out.Printf(wxT("C%03lu%c "), n, c); + } else { + // CCS7 for local user + unsigned long n; + command.ToULong(&n); + if (n == 0UL) + return wxEmptyString; + out.Printf(wxT("C%04lu "), n); + } + } + break; + case 5U: { + wxChar c = command.GetChar(4U); + if (c == wxT('A') || c == wxT('B') || c == wxT('C') || c == wxT('D')) { + // CCS7 for local hostspot with band + unsigned long n; + command.Mid(0U, 4U).ToULong(&n); + if (n == 0UL) + return wxEmptyString; + out.Printf(wxT("C%04lu%c "), n, c); + } + } + break; + case 6U: { + // CCS7 for full repeater without band + unsigned long n; + command.ToULong(&n); + if (n == 0UL) + return wxEmptyString; + out.Printf(wxT("C%06lu "), n); + } + break; + case 7U: { + wxChar c = command.GetChar(6U); + if (c == wxT('A') || c == wxT('B') || c == wxT('C') || c == wxT('D')) { + // CCS7 for full repeater with band + unsigned long n; + command.Mid(0U, 6U).ToULong(&n); + if (n == 0UL) + return wxEmptyString; + out.Printf(wxT("C%06lu%c"), n, c); + } else { + // CCS7 for full user or CCS7 for full hostpot without band + unsigned long n; + command.ToULong(&n); + if (n == 0UL) + return wxEmptyString; + out.Printf(wxT("C%07lu"), n); + } + } + break; + case 8U: { + wxChar c = command.GetChar(7U); + if (c == wxT('A') || c == wxT('B') || c == wxT('C') || c == wxT('D')) { + // CCS7 for full hotspot with band + unsigned long n; + command.Mid(0U, 7U).ToULong(&n); + if (n == 0UL) + return wxEmptyString; + out.Printf(wxT("C%07lu%c"), n, c); + } + } + break; + default: + break; + } + + return out; +} diff --git a/Common/DTMF.h b/Common/DTMF.h index 09e60a8..71ab364 100644 --- a/Common/DTMF.h +++ b/Common/DTMF.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012,2013,2018 by Jonathan Naylor G4KLX + * Copyright (C) 2012,2013 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 @@ -43,6 +43,7 @@ private: wxChar m_lastChar; wxString processReflector(const wxString& prefix, const wxString& command) const; + wxString processCCS(const wxString& command) const; }; #endif diff --git a/Common/Defs.h b/Common/Defs.h index 8422954..f2c5c31 100644 --- a/Common/Defs.h +++ b/Common/Defs.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2015,2018 by Jonathan Naylor G4KLX + * Copyright (C) 2010-2015 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 @@ -24,6 +24,7 @@ const wxString DEXTRA_HOSTS_FILE_NAME = wxT("DExtra_Hosts.txt"); const wxString DPLUS_HOSTS_FILE_NAME = wxT("DPlus_Hosts.txt"); const wxString DCS_HOSTS_FILE_NAME = wxT("DCS_Hosts.txt"); +const wxString CCS_HOSTS_FILE_NAME = wxT("CCS_Hosts.txt"); const wxString GATEWAY_HOSTS_FILE_NAME = wxT("Gateway_Hosts.txt"); const wxString LINKS_BASE_NAME = wxT("Links"); @@ -56,7 +57,8 @@ enum DIRECTION { enum PROTOCOL { PROTO_DEXTRA, PROTO_DPLUS, - PROTO_DCS + PROTO_DCS, + PROTO_CCS }; enum HW_TYPE { @@ -107,10 +109,12 @@ enum LINK_STATUS { LS_LINKING_DEXTRA, LS_LINKING_DPLUS, LS_LINKING_DCS, + LS_LINKING_CCS, LS_LINKED_LOOPBACK, LS_LINKED_DEXTRA, LS_LINKED_DPLUS, - LS_LINKED_DCS + LS_LINKED_DCS, + LS_LINKED_CCS }; enum SLOWDATA_STATE { diff --git a/Common/HeaderData.cpp b/Common/HeaderData.cpp index dd49ba3..fd518bd 100644 --- a/Common/HeaderData.cpp +++ b/Common/HeaderData.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2014,2018 by Jonathan Naylor G4KLX + * Copyright (C) 2010-2014 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 @@ -256,6 +256,24 @@ void CHeaderData::setDCSData(const unsigned char *data, unsigned int length, con m_myPort = myPort; } +void CHeaderData::setCCSData(const unsigned char *data, unsigned int length, const in_addr& yourAddress, unsigned int yourPort, unsigned int myPort) +{ + wxASSERT(data != NULL); + wxASSERT(length >= 100U); + + m_id = data[44U] * 256U + data[43U]; + + ::memcpy(m_rptCall2, data + 7U, LONG_CALLSIGN_LENGTH); + ::memcpy(m_rptCall1, data + 15U, LONG_CALLSIGN_LENGTH); + ::memcpy(m_yourCall, data + 23U, LONG_CALLSIGN_LENGTH); + ::memcpy(m_myCall1, data + 31U, LONG_CALLSIGN_LENGTH); + ::memcpy(m_myCall2, data + 39U, SHORT_CALLSIGN_LENGTH); + + m_yourAddress = yourAddress; + m_yourPort = yourPort; + m_myPort = myPort; +} + bool CHeaderData::setG2Data(const unsigned char *data, unsigned int length, bool check, const in_addr& yourAddress, unsigned int yourPort) { wxASSERT(data != NULL); @@ -510,6 +528,18 @@ void CHeaderData::getDCSData(unsigned char *data, unsigned int length) const ::memcpy(data + 39U, m_myCall2, SHORT_CALLSIGN_LENGTH); } +void CHeaderData::getCCSData(unsigned char *data, unsigned int length) const +{ + wxASSERT(data != NULL); + wxASSERT(length >= 100U); + + ::memcpy(data + 7U, m_rptCall2, LONG_CALLSIGN_LENGTH); + ::memcpy(data + 15U, m_rptCall1, LONG_CALLSIGN_LENGTH); + ::memcpy(data + 23U, m_yourCall, LONG_CALLSIGN_LENGTH); + ::memcpy(data + 31U, m_myCall1, LONG_CALLSIGN_LENGTH); + ::memcpy(data + 39U, m_myCall2, SHORT_CALLSIGN_LENGTH); +} + unsigned int CHeaderData::getG2Data(unsigned char *data, unsigned int length, bool check) const { wxASSERT(data != NULL); diff --git a/Common/HeaderData.h b/Common/HeaderData.h index ba21b57..791ec36 100644 --- a/Common/HeaderData.h +++ b/Common/HeaderData.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2014,2018 by Jonathan Naylor G4KLX + * Copyright (C) 2010-2014 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 @@ -42,6 +42,7 @@ public: bool setDExtraData(const unsigned char* data, unsigned int length, bool check, const in_addr& yourAddress, unsigned int yourPort, unsigned int myPort); bool setDPlusData(const unsigned char* data, unsigned int length, bool check, const in_addr& yourAddress, unsigned int yourPort, unsigned int myPort); void setDCSData(const unsigned char* data, unsigned int length, const in_addr& yourAddress, unsigned int yourPort, unsigned int myPort); + void setCCSData(const unsigned char* data, unsigned int length, const in_addr& yourAddress, unsigned int yourPort, unsigned int myPort); unsigned int getIcomRepeaterData(unsigned char* data, unsigned int length, bool check) const; unsigned int getHBRepeaterData(unsigned char* data, unsigned int length, bool check) const; @@ -49,6 +50,7 @@ public: unsigned int getDPlusData(unsigned char* data, unsigned int length, bool check) const; unsigned int getG2Data(unsigned char* data, unsigned int length, bool check) const; void getDCSData(unsigned char* data, unsigned int length) const; + void getCCSData(unsigned char* data, unsigned int length) const; bool setDVTOOLData(const unsigned char* data, unsigned int length, bool check); diff --git a/Common/HeardData.cpp b/Common/HeardData.cpp index 9e97dbc..e2d8f2e 100644 --- a/Common/HeardData.cpp +++ b/Common/HeardData.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012,2013,2018 by Jonathan Naylor G4KLX + * Copyright (C) 2012,2013 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 @@ -68,6 +68,45 @@ bool CHeardData::setIcomRepeaterData(const unsigned char *data, unsigned int len return true; } +unsigned int CHeardData::getCCSData(unsigned char *data, unsigned int length) const +{ + wxASSERT(data != NULL); + wxASSERT(length >= 100U); + + ::memset(data, 0x00U, 100U); + + data[0U] = '0'; + data[1U] = '0'; + data[2U] = '0'; + data[3U] = '1'; + + ::memset(data + 7U, ' ', 36U); + + for (unsigned int i = 0U; i < m_reflector.Len(); i++) + data[i + 7U] = m_reflector.GetChar(i); + + for (unsigned int i = 0U; i < m_repeater.Len(); i++) + data[i + 15U] = m_repeater.GetChar(i); + + ::memcpy(data + 23U, "CQCQCQ ", LONG_CALLSIGN_LENGTH); + + for (unsigned int i = 0U; i < m_user.Len(); i++) + data[i + 31U] = m_user.GetChar(i); + + for (unsigned int i = 0U; i < m_ext.Len(); i++) + data[i + 39U] = m_ext.GetChar(i); + + data[61U] = 0x01U; + + data[63U] = 0x21U; + + ::memset(data + 64U, ' ', 20U); + + data[93U] = 0x36U; + + return 100U; +} + wxString CHeardData::getRepeater() const { return m_repeater; diff --git a/Common/HeardData.h b/Common/HeardData.h index e1b2eed..61010fa 100644 --- a/Common/HeardData.h +++ b/Common/HeardData.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012,2013,2018 by Jonathan Naylor G4KLX + * Copyright (C) 2012,2013 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 @@ -39,6 +39,8 @@ public: bool setIcomRepeaterData(const unsigned char* data, unsigned int length, const in_addr& address, unsigned int port); + unsigned int getCCSData(unsigned char* data, unsigned int length) const; + wxString getRepeater() const; wxString getUser() const; diff --git a/Common/IRCDDBGatewayConfig.cpp b/Common/IRCDDBGatewayConfig.cpp index 7062737..7e3da47 100644 --- a/Common/IRCDDBGatewayConfig.cpp +++ b/Common/IRCDDBGatewayConfig.cpp @@ -138,6 +138,8 @@ const wxString KEY_DPLUS_ENABLED = wxT("dplusEnabled"); const wxString KEY_DPLUS_MAXDONGLES = wxT("dplusMaxDongles"); const wxString KEY_DPLUS_LOGIN = wxT("dplusLogin"); const wxString KEY_DCS_ENABLED = wxT("dcsEnabled"); +const wxString KEY_CCS_ENABLED = wxT("ccsEnabled"); +const wxString KEY_CCS_HOST = wxT("ccsHost"); const wxString KEY_XLX_ENABLED = wxT("xlxEnabled"); const wxString KEY_XLX_OVERRIDE_LOCAL = wxT("xlxOverrideLocal"); const wxString KEY_XLX_HOSTS_FILE_URL = wxT("xlxHostsFileUrl"); @@ -259,6 +261,8 @@ const bool DEFAULT_DPLUS_ENABLED = false; const unsigned int DEFAULT_DPLUS_MAXDONGLES = 5U; const wxString DEFAULT_DPLUS_LOGIN = wxEmptyString; const bool DEFAULT_DCS_ENABLED = true; +const bool DEFAULT_CCS_ENABLED = true; +const wxString DEFAULT_CCS_HOST = wxT("CCS704 "); const bool DEFAULT_XLX_ENABLED = true; const bool DEFAULT_XLX_OVERRIDE_LOCAL = true; const wxString DEFAULT_XLX_HOSTS_FILE_URL = _T("http://xlxapi.rlx.lu/api.php?do=GetReflectorHostname"); @@ -409,6 +413,8 @@ m_dplusEnabled(DEFAULT_DPLUS_ENABLED), m_dplusMaxDongles(DEFAULT_DPLUS_MAXDONGLES), m_dplusLogin(DEFAULT_DPLUS_LOGIN), m_dcsEnabled(DEFAULT_DCS_ENABLED), +m_ccsEnabled(DEFAULT_CCS_ENABLED), +m_ccsHost(DEFAULT_CCS_HOST), m_xlxEnabled(DEFAULT_XLX_ENABLED), m_xlxOverrideLocal(DEFAULT_XLX_OVERRIDE_LOCAL), m_xlxHostsFileUrl(DEFAULT_XLX_HOSTS_FILE_URL), @@ -741,6 +747,10 @@ m_y(DEFAULT_WINDOW_Y) m_config->Read(m_name + KEY_DCS_ENABLED, &m_dcsEnabled, DEFAULT_DCS_ENABLED); + m_config->Read(m_name + KEY_CCS_ENABLED, &m_ccsEnabled, DEFAULT_CCS_ENABLED); + + m_config->Read(m_name + KEY_CCS_HOST, &m_ccsHost, DEFAULT_CCS_HOST); + m_config->Read(m_name + KEY_XLX_ENABLED, &m_xlxEnabled, DEFAULT_XLX_ENABLED); m_config->Read(m_name + KEY_XLX_OVERRIDE_LOCAL, &m_xlxOverrideLocal, DEFAULT_XLX_OVERRIDE_LOCAL); @@ -1016,6 +1026,8 @@ m_dplusEnabled(DEFAULT_DPLUS_ENABLED), m_dplusMaxDongles(DEFAULT_DPLUS_MAXDONGLES), m_dplusLogin(DEFAULT_DPLUS_LOGIN), m_dcsEnabled(DEFAULT_DCS_ENABLED), +m_ccsEnabled(DEFAULT_CCS_ENABLED), +m_ccsHost(DEFAULT_CCS_HOST), m_xlxEnabled(DEFAULT_XLX_ENABLED), m_xlxOverrideLocal(DEFAULT_XLX_OVERRIDE_LOCAL), m_xlxHostsFileUrl(DEFAULT_XLX_HOSTS_FILE_URL), @@ -1399,6 +1411,11 @@ m_y(DEFAULT_WINDOW_Y) } else if (key.IsSameAs(KEY_DCS_ENABLED)) { val.ToLong(&temp1); m_dcsEnabled = temp1 == 1L; + } else if (key.IsSameAs(KEY_CCS_ENABLED)) { + val.ToLong(&temp1); + m_ccsEnabled = temp1 == 1L; + } else if (key.IsSameAs(KEY_CCS_HOST)) { + m_ccsHost = val; } else if (key.IsSameAs(KEY_XLX_ENABLED)) { val.ToLong(&temp1); m_xlxEnabled = temp1 == 1L; @@ -1910,14 +1927,18 @@ void CIRCDDBGatewayConfig::setDPlus(bool enabled, unsigned int maxDongles, const m_dplusLogin = login; } -void CIRCDDBGatewayConfig::getDCS(bool& dcsEnabled) const +void CIRCDDBGatewayConfig::getDCS(bool& dcsEnabled, bool& ccsEnabled, wxString& ccsHost) const { dcsEnabled = m_dcsEnabled; + ccsEnabled = m_ccsEnabled; + ccsHost = m_ccsHost; } -void CIRCDDBGatewayConfig::setDCS(bool dcsEnabled) +void CIRCDDBGatewayConfig::setDCS(bool dcsEnabled, bool ccsEnabled, const wxString& ccsHost) { m_dcsEnabled = dcsEnabled; + m_ccsEnabled = ccsEnabled; + m_ccsHost = ccsHost; } void CIRCDDBGatewayConfig::getXLX(bool& xlxEnabled, bool& xlxOverrideLocal, wxString& xlxHostsFileUrl) @@ -2354,6 +2375,8 @@ bool CIRCDDBGatewayConfig::write() m_config->Write(m_name + KEY_DPLUS_MAXDONGLES, long(m_dplusMaxDongles)); m_config->Write(m_name + KEY_DPLUS_LOGIN, m_dplusLogin); m_config->Write(m_name + KEY_DCS_ENABLED, m_dcsEnabled); + m_config->Write(m_name + KEY_CCS_ENABLED, m_ccsEnabled); + m_config->Write(m_name + KEY_CCS_HOST, m_ccsHost); m_config->Write(m_name + KEY_XLX_ENABLED, m_xlxEnabled); m_config->Write(m_name + KEY_XLX_OVERRIDE_LOCAL, m_xlxOverrideLocal); m_config->Write(m_name + KEY_XLX_HOSTS_FILE_URL, m_xlxHostsFileUrl); @@ -2560,6 +2583,8 @@ bool CIRCDDBGatewayConfig::write() buffer.Printf(wxT("%s=%u"), KEY_DPLUS_MAXDONGLES.c_str(), m_dplusMaxDongles); file.AddLine(buffer); buffer.Printf(wxT("%s=%s"), KEY_DPLUS_LOGIN.c_str(), m_dplusLogin.c_str()); file.AddLine(buffer); buffer.Printf(wxT("%s=%d"), KEY_DCS_ENABLED.c_str(), m_dcsEnabled ? 1 : 0); file.AddLine(buffer); + buffer.Printf(wxT("%s=%d"), KEY_CCS_ENABLED.c_str(), m_ccsEnabled ? 1 : 0); file.AddLine(buffer); + buffer.Printf(wxT("%s=%s"), KEY_CCS_HOST.c_str(), m_ccsHost.c_str()); file.AddLine(buffer); buffer.Printf(wxT("%s=%d"), KEY_XLX_ENABLED.c_str(), m_xlxEnabled ? 1 : 0); file.AddLine(buffer); buffer.Printf(wxT("%s=%d"), KEY_XLX_OVERRIDE_LOCAL.c_str(), m_xlxOverrideLocal ? 1 : 0); file.AddLine(buffer); buffer.Printf(wxT("%s=%s"), KEY_XLX_HOSTS_FILE_URL.c_str(), m_xlxHostsFileUrl.c_str()); file.AddLine(buffer); diff --git a/Common/IRCDDBGatewayConfig.h b/Common/IRCDDBGatewayConfig.h index 24f3c53..5583b91 100644 --- a/Common/IRCDDBGatewayConfig.h +++ b/Common/IRCDDBGatewayConfig.h @@ -68,8 +68,8 @@ public: void getDPlus(bool& enabled, unsigned int& maxDongles, wxString& login) const; void setDPlus(bool enabled, unsigned int maxDongles, const wxString& login); - void getDCS(bool& dcsEnabled) const; - void setDCS(bool dcsEnabled); + void getDCS(bool& dcsEnabled, bool& ccsEnabled, wxString& ccsHost) const; + void setDCS(bool dcsEnabled, bool ccsEnabled, const wxString& ccsHost); void getXLX(bool& xlxEnabled, bool& xlxOverrideLocal, wxString& xlxHostsFileUrl); void setXLX(bool xlxEnabled, bool xlxOverrideLocal, wxString xlxHostsFileUrl); @@ -241,6 +241,8 @@ private: unsigned int m_dplusMaxDongles; wxString m_dplusLogin; bool m_dcsEnabled; + bool m_ccsEnabled; + wxString m_ccsHost; bool m_xlxEnabled; bool m_xlxOverrideLocal; wxString m_xlxHostsFileUrl; diff --git a/Common/Makefile b/Common/Makefile index 9e569ad..8643148 100644 --- a/Common/Makefile +++ b/Common/Makefile @@ -1,5 +1,5 @@ OBJECTS = AMBEData.o AnnouncementUnit.o APRSCollector.o APRSWriter.o APRSWriterThread.o AudioUnit.o CacheManager.o CallsignList.o \ - CallsignServer.o CCITTChecksum.o ConnectData.o DCSHandler.o DCSProtocolHandler.o \ + CallsignServer.o CCITTChecksum.o CCSData.o CCSHandler.o CCSProtocolHandler.o ConnectData.o DCSHandler.o DCSProtocolHandler.o \ DCSProtocolHandlerPool.o DDData.o DDHandler.o DExtraHandler.o DExtraProtocolHandler.o DExtraProtocolHandlerPool.o \ DPlusAuthenticator.o DPlusHandler.o DPlusProtocolHandler.o DPlusProtocolHandlerPool.o DRATSServer.o DTMF.o \ DummyRepeaterProtocolHandler.o DVTOOLFileReader.o EchoUnit.o G2Handler.o G2ProtocolHandler.o GatewayCache.o \ diff --git a/Common/PollData.cpp b/Common/PollData.cpp index 52123af..04b2569 100644 --- a/Common/PollData.cpp +++ b/Common/PollData.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010,2012,2013,2018 by Jonathan Naylor G4KLX + * Copyright (C) 2010,2012,2013 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 @@ -125,6 +125,21 @@ bool CPollData::setDCSData(const unsigned char* data, unsigned int length, const return true; } +bool CPollData::setCCSData(const unsigned char* data, unsigned int length, const in_addr& yourAddress, unsigned int yourPort, unsigned int myPort) +{ + wxASSERT(data != NULL); + wxASSERT(length >= 25U); + wxASSERT(yourPort > 0U); + + m_data1 = wxString((const char*)(data + 0U), wxConvLocal, 25U); + m_length = length; + m_yourAddress = yourAddress; + m_yourPort = yourPort; + m_myPort = myPort; + + return true; +} + bool CPollData::setDPlusData(const unsigned char*, unsigned int length, const in_addr& yourAddress, unsigned int yourPort, unsigned int myPort) { wxASSERT(yourPort > 0U); @@ -188,6 +203,24 @@ unsigned int CPollData::getDCSData(unsigned char *data, unsigned int length) con } } +unsigned int CPollData::getCCSData(unsigned char *data, unsigned int length) const +{ + wxASSERT(data != NULL); + wxASSERT(length >= 25U); + + ::memset(data, ' ', 25U); + + for (unsigned int i = 0U; i < m_data1.Len() && i < LONG_CALLSIGN_LENGTH; i++) + data[i + 0U] = m_data1.GetChar(i); + + if (!m_data2.IsEmpty()) { + for (unsigned int i = 0U; i < m_data2.Len() && i < LONG_CALLSIGN_LENGTH; i++) + data[i + 8U] = m_data2.GetChar(i); + } + + return 25U; +} + unsigned int CPollData::getDPlusData(unsigned char *data, unsigned int length) const { wxASSERT(data != NULL); diff --git a/Common/PollData.h b/Common/PollData.h index 5e9822f..d85ec78 100644 --- a/Common/PollData.h +++ b/Common/PollData.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010,2012,2013,2018 by Jonathan Naylor G4KLX + * Copyright (C) 2010,2012,2013 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 @@ -40,10 +40,12 @@ public: bool setDExtraData(const unsigned char* data, unsigned int length, const in_addr& yourAddress, unsigned int yourPort, unsigned int myPort); bool setDPlusData(const unsigned char* data, unsigned int length, const in_addr& yourAddress, unsigned int yourPort, unsigned int myPort); bool setDCSData(const unsigned char* data, unsigned int length, const in_addr& yourAddress, unsigned int yourPort, unsigned int myPort); + bool setCCSData(const unsigned char* data, unsigned int length, const in_addr& yourAddress, unsigned int yourPort, unsigned int myPort); unsigned int getDExtraData(unsigned char* data, unsigned int length) const; unsigned int getDPlusData(unsigned char* data, unsigned int length) const; unsigned int getDCSData(unsigned char* data, unsigned int length) const; + unsigned int getCCSData(unsigned char* data, unsigned int length) const; wxString getData1() const; void setData1(const wxString& data); diff --git a/Common/RemoteHandler.cpp b/Common/RemoteHandler.cpp index e0cfee9..dbbe1fd 100644 --- a/Common/RemoteHandler.cpp +++ b/Common/RemoteHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011,2012,2013,2018 by Jonathan Naylor G4KLX + * Copyright (C) 2011,2012,2013 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 @@ -148,6 +148,7 @@ void CRemoteHandler::sendRepeater(const wxString& callsign) CDExtraHandler::getInfo(repeater, *data); CDPlusHandler::getInfo(repeater, *data); CDCSHandler::getInfo(repeater, *data); + CCCSHandler::getInfo(repeater, *data); m_handler.sendRepeater(*data); } diff --git a/Common/RepeaterHandler.cpp b/Common/RepeaterHandler.cpp index 5548fc3..215e0dd 100644 --- a/Common/RepeaterHandler.cpp +++ b/Common/RepeaterHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2015,2018 by Jonathan Naylor G4KLX + * Copyright (C) 2010-2015 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 @@ -21,6 +21,7 @@ #include "DPlusHandler.h" #include "DStarDefines.h" #include "DCSHandler.h" +#include "CCSHandler.h" #include "HeaderData.h" #include "DDHandler.h" #include "AMBEData.h" @@ -126,6 +127,7 @@ m_version(NULL), m_drats(NULL), m_dtmf(), m_pollTimer(1000U, 900U), // 15 minutes +m_ccsHandler(NULL), m_lastReflector(), m_heardUser(), m_heardRepeater(), @@ -565,6 +567,10 @@ void CRepeaterHandler::processRepeater(CHeaderData& header) if (!m_heardUser.IsEmpty() && !m_myCall1.IsSameAs(m_heardUser) && m_irc != NULL) m_irc->sendHeard(m_heardUser, wxT(" "), wxT(" "), m_heardRepeater, wxT(" "), 0x00U, 0x00U, 0x00U); + // Inform CCS + m_ccsHandler->writeHeard(header); + m_ccsHandler->writeHeader(header); + // The Icom heard timer m_heardTimer.stop(); @@ -705,11 +711,16 @@ void CRepeaterHandler::processRepeater(CHeaderData& header) return; } - g2CommandHandler(m_yourCall, m_myCall1, header); - - if (m_g2Status == G2_NONE) { - reflectorCommandHandler(m_yourCall, m_myCall1, wxT("UR Call")); + if (isCCSCommand(m_yourCall)) { + ccsCommandHandler(m_yourCall, m_myCall1, wxT("UR Call")); sendToOutgoing(header); + } else { + g2CommandHandler(m_yourCall, m_myCall1, header); + + if (m_g2Status == G2_NONE) { + reflectorCommandHandler(m_yourCall, m_myCall1, wxT("UR Call")); + sendToOutgoing(header); + } } } @@ -745,6 +756,8 @@ void CRepeaterHandler::processRepeater(CAMBEData& data) if (!m_restricted && m_yourCall.Left(4U).IsSameAs(wxT("CQCQ"))) { if (command.IsEmpty()) { // Do nothing + } else if (isCCSCommand(command)) { + ccsCommandHandler(command, m_myCall1, wxT("DTMF")); } else if (command.IsSameAs(wxT(" I"))) { m_infoNeeded = true; } else { @@ -757,6 +770,9 @@ void CRepeaterHandler::processRepeater(CAMBEData& data) // Incoming links get everything sendToIncoming(data); + // CCS gets everything + m_ccsHandler->writeAMBE(data); + if (m_drats != NULL) m_drats->writeData(data); @@ -941,7 +957,10 @@ void CRepeaterHandler::processBusy(CHeaderData& header) if (m_yourCall.Left(4).IsSameAs(wxT("CQCQ")) || m_yourCall.IsSameAs(wxT(" E")) || m_yourCall.IsSameAs(wxT(" I"))) return; - reflectorCommandHandler(m_yourCall, m_myCall1, wxT("background UR Call")); + if (isCCSCommand(m_yourCall)) + ccsCommandHandler(m_yourCall, m_myCall1, wxT("background UR Call")); + else + reflectorCommandHandler(m_yourCall, m_myCall1, wxT("background UR Call")); } void CRepeaterHandler::processBusy(CAMBEData& data) @@ -963,6 +982,8 @@ void CRepeaterHandler::processBusy(CAMBEData& data) if (!m_restricted && m_yourCall.Left(4U).IsSameAs(wxT("CQCQ"))) { if (command.IsEmpty()) { // Do nothing + } else if (isCCSCommand(command)) { + ccsCommandHandler(command, m_myCall1, wxT("background DTMF")); } else if (command.IsSameAs(wxT(" I"))) { // Do nothing } else { @@ -1096,6 +1117,9 @@ bool CRepeaterHandler::process(CHeaderData& header, DIRECTION, AUDIO_SOURCE sour sendToIncoming(header); + if (source == AS_DPLUS || source == AS_DEXTRA || source == AS_DCS) + m_ccsHandler->writeHeader(header); + if (source == AS_G2 || source == AS_INFO || source == AS_VERSION || source == AS_XBAND || source == AS_ECHO) return true; @@ -1130,6 +1154,9 @@ bool CRepeaterHandler::process(CAMBEData& data, DIRECTION, AUDIO_SOURCE source) sendToIncoming(data); + if (source == AS_DPLUS || source == AS_DEXTRA || source == AS_DCS) + m_ccsHandler->writeAMBE(data); + if (source == AS_G2 || source == AS_INFO || source == AS_VERSION || source == AS_XBAND || source == AS_ECHO) return true; @@ -1428,6 +1455,16 @@ void CRepeaterHandler::clockInt(unsigned int ms) writeNotLinked(); triggerInfo(); + } else if (m_linkStatus == LS_LINKING_CCS) { + // CCS didn't reply in time + wxLogMessage(wxT("CCS did not reply within five seconds")); + + m_ccsHandler->stopLink(); + + m_linkStatus = LS_NONE; + m_linkRepeater.Clear(); + + restoreLinks(); } } @@ -1708,6 +1745,17 @@ void CRepeaterHandler::linkRefused(DSTAR_PROTOCOL protocol, const wxString& call void CRepeaterHandler::link(RECONNECT reconnect, const wxString& reflector) { + // CCS removal + if (m_linkStatus == LS_LINKING_CCS || m_linkStatus == LS_LINKED_CCS) { + wxLogMessage(wxT("Dropping CCS link to %s"), m_linkRepeater.c_str()); + + m_ccsHandler->stopLink(); + + m_linkStatus = LS_NONE; + m_linkRepeater.Clear(); + m_queryTimer.stop(); + } + m_linkStartup = reflector; m_linkReconnect = reconnect; @@ -1844,6 +1892,11 @@ void CRepeaterHandler::link(RECONNECT reconnect, const wxString& reflector) void CRepeaterHandler::unlink(PROTOCOL protocol, const wxString& reflector) { + if (protocol == PROTO_CCS) { + m_ccsHandler->unlink(reflector); + return; + } + if (m_linkReconnect == RECONNECT_FIXED && m_linkRepeater.IsSameAs(reflector)) { wxLogMessage(wxT("Cannot unlink %s because it is fixed"), reflector.c_str()); return; @@ -1869,6 +1922,9 @@ void CRepeaterHandler::unlink(PROTOCOL protocol, const wxString& reflector) void CRepeaterHandler::g2CommandHandler(const wxString& callsign, const wxString& user, CHeaderData& header) { + if (m_linkStatus == LS_LINKING_CCS || m_linkStatus == LS_LINKED_CCS) + return; + if (callsign.Left(1).IsSameAs(wxT("/"))) { if (m_irc == NULL) { wxLogMessage(wxT("%s is trying to G2 route with ircDDB disabled"), user.c_str()); @@ -1961,8 +2017,27 @@ void CRepeaterHandler::g2CommandHandler(const wxString& callsign, const wxString } } +void CRepeaterHandler::ccsCommandHandler(const wxString& callsign, const wxString& user, const wxString& type) +{ + if (callsign.IsSameAs(wxT("CA "))) { + m_ccsHandler->stopLink(user, type); + } else { + CCS_STATUS status = m_ccsHandler->getStatus(); + if (status == CS_CONNECTED) { + suspendLinks(); + m_queryTimer.start(); + m_linkStatus = LS_LINKING_CCS; + m_linkRepeater = callsign.Mid(1U); + m_ccsHandler->startLink(m_linkRepeater, user, type); + } + } +} + void CRepeaterHandler::reflectorCommandHandler(const wxString& callsign, const wxString& user, const wxString& type) { + if (m_linkStatus == LS_LINKING_CCS || m_linkStatus == LS_LINKED_CCS) + return; + if (m_linkReconnect == RECONNECT_FIXED) return; @@ -2249,6 +2324,12 @@ void CRepeaterHandler::startupInt() } + m_ccsHandler = new CCCSHandler(this, m_rptCallsign, m_index + 1U, m_latitude, m_longitude, m_frequency, m_offset, m_description1, m_description2, m_url, CCS_PORT + m_index); + + // Start up our CCS link if we are DV mode + if (!m_ddMode) + m_ccsHandler->connect(); + // Link to a startup reflector/repeater if (m_linkAtStartup && !m_linkStartup.IsEmpty()) { wxLogMessage(wxT("Linking %s at startup to %s"), m_rptCallsign.c_str(), m_linkStartup.c_str()); @@ -2379,6 +2460,8 @@ void CRepeaterHandler::writeLinkingTo(const wxString &callsign) m_infoAudio->setStatus(m_linkStatus, m_linkRepeater, text); triggerInfo(); + + m_ccsHandler->setReflector(); } void CRepeaterHandler::writeLinkedTo(const wxString &callsign) @@ -2427,6 +2510,8 @@ void CRepeaterHandler::writeLinkedTo(const wxString &callsign) m_infoAudio->setStatus(m_linkStatus, m_linkRepeater, text); triggerInfo(); + + m_ccsHandler->setReflector(callsign); } void CRepeaterHandler::writeNotLinked() @@ -2475,6 +2560,8 @@ void CRepeaterHandler::writeNotLinked() m_infoAudio->setStatus(m_linkStatus, m_linkRepeater, text); triggerInfo(); + + m_ccsHandler->setReflector(); } void CRepeaterHandler::writeIsBusy(const wxString& callsign) @@ -2539,6 +2626,228 @@ void CRepeaterHandler::writeIsBusy(const wxString& callsign) m_infoAudio->setStatus(m_linkStatus, m_linkRepeater, text); m_infoAudio->setTempStatus(m_linkStatus, m_linkRepeater, tempText); triggerInfo(); + + m_ccsHandler->setReflector(); +} + +void CRepeaterHandler::ccsLinkMade(const wxString& callsign, DIRECTION direction) +{ + wxString text; + + switch (m_language) { + case TL_DEUTSCH: + text.Printf(wxT("Verlinkt zu %s"), callsign.c_str()); + break; + case TL_DANSK: + text.Printf(wxT("Linket til %s"), callsign.c_str()); + break; + case TL_FRANCAIS: + text.Printf(wxT("Connecte a %s"), callsign.c_str()); + break; + case TL_ITALIANO: + text.Printf(wxT("Connesso a %s"), callsign.c_str()); + break; + case TL_POLSKI: + text.Printf(wxT("Polaczony z %s"), callsign.c_str()); + break; + case TL_ESPANOL: + text.Printf(wxT("Enlazado %s"), callsign.c_str()); + break; + case TL_SVENSKA: + text.Printf(wxT("Lankad till %s"), callsign.c_str()); + break; + case TL_NEDERLANDS_NL: + case TL_NEDERLANDS_BE: + text.Printf(wxT("Gelinkt met %s"), callsign.c_str()); + break; + case TL_NORSK: + text.Printf(wxT("Tilkoblet %s"), callsign.c_str()); + break; + case TL_PORTUGUES: + text.Printf(wxT("Conectado a %s"), callsign.c_str()); + break; + default: + text.Printf(wxT("Linked to %s"), callsign.c_str()); + break; + } + + if (direction == DIR_OUTGOING) { + suspendLinks(); + + m_linkStatus = LS_LINKED_CCS; + m_linkRepeater = callsign; + m_queryTimer.stop(); + + CTextData textData(m_linkStatus, callsign, text, m_address, m_port); + m_repeaterHandler->writeText(textData); + + m_infoAudio->setStatus(m_linkStatus, m_linkRepeater, text); + triggerInfo(); + } else { + CTextData textData(m_linkStatus, m_linkRepeater, text, m_address, m_port, true); + m_repeaterHandler->writeText(textData); + + m_infoAudio->setTempStatus(LS_LINKED_CCS, callsign, text); + triggerInfo(); + } +} + +void CRepeaterHandler::ccsLinkEnded(const wxString&, DIRECTION direction) +{ + wxString tempText; + wxString text; + + switch (m_language) { + case TL_DEUTSCH: + text = wxT("Nicht verbunden"); + tempText = wxT("CCS ist beendet"); + break; + case TL_DANSK: + text = wxT("Ikke forbundet"); + tempText = wxT("CCS er afsluttet"); + break; + case TL_FRANCAIS: + text = wxT("Non connecte"); + tempText = wxT("CCS a pris fin"); + break; + case TL_ITALIANO: + text = wxT("Non connesso"); + tempText = wxT("CCS e finita"); + break; + case TL_POLSKI: + text = wxT("Nie polaczony"); + tempText = wxT("CCS zakonczyl"); + break; + case TL_ESPANOL: + text = wxT("No enlazado"); + tempText = wxT("CCS ha terminado"); + break; + case TL_SVENSKA: + text = wxT("Ej lankad"); + tempText = wxT("CCS har upphort"); + break; + case TL_NEDERLANDS_NL: + case TL_NEDERLANDS_BE: + text = wxT("Niet gelinkt"); + tempText = wxT("CCS is afgelopen"); + break; + case TL_NORSK: + text = wxT("Ikke linket"); + tempText = wxT("CCS er avsluttet"); + break; + case TL_PORTUGUES: + text = wxT("Desconectado"); + tempText = wxT("CCS terminou"); + break; + default: + text = wxT("Not linked"); + tempText = wxT("CCS has ended"); + break; + } + + if (direction == DIR_OUTGOING) { + m_linkStatus = LS_NONE; + m_linkRepeater.Clear(); + m_queryTimer.stop(); + + bool res = restoreLinks(); + if (!res) { + CTextData textData1(m_linkStatus, m_linkRepeater, tempText, m_address, m_port, true); + m_repeaterHandler->writeText(textData1); + + CTextData textData2(m_linkStatus, m_linkRepeater, text, m_address, m_port); + m_repeaterHandler->writeText(textData2); + + m_infoAudio->setStatus(m_linkStatus, m_linkRepeater, text); + m_infoAudio->setTempStatus(m_linkStatus, m_linkRepeater, tempText); + triggerInfo(); + } + } else { + CTextData textData(m_linkStatus, m_linkRepeater, tempText, m_address, m_port, true); + m_repeaterHandler->writeText(textData); + + m_infoAudio->setTempStatus(m_linkStatus, m_linkRepeater, tempText); + triggerInfo(); + } +} + +void CRepeaterHandler::ccsLinkFailed(const wxString& dtmf, DIRECTION direction) +{ + wxString tempText; + wxString text; + + switch (m_language) { + case TL_DEUTSCH: + text = wxT("Nicht verbunden"); + tempText.Printf(wxT("%s unbekannt"), dtmf.c_str()); + break; + case TL_DANSK: + text = wxT("Ikke forbundet"); + tempText.Printf(wxT("%s unknown"), dtmf.c_str()); + break; + case TL_FRANCAIS: + text = wxT("Non connecte"); + tempText.Printf(wxT("%s inconnu"), dtmf.c_str()); + break; + case TL_ITALIANO: + text = wxT("Non connesso"); + tempText.Printf(wxT("Sconosciuto %s"), dtmf.c_str()); + break; + case TL_POLSKI: + text = wxT("Nie polaczony"); + tempText.Printf(wxT("%s nieznany"), dtmf.c_str()); + break; + case TL_ESPANOL: + text = wxT("No enlazado"); + tempText.Printf(wxT("Desconocido %s"), dtmf.c_str()); + break; + case TL_SVENSKA: + text = wxT("Ej lankad"); + tempText.Printf(wxT("%s okand"), dtmf.c_str()); + break; + case TL_NEDERLANDS_NL: + case TL_NEDERLANDS_BE: + text = wxT("Niet gelinkt"); + tempText.Printf(wxT("%s bekend"), dtmf.c_str()); + break; + case TL_NORSK: + text = wxT("Ikke linket"); + tempText.Printf(wxT("%s ukjent"), dtmf.c_str()); + break; + case TL_PORTUGUES: + text = wxT("Desconectado"); + tempText.Printf(wxT("%s desconhecido"), dtmf.c_str()); + break; + default: + text = wxT("Not linked"); + tempText.Printf(wxT("%s unknown"), dtmf.c_str()); + break; + } + + if (direction == DIR_OUTGOING) { + m_linkStatus = LS_NONE; + m_linkRepeater.Clear(); + m_queryTimer.stop(); + + bool res = restoreLinks(); + if (!res) { + CTextData textData1(m_linkStatus, m_linkRepeater, tempText, m_address, m_port, true); + m_repeaterHandler->writeText(textData1); + + CTextData textData2(m_linkStatus, m_linkRepeater, text, m_address, m_port); + m_repeaterHandler->writeText(textData2); + + m_infoAudio->setStatus(m_linkStatus, m_linkRepeater, text); + m_infoAudio->setTempStatus(m_linkStatus, m_linkRepeater, tempText); + triggerInfo(); + } + } else { + CTextData textData(m_linkStatus, m_linkRepeater, tempText, m_address, m_port, true); + m_repeaterHandler->writeText(textData); + + m_infoAudio->setTempStatus(m_linkStatus, m_linkRepeater, tempText); + triggerInfo(); + } } void CRepeaterHandler::writeStatus(CStatusData& statusData) @@ -2591,6 +2900,8 @@ void CRepeaterHandler::suspendLinks() m_linkStatus = LS_NONE; m_linkRepeater.Clear(); m_linkReconnectTimer.stop(); + + m_ccsHandler->setReflector(); } bool CRepeaterHandler::restoreLinks() @@ -2633,3 +2944,27 @@ void CRepeaterHandler::triggerInfo() m_infoNeeded = false; } } + +bool CRepeaterHandler::isCCSCommand(const wxString& command) const +{ + if (command.IsSameAs(wxT("CA "))) + return true; + + wxChar c = command.GetChar(0U); + if (c != wxT('C')) + return false; + + c = command.GetChar(1U); + if (c < wxT('0') || c > wxT('9')) + return false; + + c = command.GetChar(2U); + if (c < wxT('0') || c > wxT('9')) + return false; + + c = command.GetChar(3U); + if (c < wxT('0') || c > wxT('9')) + return false; + + return true; +} diff --git a/Common/RepeaterHandler.h b/Common/RepeaterHandler.h index 0e1af0c..5871775 100644 --- a/Common/RepeaterHandler.h +++ b/Common/RepeaterHandler.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2015,2018 by Jonathan Naylor G4KLX + * Copyright (C) 2010-2015 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 @@ -33,7 +33,9 @@ #include "HeaderLogger.h" #include "CallsignList.h" #include "DRATSServer.h" +#include "CCSCallback.h" #include "VersionUnit.h" +#include "CCSHandler.h" #include "StatusData.h" #include "APRSWriter.h" #include "HeardData.h" @@ -54,7 +56,7 @@ #include -class CRepeaterHandler : public IRepeaterCallback, public IReflectorCallback { +class CRepeaterHandler : public IRepeaterCallback, public IReflectorCallback, public ICCSCallback { public: static void initialise(unsigned int maxRepeaters); @@ -126,6 +128,10 @@ public: virtual void linkRefused(DSTAR_PROTOCOL protocol, const wxString& callsign); virtual bool linkFailed(DSTAR_PROTOCOL protocol, const wxString& callsign, bool isRecoverable); + virtual void ccsLinkMade(const wxString& callsign, DIRECTION direction); + virtual void ccsLinkFailed(const wxString& dtmf, DIRECTION direction); + virtual void ccsLinkEnded(const wxString& callsign, DIRECTION direction); + protected: CRepeaterHandler(const wxString& callsign, const wxString& band, const wxString& address, unsigned int port, HW_TYPE hwType, const wxString& reflector, bool atStartup, RECONNECT reconnect, bool dratsEnabled, double frequency, double offset, double range, double latitude, double longitude, double agl, const wxString& description1, const wxString& description2, const wxString& url, IRepeaterProtocolHandler* handler, unsigned char band1, unsigned char band2, unsigned char band3); virtual ~CRepeaterHandler(); @@ -259,6 +265,9 @@ private: // Poll timer CTimer m_pollTimer; + // CCS + CCCSHandler* m_ccsHandler; + // Reflector restoration wxString m_lastReflector; @@ -268,6 +277,7 @@ private: CTimer m_heardTimer; void g2CommandHandler(const wxString& callsign, const wxString& user, CHeaderData& header); + void ccsCommandHandler(const wxString& callsign, const wxString& user, const wxString& type); void reflectorCommandHandler(const wxString& callsign, const wxString& user, const wxString& type); void sendToOutgoing(const CHeaderData& header); void sendToOutgoing(const CAMBEData& data); @@ -288,6 +298,8 @@ private: bool restoreLinks(); void triggerInfo(); + + bool isCCSCommand(const wxString& command) const; }; #endif diff --git a/Data/CCS_Hosts.txt b/Data/CCS_Hosts.txt new file mode 100644 index 0000000..e572182 --- /dev/null +++ b/Data/CCS_Hosts.txt @@ -0,0 +1,15 @@ +CCS701 ccs701.xreflector.net +CCS702 ccs702.xreflector.net +CCS703 ccs703.xreflector.net +CCS704 ccs704.xreflector.net +CCS705 ccs705.xreflector.net +CCS706 ccs706.xreflector.net +CCS707 ccs707.xreflector.net +CCS710 ccs710.xreflector.net +CCS711 ccs711.xreflector.net +CCS713 ccs713.xreflector.net +CCS721 ccs721.xreflector.net +CCS722 ccs722.xreflector.net +CCS724 ccs724.xreflector.net +CCS728 ccs728.xreflector.net +CCS732 ccs732.xreflector.net diff --git a/Data/Makefile b/Data/Makefile index 7957e04..4350c30 100644 --- a/Data/Makefile +++ b/Data/Makefile @@ -1,5 +1,6 @@ install: install -d -g bin -o root -m 0775 $(DATADIR) + install -g bin -o root -m 0664 CCS_Hosts.txt $(DATADIR) install -g bin -o root -m 0664 DCS_Hosts.txt $(DATADIR) install -g bin -o root -m 0664 DExtra_Hosts.txt $(DATADIR) install -g bin -o root -m 0664 DPlus_Hosts.txt $(DATADIR) diff --git a/ircDDBGateway32.nsi b/ircDDBGateway32.nsi index ec64901..6300ec4 100644 --- a/ircDDBGateway32.nsi +++ b/ircDDBGateway32.nsi @@ -59,6 +59,7 @@ Section "Repeater Program Files" SecProgram File "C:\wxWidgets-3.0.4\lib\vc_dll\wxmsw30u_core_vc_custom.dll" File "CHANGES.txt" File "COPYING.txt" + File "Data\CCS_Hosts.txt" File "Data\DCS_Hosts.txt" File "Data\DExtra_Hosts.txt" File "Data\DPlus_Hosts.txt" diff --git a/ircDDBGateway64.nsi b/ircDDBGateway64.nsi index e5a7248..fb1b779 100644 --- a/ircDDBGateway64.nsi +++ b/ircDDBGateway64.nsi @@ -59,6 +59,7 @@ Section "Repeater Program Files" SecProgram File "C:\wxWidgets-3.0.4\lib\vc_x64_dll\wxmsw30u_core_vc_x64_custom.dll" File "CHANGES.txt" File "COPYING.txt" + File "Data\CCS_Hosts.txt" File "Data\DCS_Hosts.txt" File "Data\DExtra_Hosts.txt" File "Data\DPlus_Hosts.txt" From dd2760b4349722c7d4c58daf211ee4a80970d9d7 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Wed, 19 Sep 2018 21:05:28 +0100 Subject: [PATCH 029/166] Add GUI makefiles for the other GUI capable programs. --- MakefileGUI | 41 +++++++++++++++++++-------------------- RemoteControl/MakefileGUI | 18 +++++++++++++++++ StarNetServer/MakefileGUI | 18 +++++++++++++++++ TimeServer/MakefileGUI | 17 ++++++++++++++++ TimerControl/MakefileGUI | 18 +++++++++++++++++ 5 files changed, 91 insertions(+), 21 deletions(-) create mode 100644 RemoteControl/MakefileGUI create mode 100644 StarNetServer/MakefileGUI create mode 100644 TimeServer/MakefileGUI create mode 100644 TimerControl/MakefileGUI diff --git a/MakefileGUI b/MakefileGUI index a47a5be..6cd4315 100644 --- a/MakefileGUI +++ b/MakefileGUI @@ -12,10 +12,10 @@ export GUILIBS := $(shell wx-config --libs adv,core,base) export LIBS := $(shell wx-config --libs base) export LDFLAGS := -all: ircDDBGateway/ircddbgatewayd ircDDBGatewayConfig/ircddbgatewayconfig APRSTransmit/aprstransmitd RemoteControl/remotecontrold \ - StarNetServer/starnetserverd TextTransmit/texttransmitd TimerControl/timercontrold TimeServer/timeserverd VoiceTransmit/voicetransmitd +all: ircDDBGateway/ircddbgateway ircDDBGatewayConfig/ircddbgatewayconfig APRSTransmit/aprstransmitd RemoteControl/remotecontrol \ + StarNetServer/starnetserver TextTransmit/texttransmitd TimerControl/timercontrol TimeServer/timeserver VoiceTransmit/voicetransmitd -ircDDBGateway/ircddbgatewayd: GUICommon/GUICommon.a Common/Common.a ircDDB/IRCDDB.a +ircDDBGateway/ircddbgateway: GUICommon/GUICommon.a Common/Common.a ircDDB/IRCDDB.a make -C ircDDBGateway -f MakefileGUI ircDDBGatewayConfig/ircddbgatewayconfig: GUICommon/GUICommon.a Common/Common.a @@ -24,20 +24,20 @@ ircDDBGatewayConfig/ircddbgatewayconfig: GUICommon/GUICommon.a Common/Common.a APRSTransmit/aprstransmitd: Common/Common.a make -C APRSTransmit -RemoteControl/remotecontrold: Common/Common.a - make -C RemoteControl +RemoteControl/remotecontrol: Common/Common.a + make -C RemoteControl -f MakefileGUI -StarNetServer/starnetserverd: Common/Common.a ircDDB/IRCDDB.a - make -C StarNetServer +StarNetServer/starnetserver: Common/Common.a ircDDB/IRCDDB.a + make -C StarNetServer -f MakefileGUI TextTransmit/texttransmitd: Common/Common.a make -C TextTransmit -TimerControl/timercontrold: Common/Common.a GUICommon/GUICommon.a - make -C TimerControl +TimerControl/timercontrol: Common/Common.a GUICommon/GUICommon.a + make -C TimerControl -f MakefileGUI -TimeServer/timeserverd: Common/Common.a GUICommon/GUICommon.a - make -C TimeServer +TimeServer/timeserver: Common/Common.a GUICommon/GUICommon.a + make -C TimeServer -f MakefileGUI VoiceTransmit/voicetransmitd: Common/Common.a make -C VoiceTransmit @@ -55,11 +55,11 @@ install: all make -C Data install make -C APRSTransmit install make -C ircDDBGateway -f MakefileGUI install - make -C RemoteControl install - make -C StarNetServer install + make -C RemoteControl -f MakefileGUI install + make -C StarNetServer -f MakefileGUI install make -C TextTransmit install - make -C TimerControl install - make -C TimeServer install + make -C TimerControl -f MakefileGUI install + make -C TimeServer -f MakefileGUI install make -C VoiceTransmit install make -C ircDDBGatewayConfig install @@ -68,12 +68,11 @@ clean: make -C ircDDB clean make -C GUICommon clean make -C APRSTransmit clean - make -C ircDDBGateway clean - make -C RemoteControl clean - make -C StarNetServer clean + make -C ircDDBGateway -f MakefileGUI clean + make -C RemoteControl -f MakefileGUI clean + make -C StarNetServer -f MakefileGUI clean make -C TextTransmit clean - make -C TimerControl clean - make -C TimeServer clean + make -C TimerControl -f MakefileGUI clean + make -C TimeServer -f MakefileGUI clean make -C VoiceTransmit clean make -C ircDDBGatewayConfig clean - diff --git a/RemoteControl/MakefileGUI b/RemoteControl/MakefileGUI new file mode 100644 index 0000000..316607f --- /dev/null +++ b/RemoteControl/MakefileGUI @@ -0,0 +1,18 @@ +OBJECTS = RemoteControlApp.o RemoteControlCallsignData.o RemoteControlConfig.o RemoteControlFrame.o RemoteControlLinkData.o \ + RemoteControlPreferences.o RemoteControlRemoteControlHandler.o RemoteControlRemoteSet.o RemoteControlRepeaterData.o \ + RemoteControlRepeaterPanel.o RemoteControlStarNetGroup.o RemoteControlStarNetPanel.o RemoteControlStarNetUser.o + +all: remotecontrol + +remotecontrol: $(OBJECTS) + $(CXX) $(OBJECTS) ../GUICommon/GUICommon.a ../Common/Common.a $(LDFLAGS) $(GUILIBS) -o remotecontrol + +%.o: %.cpp + $(CXX) $(CFLAGS) -I../Common -I../GUICommon -c -o $@ $< + +install: + install -g bin -o root -m 0775 remotecontrol $(BINDIR) + +clean: + $(RM) remotecontrol *.o *.d *.bak *~ + diff --git a/StarNetServer/MakefileGUI b/StarNetServer/MakefileGUI new file mode 100644 index 0000000..9073dab --- /dev/null +++ b/StarNetServer/MakefileGUI @@ -0,0 +1,18 @@ +OBJECTS = StarNetServerApp.o StarNetServerCallsignSet.o StarNetServerConfig.o StarNetServerFrame.o StarNetServerIrcDDBSet.o \ + StarNetServerLogRedirect.o StarNetServerMiscellaneousSet.o StarNetServerPreferences.o StarNetServerThread.o \ + StarNetServerThreadHelper.o + +all: starnetserver + +starnetserver: $(OBJECTS) + $(CXX) $(OBJECTS) ../GUICommon/GUICommon.a ../Common/Common.a ../ircDDB/IRCDDB.a $(LDFLAGS) $(GUILIBS) -o starnetserver + +%.o: %.cpp + $(CXX) $(CFLAGS) -I../Common -I../GUICommon -I../ircDDB -c -o $@ $< + +install: + install -g bin -o root -m 0775 starnetserver $(BINDIR) + +clean: + $(RM) starnetserver *.o *.d *.bak *~ + diff --git a/TimeServer/MakefileGUI b/TimeServer/MakefileGUI new file mode 100644 index 0000000..9ac2e11 --- /dev/null +++ b/TimeServer/MakefileGUI @@ -0,0 +1,17 @@ +OBJECTS = TimeServerApp.o TimeServerAnnouncementsSet.o TimeServerConfig.o TimeServerFrame.o TimeServerGatewaySet.o TimeServerLogRedirect.o \ + TimeServerPreferences.o TimeServerThread.o TimeServerThreadHelper.o + +all: timeserver + +timeserver: $(OBJECTS) + $(CXX) $(OBJECTS) ../GUICommon/GUICommon.a ../Common/Common.a $(LDFLAGS) $(GUILIBS) -o timeserver + +%.o: %.cpp + $(CXX) $(CFLAGS) -I../Common -I../GUICommon -c -o $@ $< + +install: + install -g bin -o root -m 0775 timeserver $(BINDIR) + +clean: + $(RM) timeserver *.o *.d *.bak *~ + diff --git a/TimerControl/MakefileGUI b/TimerControl/MakefileGUI new file mode 100644 index 0000000..0012a10 --- /dev/null +++ b/TimerControl/MakefileGUI @@ -0,0 +1,18 @@ +OBJECTS = TimerControlApp.o TimerControlConfig.o TimerControlFrame.o TimerControlItemFile.o TimerControlPreferences.o \ + TimerControlRemoteControlHandler.o TimerControlRemoteSet.o TimerControlRepeaterPanel.o TimerControlThread.o \ + TimerControlThreadHelper.o + +all: timercontrol + +timercontrol: $(OBJECTS) + $(CXX) $(OBJECTS) ../GUICommon/GUICommon.a ../Common/Common.a $(LDFLAGS) $(GUILIBS) -o timercontrol + +%.o: %.cpp + $(CXX) $(CFLAGS) -I../Common -I../GUICommon -c -o $@ $< + +install: + install -g bin -o root -m 0775 timercontrol $(BINDIR) + +clean: + $(RM) timercontrol *.o *.d *.bak *~ + From 3107a7f60edb220a589612d118d7bf4213622f1d Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Sun, 23 Sep 2018 15:42:00 +0100 Subject: [PATCH 030/166] Update the D-Plus authenticator host. --- Common/DPlusAuthenticator.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Common/DPlusAuthenticator.cpp b/Common/DPlusAuthenticator.cpp index 7c124a4..527df14 100644 --- a/Common/DPlusAuthenticator.cpp +++ b/Common/DPlusAuthenticator.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2015 by Jonathan Naylor G4KLX + * Copyright (C) 2010-2015,2018 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 @@ -22,7 +22,7 @@ #include "Utils.h" #include "Defs.h" -const wxString OPENDSTAR_HOSTNAME = wxT("opendstar.org"); +const wxString OPENDSTAR_HOSTNAME = wxT("auth.dstargateway.org"); const unsigned int OPENDSTAR_PORT = 20001U; const wxString DUTCHSTAR_HOSTNAME = wxT("dpns.dutch-star.eu"); From 6fe4d1c2e5626a47773f12c9f620f512cb21e1c9 Mon Sep 17 00:00:00 2001 From: Shawn Chain Date: Fri, 5 Oct 2018 10:18:58 +0800 Subject: [PATCH 031/166] create tun on linux only --- Common/DDHandler.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Common/DDHandler.cpp b/Common/DDHandler.cpp index cab79e6..0663450 100644 --- a/Common/DDHandler.cpp +++ b/Common/DDHandler.cpp @@ -27,8 +27,10 @@ #include #include #include +#if defined(__linux__) #include #include +#endif #include #endif @@ -103,7 +105,7 @@ void CDDHandler::initialise(unsigned int maxRoutes, const wxString& name) // Add a dummy entry for "DX-Cluster" multicast m_list[2] = new CEthernet(DX_MULTICAST_ADDRESS, wxT("CQCQCQ ")); -#if !defined(WIN32) +#if defined(__linux__) m_fd = ::open("/dev/net/tun", O_RDWR); if (m_fd < 0) { wxLogError(wxT("Cannot open /dev/net/tun")); From 828fd275a7a0b50d4f366c1bf9cf6825956f7199 Mon Sep 17 00:00:00 2001 From: Shawn Chain Date: Fri, 5 Oct 2018 10:50:39 +0800 Subject: [PATCH 032/166] Config naming fix --- ircDDBGateway/IRCDDBGatewayDefs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ircDDBGateway/IRCDDBGatewayDefs.h b/ircDDBGateway/IRCDDBGatewayDefs.h index 9eac8a0..db5a10c 100644 --- a/ircDDBGateway/IRCDDBGatewayDefs.h +++ b/ircDDBGateway/IRCDDBGatewayDefs.h @@ -23,7 +23,7 @@ const wxString APPLICATION_NAME = wxT("ircDDB Gateway"); -const wxString CONFIG_FILE_NAME = wxT("ircddbgateway"); +const wxString CONFIG_FILE_NAME = wxT("ircDDBGateway.ini"); const wxString STATUS1_FILE_NAME = wxT("status1.txt"); const wxString STATUS2_FILE_NAME = wxT("status2.txt"); From 3cf02e25bdee38baf182cfafcc0be4a5607c0f3f Mon Sep 17 00:00:00 2001 From: Shawn Chain Date: Fri, 5 Oct 2018 11:07:56 +0800 Subject: [PATCH 033/166] patch for openwrt --- Common/Makefile | 2 ++ Makefile | 17 ++--------------- common.mk | 27 +++++++++++++++++++++++++++ ircDDB/Makefile | 2 ++ ircDDBGateway/Makefile | 2 ++ 5 files changed, 35 insertions(+), 15 deletions(-) create mode 100644 common.mk diff --git a/Common/Makefile b/Common/Makefile index 8643148..a71fdbf 100644 --- a/Common/Makefile +++ b/Common/Makefile @@ -1,3 +1,5 @@ +include ../common.mk + OBJECTS = AMBEData.o AnnouncementUnit.o APRSCollector.o APRSWriter.o APRSWriterThread.o AudioUnit.o CacheManager.o CallsignList.o \ CallsignServer.o CCITTChecksum.o CCSData.o CCSHandler.o CCSProtocolHandler.o ConnectData.o DCSHandler.o DCSProtocolHandler.o \ DCSProtocolHandlerPool.o DDData.o DDHandler.o DExtraHandler.o DExtraProtocolHandler.o DExtraProtocolHandlerPool.o \ diff --git a/Makefile b/Makefile index e3c3283..fb7e425 100644 --- a/Makefile +++ b/Makefile @@ -1,19 +1,6 @@ -export DATADIR := "/usr/share/ircddbgateway" -export LOGDIR := "/var/log" -export CONFDIR := "/etc" -export BINDIR := "/usr/bin" +include common.mk -# Add -DDCS_LINK to the end of the CFLAGS line below to add DCS linking to StarNet -# Add -DDEXTRA_LINK to the end of the CFLAGS line below to add DExtra linking to StarNet - -export CXX := $(shell wx-config --cxx) -export CFLAGS := -O2 -Wall $(shell wx-config --cxxflags) -DLOG_DIR='$(LOGDIR)' -DCONF_DIR='$(CONFDIR)' -DDATA_DIR='$(DATADIR)' -export GUILIBS := $(shell wx-config --libs adv,core,base) -export LIBS := $(shell wx-config --libs base) -export LDFLAGS := - -all: ircDDBGateway/ircddbgatewayd ircDDBGatewayConfig/ircddbgatewayconfig APRSTransmit/aprstransmitd RemoteControl/remotecontrold \ - StarNetServer/starnetserverd TextTransmit/texttransmitd TimerControl/timercontrold TimeServer/timeserverd VoiceTransmit/voicetransmitd +all: ircDDBGateway/ircddbgatewayd ircDDBGateway/ircddbgatewayd: Common/Common.a ircDDB/IRCDDB.a make -C ircDDBGateway diff --git a/common.mk b/common.mk new file mode 100644 index 0000000..16e0902 --- /dev/null +++ b/common.mk @@ -0,0 +1,27 @@ + +# Add -DDCS_LINK to the end of the CFLAGS line below to add DCS linking to StarNet +# Add -DDEXTRA_LINK to the end of the CFLAGS line below to add DExtra linking to StarNet + +ifeq ($(OPENWRT),1) +DATADIR := "/etc/mmdvm/ircddbgateway" +LOGDIR := "/var/log/mmdvm" +CONFDIR := "/etc" +BINDIR := "/usr/bin" + +CFLAGS += -DLOG_DIR='$(LOGDIR)' -DCONF_DIR='$(CONFDIR)' -DDATA_DIR='$(DATADIR)' +LIBS += -lwxbase_u +LDFLAGS := + +else +DATADIR := "/usr/share/ircddbgateway" +LOGDIR := "/var/log" +CONFDIR := "/etc" +BINDIR := "/usr/bin" + +CXX := $(shell wx-config --cxx) +CFLAGS := -O2 -Wall $(shell wx-config --cxxflags) -DLOG_DIR='$(LOGDIR)' -DCONF_DIR='$(CONFDIR)' -DDATA_DIR='$(DATADIR)' +GUILIBS := $(shell wx-config --libs adv,core,base) +LIBS := $(shell wx-config --libs base) +LDFLAGS := + +endif diff --git a/ircDDB/Makefile b/ircDDB/Makefile index b841a5e..f93728e 100644 --- a/ircDDB/Makefile +++ b/ircDDB/Makefile @@ -1,3 +1,5 @@ +include ../common.mk + OBJECTS = IRCClient.o IRCDDBApp.o IRCDDBClient.o IRCDDB.o IRCDDBMultiClient.o IRCMessage.o IRCMessageQueue.o IRCProtocol.o IRCReceiver.o \ IRCutils.o diff --git a/ircDDBGateway/Makefile b/ircDDBGateway/Makefile index 3bf974e..62016ab 100644 --- a/ircDDBGateway/Makefile +++ b/ircDDBGateway/Makefile @@ -1,3 +1,5 @@ +include ../common.mk + OBJECTS = IRCDDBGatewayAppD.o IRCDDBGatewayStatusData.o IRCDDBGatewayThread.o IRCDDBGatewayThreadHelper.o all: ircddbgatewayd From 633d972ec4d8236b41b8907e783b262ae4985697 Mon Sep 17 00:00:00 2001 From: Shawn Chain Date: Fri, 5 Oct 2018 12:12:24 +0800 Subject: [PATCH 034/166] Fix link parameters --- common.mk | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/common.mk b/common.mk index 16e0902..e2a7724 100644 --- a/common.mk +++ b/common.mk @@ -2,26 +2,25 @@ # Add -DDCS_LINK to the end of the CFLAGS line below to add DCS linking to StarNet # Add -DDEXTRA_LINK to the end of the CFLAGS line below to add DExtra linking to StarNet -ifeq ($(OPENWRT),1) DATADIR := "/etc/mmdvm/ircddbgateway" LOGDIR := "/var/log/mmdvm" CONFDIR := "/etc" BINDIR := "/usr/bin" CFLAGS += -DLOG_DIR='$(LOGDIR)' -DCONF_DIR='$(CONFDIR)' -DDATA_DIR='$(DATADIR)' -LIBS += -lwxbase_u +LIBS += LDFLAGS := -else -DATADIR := "/usr/share/ircddbgateway" -LOGDIR := "/var/log" -CONFDIR := "/etc" -BINDIR := "/usr/bin" +# else +# DATADIR := "/usr/share/ircddbgateway" +# LOGDIR := "/var/log" +# CONFDIR := "/etc" +# BINDIR := "/usr/bin" -CXX := $(shell wx-config --cxx) -CFLAGS := -O2 -Wall $(shell wx-config --cxxflags) -DLOG_DIR='$(LOGDIR)' -DCONF_DIR='$(CONFDIR)' -DDATA_DIR='$(DATADIR)' -GUILIBS := $(shell wx-config --libs adv,core,base) -LIBS := $(shell wx-config --libs base) -LDFLAGS := +# CXX := $(shell wx-config --cxx) +# CFLAGS := -O2 -Wall $(shell wx-config --cxxflags) -DLOG_DIR='$(LOGDIR)' -DCONF_DIR='$(CONFDIR)' -DDATA_DIR='$(DATADIR)' +# GUILIBS := $(shell wx-config --libs adv,core,base) +# LIBS := $(shell wx-config --libs base) +# LDFLAGS := -endif +# endif From fef8348052e650fa2f139c7ab834428f35aa176f Mon Sep 17 00:00:00 2001 From: Shawn Chain Date: Fri, 5 Oct 2018 12:13:41 +0800 Subject: [PATCH 035/166] Fix compile error under openwrt --- Common/APRSWriterThread.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Common/APRSWriterThread.cpp b/Common/APRSWriterThread.cpp index 6c97d62..1a769ba 100644 --- a/Common/APRSWriterThread.cpp +++ b/Common/APRSWriterThread.cpp @@ -216,7 +216,7 @@ bool CAPRSWriterThread::connect() m_socket.close(); return false; } - wxLogMessage(wxT("Received login banner : ") + serverResponse); + wxLogMessage(wxT("Received login banner : %s") + serverResponse.c_str()); wxString filter(m_filter); if (filter.Length() > 0) filter.Prepend(wxT(" filter ")); @@ -242,7 +242,7 @@ bool CAPRSWriterThread::connect() return false; } - wxLogMessage(wxT("Response from APRS server: ") + serverResponse); + wxLogMessage(wxT("Response from APRS server: %s") + serverResponse.c_str()); wxLogMessage(wxT("Connected to the APRS server")); From 5e86cdb93a4660fe817dae9dad9822c5255c44fa Mon Sep 17 00:00:00 2001 From: Shawn Chain Date: Fri, 5 Oct 2018 12:17:13 +0800 Subject: [PATCH 036/166] fix the fix --- Common/APRSWriterThread.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Common/APRSWriterThread.cpp b/Common/APRSWriterThread.cpp index 1a769ba..240974b 100644 --- a/Common/APRSWriterThread.cpp +++ b/Common/APRSWriterThread.cpp @@ -216,7 +216,7 @@ bool CAPRSWriterThread::connect() m_socket.close(); return false; } - wxLogMessage(wxT("Received login banner : %s") + serverResponse.c_str()); + wxLogMessage(wxT("Received login banner : %s"), serverResponse.c_str()); wxString filter(m_filter); if (filter.Length() > 0) filter.Prepend(wxT(" filter ")); @@ -242,7 +242,7 @@ bool CAPRSWriterThread::connect() return false; } - wxLogMessage(wxT("Response from APRS server: %s") + serverResponse.c_str()); + wxLogMessage(wxT("Response from APRS server: %s"), serverResponse.c_str()); wxLogMessage(wxT("Connected to the APRS server")); From 67e45b1bf1888b5c132052e38fe1453ab5fcbd2e Mon Sep 17 00:00:00 2001 From: Shawn Chain Date: Fri, 5 Oct 2018 12:40:34 +0800 Subject: [PATCH 037/166] Try to work --- Common/DStarDefines.h | 1 + GlobalDefines.h | 11 +++++++++++ Makefile | 7 ++++++- common.mk | 26 -------------------------- 4 files changed, 18 insertions(+), 27 deletions(-) create mode 100644 GlobalDefines.h diff --git a/Common/DStarDefines.h b/Common/DStarDefines.h index 8ea9ae6..9a0b1f0 100644 --- a/Common/DStarDefines.h +++ b/Common/DStarDefines.h @@ -15,6 +15,7 @@ #define DStarDefines_H #include +#include "GlobalDefines.h" const unsigned int DSTAR_GMSK_SYMBOL_RATE = 4800U; const float DSTAR_GMSK_BT = 0.5F; diff --git a/GlobalDefines.h b/GlobalDefines.h new file mode 100644 index 0000000..c83a798 --- /dev/null +++ b/GlobalDefines.h @@ -0,0 +1,11 @@ +#ifndef __GLOBAL_DEFS__ +#define __GLOBAL_DEFS__ + +#ifndef DATA_DIR +#define DATA_DIR "/etc/mmdvm/ircddbgateway" +#define LOG_DIR "/var/log/mmdvm" +#define CONF_DIR "/etc" +#define BIN_DIR "/usr/bin" +#endif + +#endif diff --git a/Makefile b/Makefile index fb7e425..e14b3d3 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,9 @@ -include common.mk + +# CXX := $(shell wx-config --cxx) +# CFLAGS := -O2 -Wall $(shell wx-config --cxxflags) -DLOG_DIR='$(LOGDIR)' -DCONF_DIR='$(CONFDIR)' -DDATA_DIR='$(DATADIR)' +# GUILIBS := $(shell wx-config --libs adv,core,base) +# LIBS := $(shell wx-config --libs base) +# LDFLAGS := all: ircDDBGateway/ircddbgatewayd diff --git a/common.mk b/common.mk index e2a7724..e69de29 100644 --- a/common.mk +++ b/common.mk @@ -1,26 +0,0 @@ - -# Add -DDCS_LINK to the end of the CFLAGS line below to add DCS linking to StarNet -# Add -DDEXTRA_LINK to the end of the CFLAGS line below to add DExtra linking to StarNet - -DATADIR := "/etc/mmdvm/ircddbgateway" -LOGDIR := "/var/log/mmdvm" -CONFDIR := "/etc" -BINDIR := "/usr/bin" - -CFLAGS += -DLOG_DIR='$(LOGDIR)' -DCONF_DIR='$(CONFDIR)' -DDATA_DIR='$(DATADIR)' -LIBS += -LDFLAGS := - -# else -# DATADIR := "/usr/share/ircddbgateway" -# LOGDIR := "/var/log" -# CONFDIR := "/etc" -# BINDIR := "/usr/bin" - -# CXX := $(shell wx-config --cxx) -# CFLAGS := -O2 -Wall $(shell wx-config --cxxflags) -DLOG_DIR='$(LOGDIR)' -DCONF_DIR='$(CONFDIR)' -DDATA_DIR='$(DATADIR)' -# GUILIBS := $(shell wx-config --libs adv,core,base) -# LIBS := $(shell wx-config --libs base) -# LDFLAGS := - -# endif From 169db8e466d33d60ee58adef112adde875e82be8 Mon Sep 17 00:00:00 2001 From: Shawn Chain Date: Fri, 5 Oct 2018 20:18:42 +0800 Subject: [PATCH 038/166] extract file names to global defs --- Common/DStarDefines.h | 2 +- GlobalDefines.h | 22 ++++++++++++++++++---- Makefile | 11 +++++------ ircDDBGateway/IRCDDBGatewayAppD.cpp | 4 +++- ircDDBGateway/IRCDDBGatewayDefs.h | 3 ++- 5 files changed, 29 insertions(+), 13 deletions(-) diff --git a/Common/DStarDefines.h b/Common/DStarDefines.h index 9a0b1f0..e624cd1 100644 --- a/Common/DStarDefines.h +++ b/Common/DStarDefines.h @@ -15,7 +15,7 @@ #define DStarDefines_H #include -#include "GlobalDefines.h" +#include "../GlobalDefines.h" const unsigned int DSTAR_GMSK_SYMBOL_RATE = 4800U; const float DSTAR_GMSK_BT = 0.5F; diff --git a/GlobalDefines.h b/GlobalDefines.h index c83a798..d9a8a8c 100644 --- a/GlobalDefines.h +++ b/GlobalDefines.h @@ -1,11 +1,25 @@ #ifndef __GLOBAL_DEFS__ #define __GLOBAL_DEFS__ -#ifndef DATA_DIR -#define DATA_DIR "/etc/mmdvm/ircddbgateway" +#if defined(__APPLE__) +#define DATA_DIR "/etc/mmdvm/dstar" #define LOG_DIR "/var/log/mmdvm" #define CONF_DIR "/etc" -#define BIN_DIR "/usr/bin" -#endif +#define CONF_FILE "ircDDBGateway.ini" +#define LOG_BASE "ircDDBGateway" + +#elif defined(OPENWRT) && OPENWRT == 1 +#define DATA_DIR "/etc/mmdvm/dstar" +#define LOG_DIR "/var/log/mmdvm" +#define CONF_DIR "/etc" +#define CONF_FILE "ircDDBGateway.ini" +#define LOG_BASE "ircDDBGateway" + +#else +#define DATA_DIR "/usr/share/ircddbgateway" +#define LOG_DIR "/tmp" +#define CONF_DIR "/etc" +#define CONF_FILE "ircddbgateway" +#define LOG_BASE "ircddbgateway" #endif diff --git a/Makefile b/Makefile index e14b3d3..670c12d 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,8 @@ - -# CXX := $(shell wx-config --cxx) -# CFLAGS := -O2 -Wall $(shell wx-config --cxxflags) -DLOG_DIR='$(LOGDIR)' -DCONF_DIR='$(CONFDIR)' -DDATA_DIR='$(DATADIR)' -# GUILIBS := $(shell wx-config --libs adv,core,base) -# LIBS := $(shell wx-config --libs base) -# LDFLAGS := +# export CXX ?= $(shell wx-config --cxx) +# export CFLAGS ?= -O2 -Wall $(shell wx-config --cxxflags) +# export GUILIBS ?= $(shell wx-config --libs adv,core,base) +# export LIBS ?= $(shell wx-config --libs base) +# export LDFLAGS ?= all: ircDDBGateway/ircddbgatewayd diff --git a/ircDDBGateway/IRCDDBGatewayAppD.cpp b/ircDDBGateway/IRCDDBGatewayAppD.cpp index 0132c92..556280b 100644 --- a/ircDDBGateway/IRCDDBGatewayAppD.cpp +++ b/ircDDBGateway/IRCDDBGatewayAppD.cpp @@ -42,13 +42,15 @@ #include #include +#include "../GlobalDefines.h" + const wxChar* NAME_PARAM = wxT("Gateway Name"); const wxChar* NOLOGGING_SWITCH = wxT("nolog"); const wxChar* LOGDIR_OPTION = wxT("logdir"); const wxChar* CONFDIR_OPTION = wxT("confdir"); const wxChar* DAEMON_SWITCH = wxT("daemon"); -const wxString LOG_BASE_NAME = wxT("ircddbgatewayd"); +const wxString LOG_BASE_NAME = wxT("LOG_BASE"); static CIRCDDBGatewayAppD* m_gateway = NULL; diff --git a/ircDDBGateway/IRCDDBGatewayDefs.h b/ircDDBGateway/IRCDDBGatewayDefs.h index db5a10c..7806c3b 100644 --- a/ircDDBGateway/IRCDDBGatewayDefs.h +++ b/ircDDBGateway/IRCDDBGatewayDefs.h @@ -20,10 +20,11 @@ #define IRCDDBGatewayDefs_H #include +#include "../GlobalDefines.h" const wxString APPLICATION_NAME = wxT("ircDDB Gateway"); -const wxString CONFIG_FILE_NAME = wxT("ircDDBGateway.ini"); +const wxString CONFIG_FILE_NAME = wxT(CONF_FILE); const wxString STATUS1_FILE_NAME = wxT("status1.txt"); const wxString STATUS2_FILE_NAME = wxT("status2.txt"); From 69f5532e4582f516b5e347cbff2c1f388bbe27f5 Mon Sep 17 00:00:00 2001 From: Shawn Chain Date: Fri, 5 Oct 2018 20:21:05 +0800 Subject: [PATCH 039/166] Fix broken ifdef --- GlobalDefines.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/GlobalDefines.h b/GlobalDefines.h index d9a8a8c..b70ff1d 100644 --- a/GlobalDefines.h +++ b/GlobalDefines.h @@ -23,3 +23,5 @@ #define LOG_BASE "ircddbgateway" #endif + +#endif From c4641b035602d7a2497691e010b22603408f47d8 Mon Sep 17 00:00:00 2001 From: Shawn Chain Date: Fri, 5 Oct 2018 20:31:35 +0800 Subject: [PATCH 040/166] Fix LOG_BASE def --- ircDDBGateway/IRCDDBGatewayAppD.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ircDDBGateway/IRCDDBGatewayAppD.cpp b/ircDDBGateway/IRCDDBGatewayAppD.cpp index 556280b..b9ce115 100644 --- a/ircDDBGateway/IRCDDBGatewayAppD.cpp +++ b/ircDDBGateway/IRCDDBGatewayAppD.cpp @@ -50,7 +50,7 @@ const wxChar* LOGDIR_OPTION = wxT("logdir"); const wxChar* CONFDIR_OPTION = wxT("confdir"); const wxChar* DAEMON_SWITCH = wxT("daemon"); -const wxString LOG_BASE_NAME = wxT("LOG_BASE"); +const wxString LOG_BASE_NAME = wxT(LOG_BASE); static CIRCDDBGatewayAppD* m_gateway = NULL; From 1e933b412093ca1528299eefebb12bcdbf27954b Mon Sep 17 00:00:00 2001 From: Shawn Chain Date: Fri, 5 Oct 2018 21:31:34 +0800 Subject: [PATCH 041/166] Clean up --- Common/Makefile | 2 -- GlobalDefines.h | 8 ++++---- common.mk | 0 ircDDB/Makefile | 2 -- ircDDBGateway/Makefile | 2 -- 5 files changed, 4 insertions(+), 10 deletions(-) delete mode 100644 common.mk diff --git a/Common/Makefile b/Common/Makefile index a71fdbf..8643148 100644 --- a/Common/Makefile +++ b/Common/Makefile @@ -1,5 +1,3 @@ -include ../common.mk - OBJECTS = AMBEData.o AnnouncementUnit.o APRSCollector.o APRSWriter.o APRSWriterThread.o AudioUnit.o CacheManager.o CallsignList.o \ CallsignServer.o CCITTChecksum.o CCSData.o CCSHandler.o CCSProtocolHandler.o ConnectData.o DCSHandler.o DCSProtocolHandler.o \ DCSProtocolHandlerPool.o DDData.o DDHandler.o DExtraHandler.o DExtraProtocolHandler.o DExtraProtocolHandlerPool.o \ diff --git a/GlobalDefines.h b/GlobalDefines.h index b70ff1d..c5317a5 100644 --- a/GlobalDefines.h +++ b/GlobalDefines.h @@ -2,9 +2,9 @@ #define __GLOBAL_DEFS__ #if defined(__APPLE__) -#define DATA_DIR "/etc/mmdvm/dstar" -#define LOG_DIR "/var/log/mmdvm" -#define CONF_DIR "/etc" +#define DATA_DIR "/opt/mmdvm/conf/dstar" +#define LOG_DIR "/opt/mmdvm/logs" +#define CONF_DIR "/opt/mmdvm/conf" #define CONF_FILE "ircDDBGateway.ini" #define LOG_BASE "ircDDBGateway" @@ -20,7 +20,7 @@ #define LOG_DIR "/tmp" #define CONF_DIR "/etc" #define CONF_FILE "ircddbgateway" -#define LOG_BASE "ircddbgateway" +#define LOG_BASE "ircddbgatewayd" #endif diff --git a/common.mk b/common.mk deleted file mode 100644 index e69de29..0000000 diff --git a/ircDDB/Makefile b/ircDDB/Makefile index f93728e..b841a5e 100644 --- a/ircDDB/Makefile +++ b/ircDDB/Makefile @@ -1,5 +1,3 @@ -include ../common.mk - OBJECTS = IRCClient.o IRCDDBApp.o IRCDDBClient.o IRCDDB.o IRCDDBMultiClient.o IRCMessage.o IRCMessageQueue.o IRCProtocol.o IRCReceiver.o \ IRCutils.o diff --git a/ircDDBGateway/Makefile b/ircDDBGateway/Makefile index 62016ab..3bf974e 100644 --- a/ircDDBGateway/Makefile +++ b/ircDDBGateway/Makefile @@ -1,5 +1,3 @@ -include ../common.mk - OBJECTS = IRCDDBGatewayAppD.o IRCDDBGatewayStatusData.o IRCDDBGatewayThread.o IRCDDBGatewayThreadHelper.o all: ircddbgatewayd From e3facce658b0edd9514c79e7e44d37266723904c Mon Sep 17 00:00:00 2001 From: Shawn Chain Date: Sun, 7 Oct 2018 00:47:15 +0800 Subject: [PATCH 042/166] add debug param to reduce logs --- Common/Logger.cpp | 8 +++++++- Common/XLXHostsFileDownloader.cpp | 1 + ircDDBGateway/IRCDDBGatewayAppD.cpp | 16 +++++++++++++--- ircDDBGateway/IRCDDBGatewayAppD.h | 3 ++- ircDDBGateway/IRCDDBGatewayThread.cpp | 16 ++++++++-------- 5 files changed, 31 insertions(+), 13 deletions(-) diff --git a/Common/Logger.cpp b/Common/Logger.cpp index 8edd3b1..26f5422 100644 --- a/Common/Logger.cpp +++ b/Common/Logger.cpp @@ -80,7 +80,13 @@ void CLogger::DoLogRecord(wxLogLevel level, const wxString& msg, const wxLogReco default: letter = wxT("U"); break; } - struct tm* tm = ::gmtime(&info.timestamp); + bool utc = false; + struct tm* tm; + if (utc){ + tm = ::gmtime(&info.timestamp); + }else{ + tm = ::localtime(&info.timestamp); + } wxString message; message.Printf(wxT("%s: %04d-%02d-%02d %02d:%02d:%02d: %s\n"), letter.c_str(), tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec, msg.c_str()); diff --git a/Common/XLXHostsFileDownloader.cpp b/Common/XLXHostsFileDownloader.cpp index bcf86de..633d9f8 100644 --- a/Common/XLXHostsFileDownloader.cpp +++ b/Common/XLXHostsFileDownloader.cpp @@ -29,6 +29,7 @@ wxString CXLXHostsFileDownloader::Download(const wxString & xlxHostsFileURL) { #ifdef XLX_USE_WGET wxString xlxHostsFileName = wxFileName::CreateTempFileName(_T("XLX_Hosts_")); + wxLogMessage(_T("Downloading XLX host file...")); wxString commandLine = _T("wget -q -O ") + xlxHostsFileName + _T(" ") + xlxHostsFileURL; bool execResult = wxShell(commandLine); diff --git a/ircDDBGateway/IRCDDBGatewayAppD.cpp b/ircDDBGateway/IRCDDBGatewayAppD.cpp index b9ce115..741763c 100644 --- a/ircDDBGateway/IRCDDBGatewayAppD.cpp +++ b/ircDDBGateway/IRCDDBGatewayAppD.cpp @@ -49,6 +49,7 @@ const wxChar* NOLOGGING_SWITCH = wxT("nolog"); const wxChar* LOGDIR_OPTION = wxT("logdir"); const wxChar* CONFDIR_OPTION = wxT("confdir"); const wxChar* DAEMON_SWITCH = wxT("daemon"); +const wxChar* DEBUG_SWITCH = wxT("debug"); const wxString LOG_BASE_NAME = wxT(LOG_BASE); @@ -70,6 +71,7 @@ int main(int argc, char** argv) wxCmdLineParser parser(argc, argv); parser.AddSwitch(NOLOGGING_SWITCH, wxEmptyString, wxEmptyString, wxCMD_LINE_PARAM_OPTIONAL); parser.AddSwitch(DAEMON_SWITCH, wxEmptyString, wxEmptyString, wxCMD_LINE_PARAM_OPTIONAL); + parser.AddSwitch(DEBUG_SWITCH, wxEmptyString, wxEmptyString, wxCMD_LINE_PARAM_OPTIONAL); parser.AddOption(LOGDIR_OPTION, wxEmptyString, wxEmptyString, wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL); parser.AddOption(CONFDIR_OPTION, wxEmptyString, wxEmptyString, wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL); parser.AddParam(NAME_PARAM, wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL); @@ -82,6 +84,7 @@ int main(int argc, char** argv) bool nolog = parser.Found(NOLOGGING_SWITCH); bool daemon = parser.Found(DAEMON_SWITCH); + bool debug = parser.Found(DEBUG_SWITCH); wxString logDir; bool found = parser.Found(LOGDIR_OPTION, &logDir); @@ -137,7 +140,7 @@ int main(int argc, char** argv) ::fclose(fp); } - m_gateway = new CIRCDDBGatewayAppD(nolog, logDir, confDir, name); + m_gateway = new CIRCDDBGatewayAppD(nolog, debug, logDir, confDir, name); if (!m_gateway->init()) { ::wxUninitialize(); return 1; @@ -156,9 +159,10 @@ int main(int argc, char** argv) return 0; } -CIRCDDBGatewayAppD::CIRCDDBGatewayAppD(bool nolog, const wxString& logDir, const wxString& confDir, const wxString& name) : +CIRCDDBGatewayAppD::CIRCDDBGatewayAppD(bool nolog, bool debug, const wxString& logDir, const wxString& confDir, const wxString& name) : m_name(name), m_nolog(nolog), +m_debug(debug), m_logDir(logDir), m_confDir(confDir), m_thread(NULL), @@ -184,7 +188,13 @@ bool CIRCDDBGatewayAppD::init() wxLog* log = new CLogger(m_logDir, logBaseName); wxLog::SetActiveTarget(log); - wxLog::SetVerbose(); + if (m_debug){ + wxLog::SetVerbose(); + wxLog::SetLogLevel(wxLOG_Debug); + }else{ + wxLog::SetVerbose(false); + wxLog::SetLogLevel(wxLOG_Message); + } } else { new wxLogNull; } diff --git a/ircDDBGateway/IRCDDBGatewayAppD.h b/ircDDBGateway/IRCDDBGatewayAppD.h index bee1aa4..d3bbff7 100644 --- a/ircDDBGateway/IRCDDBGatewayAppD.h +++ b/ircDDBGateway/IRCDDBGatewayAppD.h @@ -28,7 +28,7 @@ class CIRCDDBGatewayAppD { public: - CIRCDDBGatewayAppD(bool nolog, const wxString& logDir, const wxString& confDir, const wxString& name); + CIRCDDBGatewayAppD(bool nolog, bool debug, const wxString& logDir, const wxString& confDir, const wxString& name); ~CIRCDDBGatewayAppD(); bool init(); @@ -40,6 +40,7 @@ public: private: wxString m_name; bool m_nolog; + bool m_debug; wxString m_logDir; wxString m_confDir; CIRCDDBGatewayThread* m_thread; diff --git a/ircDDBGateway/IRCDDBGatewayThread.cpp b/ircDDBGateway/IRCDDBGatewayThread.cpp index 268a04d..b138d75 100644 --- a/ircDDBGateway/IRCDDBGatewayThread.cpp +++ b/ircDDBGateway/IRCDDBGatewayThread.cpp @@ -684,19 +684,19 @@ void CIRCDDBGatewayThread::processIrcDDB() case 0: case 10: if (m_lastStatus != IS_DISCONNECTED) { - wxLogInfo(wxT("Disconnected from ircDDB")); + wxLogMessage(wxT("Disconnected from ircDDB")); m_lastStatus = IS_DISCONNECTED; } break; case 7: if (m_lastStatus != IS_CONNECTED) { - wxLogInfo(wxT("Connected to ircDDB")); + wxLogMessage(wxT("Connected to ircDDB")); m_lastStatus = IS_CONNECTED; } break; default: if (m_lastStatus != IS_CONNECTING) { - wxLogInfo(wxT("Connecting to ircDDB")); + wxLogMessage(wxT("Connecting to ircDDB")); m_lastStatus = IS_CONNECTING; } break; @@ -717,10 +717,10 @@ void CIRCDDBGatewayThread::processIrcDDB() break; if (!address.IsEmpty()) { - wxLogMessage(wxT("USER: %s %s %s %s"), user.c_str(), repeater.c_str(), gateway.c_str(), address.c_str()); + wxLogInfo(wxT("USER: %s %s %s %s"), user.c_str(), repeater.c_str(), gateway.c_str(), address.c_str()); m_cache.updateUser(user, repeater, gateway, address, timestamp, DP_DEXTRA, false, false); } else { - wxLogMessage(wxT("USER: %s NOT FOUND"), user.c_str()); + wxLogInfo(wxT("USER: %s NOT FOUND"), user.c_str()); } } break; @@ -733,7 +733,7 @@ void CIRCDDBGatewayThread::processIrcDDB() CRepeaterHandler::resolveRepeater(repeater, gateway, address, DP_DEXTRA); if (!address.IsEmpty()) { - wxLogMessage(wxT("REPEATER: %s %s %s"), repeater.c_str(), gateway.c_str(), address.c_str()); + wxLogInfo(wxT("REPEATER: %s %s %s"), repeater.c_str(), gateway.c_str(), address.c_str()); m_cache.updateRepeater(repeater, gateway, address, DP_DEXTRA, false, false); } else { wxLogMessage(wxT("REPEATER: %s NOT FOUND"), repeater.c_str()); @@ -750,7 +750,7 @@ void CIRCDDBGatewayThread::processIrcDDB() CDExtraHandler::gatewayUpdate(gateway, address); CDPlusHandler::gatewayUpdate(gateway, address); if (!address.IsEmpty()) { - wxLogMessage(wxT("GATEWAY: %s %s"), gateway.c_str(), address.c_str()); + wxLogInfo(wxT("GATEWAY: %s %s"), gateway.c_str(), address.c_str()); m_cache.updateGateway(gateway, address, DP_DEXTRA, false, false); } else { wxLogMessage(wxT("GATEWAY: %s NOT FOUND"), gateway.c_str()); @@ -794,7 +794,7 @@ void CIRCDDBGatewayThread::processRepeater(IRepeaterProtocolHandler* handler) if (!repeater.IsSameAs(user)) { CRepeaterHandler* handler = CRepeaterHandler::findDVRepeater(repeater); if (handler == NULL) - wxLogMessage(wxT("Heard received from unknown repeater, %s"), repeater.c_str()); + wxLogInfo(wxT("Heard received from unknown repeater, %s"), repeater.c_str()); else handler->processRepeater(*heard); From d1c55b93944997ec1892bac8bc574bc714e8f847 Mon Sep 17 00:00:00 2001 From: Geoffrey Merck Date: Fri, 2 Nov 2018 09:17:18 +0100 Subject: [PATCH 043/166] Add UDP Hole Punching for G2 --- Common/G2ProtocolHandler.cpp | 12 ++++++++++++ Common/G2ProtocolHandler.h | 2 ++ ircDDBGateway/IRCDDBGatewayThread.cpp | 3 +++ 3 files changed, 17 insertions(+) diff --git a/Common/G2ProtocolHandler.cpp b/Common/G2ProtocolHandler.cpp index 8f68b98..e1e49af 100644 --- a/Common/G2ProtocolHandler.cpp +++ b/Common/G2ProtocolHandler.cpp @@ -144,6 +144,18 @@ CAMBEData* CG2ProtocolHandler::readAMBE() return data; } +void CG2ProtocolHandler::PunchUDPHole(const wxString& address) +{ + unsigned char buffer[1]; + ::memset(buffer, 0, 1); + + in_addr addr = CUDPReaderWriter::lookup(address); + + //wxLogError(wxT("Punching hole to %s"), address.mb_str()); + + m_socket.write(buffer, 1, addr, G2_DV_PORT); +} + void CG2ProtocolHandler::close() { m_socket.close(); diff --git a/Common/G2ProtocolHandler.h b/Common/G2ProtocolHandler.h index 3a87834..b6ca32e 100644 --- a/Common/G2ProtocolHandler.h +++ b/Common/G2ProtocolHandler.h @@ -52,6 +52,8 @@ public: CHeaderData* readHeader(); CAMBEData* readAMBE(); + void PunchUDPHole(const wxString& addr); + void close(); private: diff --git a/ircDDBGateway/IRCDDBGatewayThread.cpp b/ircDDBGateway/IRCDDBGatewayThread.cpp index 268a04d..3ce9762 100644 --- a/ircDDBGateway/IRCDDBGatewayThread.cpp +++ b/ircDDBGateway/IRCDDBGatewayThread.cpp @@ -719,6 +719,7 @@ void CIRCDDBGatewayThread::processIrcDDB() if (!address.IsEmpty()) { wxLogMessage(wxT("USER: %s %s %s %s"), user.c_str(), repeater.c_str(), gateway.c_str(), address.c_str()); m_cache.updateUser(user, repeater, gateway, address, timestamp, DP_DEXTRA, false, false); + m_g2Handler->PunchUDPHole(address); } else { wxLogMessage(wxT("USER: %s NOT FOUND"), user.c_str()); } @@ -735,6 +736,7 @@ void CIRCDDBGatewayThread::processIrcDDB() if (!address.IsEmpty()) { wxLogMessage(wxT("REPEATER: %s %s %s"), repeater.c_str(), gateway.c_str(), address.c_str()); m_cache.updateRepeater(repeater, gateway, address, DP_DEXTRA, false, false); + m_g2Handler->PunchUDPHole(address); } else { wxLogMessage(wxT("REPEATER: %s NOT FOUND"), repeater.c_str()); } @@ -752,6 +754,7 @@ void CIRCDDBGatewayThread::processIrcDDB() if (!address.IsEmpty()) { wxLogMessage(wxT("GATEWAY: %s %s"), gateway.c_str(), address.c_str()); m_cache.updateGateway(gateway, address, DP_DEXTRA, false, false); + m_g2Handler->PunchUDPHole(address); } else { wxLogMessage(wxT("GATEWAY: %s NOT FOUND"), gateway.c_str()); } From ee4ceb85d19c2c172fe08ce136bc31f876516659 Mon Sep 17 00:00:00 2001 From: Geoffrey Merck Date: Fri, 2 Nov 2018 09:24:12 +0100 Subject: [PATCH 044/166] Change function name casing Change function name casing to stick to project convention. --- Common/G2ProtocolHandler.cpp | 2 +- Common/G2ProtocolHandler.h | 2 +- ircDDBGateway/IRCDDBGatewayThread.cpp | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Common/G2ProtocolHandler.cpp b/Common/G2ProtocolHandler.cpp index e1e49af..7d1fc7e 100644 --- a/Common/G2ProtocolHandler.cpp +++ b/Common/G2ProtocolHandler.cpp @@ -144,7 +144,7 @@ CAMBEData* CG2ProtocolHandler::readAMBE() return data; } -void CG2ProtocolHandler::PunchUDPHole(const wxString& address) +void CG2ProtocolHandler::punchUDPHole(const wxString& address) { unsigned char buffer[1]; ::memset(buffer, 0, 1); diff --git a/Common/G2ProtocolHandler.h b/Common/G2ProtocolHandler.h index b6ca32e..8b74bd5 100644 --- a/Common/G2ProtocolHandler.h +++ b/Common/G2ProtocolHandler.h @@ -52,7 +52,7 @@ public: CHeaderData* readHeader(); CAMBEData* readAMBE(); - void PunchUDPHole(const wxString& addr); + void punchUDPHole(const wxString& addr); void close(); diff --git a/ircDDBGateway/IRCDDBGatewayThread.cpp b/ircDDBGateway/IRCDDBGatewayThread.cpp index 3ce9762..9da5110 100644 --- a/ircDDBGateway/IRCDDBGatewayThread.cpp +++ b/ircDDBGateway/IRCDDBGatewayThread.cpp @@ -719,7 +719,7 @@ void CIRCDDBGatewayThread::processIrcDDB() if (!address.IsEmpty()) { wxLogMessage(wxT("USER: %s %s %s %s"), user.c_str(), repeater.c_str(), gateway.c_str(), address.c_str()); m_cache.updateUser(user, repeater, gateway, address, timestamp, DP_DEXTRA, false, false); - m_g2Handler->PunchUDPHole(address); + m_g2Handler->punchUDPHole(address); } else { wxLogMessage(wxT("USER: %s NOT FOUND"), user.c_str()); } @@ -736,7 +736,7 @@ void CIRCDDBGatewayThread::processIrcDDB() if (!address.IsEmpty()) { wxLogMessage(wxT("REPEATER: %s %s %s"), repeater.c_str(), gateway.c_str(), address.c_str()); m_cache.updateRepeater(repeater, gateway, address, DP_DEXTRA, false, false); - m_g2Handler->PunchUDPHole(address); + m_g2Handler->punchUDPHole(address); } else { wxLogMessage(wxT("REPEATER: %s NOT FOUND"), repeater.c_str()); } @@ -754,7 +754,7 @@ void CIRCDDBGatewayThread::processIrcDDB() if (!address.IsEmpty()) { wxLogMessage(wxT("GATEWAY: %s %s"), gateway.c_str(), address.c_str()); m_cache.updateGateway(gateway, address, DP_DEXTRA, false, false); - m_g2Handler->PunchUDPHole(address); + m_g2Handler->punchUDPHole(address); } else { wxLogMessage(wxT("GATEWAY: %s NOT FOUND"), gateway.c_str()); } From bb041a10be04d6f9b8df4cfdb91028d772d6902a Mon Sep 17 00:00:00 2001 From: Geoffrey Merck F4FXL - KC3FRA Date: Fri, 2 Nov 2018 14:16:53 +0100 Subject: [PATCH 045/166] Revert log file naming Revert log file naming introduced with https://github.com/dl5di/OpenDV/commit/559c33043a0dd360d1f32b97337daaafc7a90007#diff-1fcebfc553fc1c28884296bcbeffa74c Now log file has date in name, like it was prior to this commit. --- Common/Logger.cpp | 29 ++++++++++++----------------- Common/Logger.h | 11 ++++------- ircDDBGateway/IRCDDBGatewayAppD.cpp | 2 +- 3 files changed, 17 insertions(+), 25 deletions(-) diff --git a/Common/Logger.cpp b/Common/Logger.cpp index 8edd3b1..1771c2e 100644 --- a/Common/Logger.cpp +++ b/Common/Logger.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002,2003,2009,2011,2012,2018 by Jonathan Naylor G4KLX + * Copyright (C) 2002,2003,2009,2011,2012 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 @@ -19,20 +19,17 @@ #include "Logger.h" CLogger::CLogger(const wxString& directory, const wxString& name) : -#if(defined(__WINDOWS__)) -m_day(0), -#endif wxLog(), m_name(name), m_file(NULL), -m_fileName() +m_fileName(), +m_day(0) { m_file = new wxFFile; m_fileName.SetPath(directory); m_fileName.SetExt(wxT("log")); -#if(defined(__WINDOWS__)) time_t timestamp; ::time(×tamp); struct tm* tm = ::gmtime(×tamp); @@ -42,9 +39,6 @@ m_fileName() m_day = tm->tm_yday; m_fileName.SetName(text); -#else - m_fileName.SetName(m_name); -#endif bool ret = m_file->Open(m_fileName.GetFullPath(), wxT("a+t")); if (!ret) { @@ -61,10 +55,11 @@ CLogger::~CLogger() delete m_file; } -void CLogger::DoLogRecord(wxLogLevel level, const wxString& msg, const wxLogRecordInfo& info) +void CLogger::DoLog(wxLogLevel level, const wxChar* msg, time_t timestamp) { wxASSERT(m_file != NULL); wxASSERT(m_file->IsOpened()); + wxASSERT(msg != NULL); wxString letter; @@ -80,23 +75,23 @@ void CLogger::DoLogRecord(wxLogLevel level, const wxString& msg, const wxLogReco default: letter = wxT("U"); break; } - struct tm* tm = ::gmtime(&info.timestamp); + struct tm* tm = ::gmtime(×tamp); wxString message; - message.Printf(wxT("%s: %04d-%02d-%02d %02d:%02d:%02d: %s\n"), letter.c_str(), tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec, msg.c_str()); + message.Printf(wxT("%s: %04d-%02d-%02d %02d:%02d:%02d: %s\n"), letter.c_str(), tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec, msg); - logString(message, info.timestamp); + DoLogString(message.c_str(), timestamp); if (level == wxLOG_FatalError) ::abort(); } -void CLogger::logString(const wxString& msg, time_t timestamp) +void CLogger::DoLogString(const wxChar* msg, time_t timestamp) { wxASSERT(m_file != NULL); wxASSERT(m_file->IsOpened()); + wxASSERT(msg != NULL); -#if(defined(__WINDOWS__)) struct tm* tm = ::gmtime(×tamp); int day = tm->tm_yday; @@ -115,8 +110,8 @@ void CLogger::logString(const wxString& msg, time_t timestamp) return; } } -#endif - m_file->Write(msg); + m_file->Write(wxString(msg)); m_file->Flush(); } + diff --git a/Common/Logger.h b/Common/Logger.h index 0d082f0..29523df 100644 --- a/Common/Logger.h +++ b/Common/Logger.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002,2003,2009,2011,2012,2018 by Jonathan Naylor G4KLX + * Copyright (C) 2002,2003,2009,2011,2012 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 @@ -22,24 +22,21 @@ #include #include #include -#include class CLogger : public wxLog { public: CLogger(const wxString& directory, const wxString& name); virtual ~CLogger(); - virtual void DoLogRecord(wxLogLevel level, const wxString& msg, const wxLogRecordInfo& info); + virtual void DoLog(wxLogLevel level, const wxChar* msg, time_t timestamp); + virtual void DoLogString(const wxChar* msg, time_t timestamp); private: wxString m_name; wxFFile* m_file; wxFileName m_fileName; -#if(defined(__WINDOWS__)) int m_day; -#endif - - void logString(const wxString& msg, time_t timestamp); }; #endif + diff --git a/ircDDBGateway/IRCDDBGatewayAppD.cpp b/ircDDBGateway/IRCDDBGatewayAppD.cpp index 0132c92..4f0a438 100644 --- a/ircDDBGateway/IRCDDBGatewayAppD.cpp +++ b/ircDDBGateway/IRCDDBGatewayAppD.cpp @@ -48,7 +48,7 @@ const wxChar* LOGDIR_OPTION = wxT("logdir"); const wxChar* CONFDIR_OPTION = wxT("confdir"); const wxChar* DAEMON_SWITCH = wxT("daemon"); -const wxString LOG_BASE_NAME = wxT("ircddbgatewayd"); +const wxString LOG_BASE_NAME = wxT("ircDDBGateway"); static CIRCDDBGatewayAppD* m_gateway = NULL; From 6b3c1992ff69e23bf324dfd3d7ced8e8d7a5a34f Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Mon, 5 Nov 2018 07:51:41 +0000 Subject: [PATCH 046/166] Protect the pointer array. --- Common/APRSCollector.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Common/APRSCollector.cpp b/Common/APRSCollector.cpp index fc55fd5..40ff283 100644 --- a/Common/APRSCollector.cpp +++ b/Common/APRSCollector.cpp @@ -401,7 +401,7 @@ unsigned int CAPRSCollector::convertNMEA1(unsigned char* data, unsigned int) unsigned int nGGA = 0U; char* str = (char*)m_ggaData; - for (;;) { + while (nGGA < 20U) { char* p = mystrsep(&str, ",\r\n"); pGGA[nGGA++] = p; @@ -464,7 +464,7 @@ unsigned int CAPRSCollector::convertNMEA2(unsigned char* data, unsigned int) unsigned int nRMC = 0U; char* str = (char*)m_rmcData; - for (;;) { + while (nRMC < 20U) { char* p = mystrsep(&str, ",\r\n"); pRMC[nRMC++] = p; From 70840a10c2f08d5379c89196699b787f99977198 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Tue, 6 Nov 2018 13:50:30 +0000 Subject: [PATCH 047/166] Add support for Mobile GPS. --- CHANGES.txt | 6 + Common/APRSWriter.cpp | 239 +++++++++++++++++++++++++--- Common/APRSWriter.h | 13 +- Common/IRCDDBGatewayConfig.cpp | 47 ++++++ Common/IRCDDBGatewayConfig.h | 6 + ircDDBGateway/IRCDDBGatewayApp.cpp | 70 ++++++-- ircDDBGateway/IRCDDBGatewayAppD.cpp | 70 ++++++-- 7 files changed, 398 insertions(+), 53 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 0661426..d5b4c0e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1481,3 +1481,9 @@ Simplify the Linux build. -------- Support the GPS data from the Kenwood TH-D74. + +2018xxxx +-------- + +Add support for external GPS input for mobile systems. + diff --git a/Common/APRSWriter.cpp b/Common/APRSWriter.cpp index a40f594..b027e34 100644 --- a/Common/APRSWriter.cpp +++ b/Common/APRSWriter.cpp @@ -120,9 +120,12 @@ bool CAPRSEntry::isOK() CAPRSWriter::CAPRSWriter(const wxString& hostname, unsigned int port, const wxString& gateway, const wxString& password, const wxString& address) : m_thread(NULL), -m_idTimer(1000U, 20U * 60U), // 20 minutes +m_idTimer(1000U), m_gateway(), -m_array() +m_array(), +m_address(), +m_port(0U), +m_socket(NULL) { wxASSERT(!hostname.IsEmpty()); wxASSERT(port > 0U); @@ -144,7 +147,7 @@ CAPRSWriter::~CAPRSWriter() m_array.clear(); } -void CAPRSWriter::setPort(const wxString& callsign, const wxString& band, double frequency, double offset, double range, double latitude, double longitude, double agl) +void CAPRSWriter::setPortFixed(const wxString& callsign, const wxString& band, double frequency, double offset, double range, double latitude, double longitude, double agl) { wxString temp = callsign; temp.resize(LONG_CALLSIGN_LENGTH - 1U, wxT(' ')); @@ -153,16 +156,41 @@ void CAPRSWriter::setPort(const wxString& callsign, const wxString& band, double m_array[temp] = new CAPRSEntry(callsign, band, frequency, offset, range, latitude, longitude, agl); } +void CAPRSWriter::setPortMobile(const wxString& callsign, const wxString& band, double frequency, double offset, double range, const wxString& address, unsigned int port) +{ + wxString temp = callsign; + temp.resize(LONG_CALLSIGN_LENGTH - 1U, wxT(' ')); + temp.Append(band); + + m_array[temp] = new CAPRSEntry(callsign, band, frequency, offset, range, 0.0, 0.0, 0.0); + + if (m_socket == NULL) { + m_address = CUDPReaderWriter::lookup(address); + m_port = port; + + m_socket = new CUDPReaderWriter; + } +} + bool CAPRSWriter::open() { - bool ret = m_thread->start(); - if(ret) { - sendIdFrames(); - m_idTimer.start(); - return ret; + if (m_socket != NULL) { + bool ret = m_socket->open(); + if (!ret) { + delete m_socket; + m_socket = NULL; + return false; + } + + // Poll the GPS every minute + m_idTimer.setTimeout(60U); + } else { + m_idTimer.setTimeout(20U * 60U); } - return false; + m_idTimer.start(); + + return m_thread->start(); } void CAPRSWriter::writeHeader(const wxString& callsign, const CHeaderData& header) @@ -256,9 +284,18 @@ void CAPRSWriter::clock(unsigned int ms) { m_idTimer.clock(ms); - if (m_idTimer.hasExpired()) { - sendIdFrames(); - m_idTimer.start(); + if (m_socket != NULL) { + if (m_idTimer.hasExpired()) { + pollGPS(); + m_idTimer.start(); + } + + sendIdFrameMobile(); + } else { + if (m_idTimer.hasExpired()) { + sendIdFrameFixed(); + m_idTimer.start(); + } } for (CEntry_t::iterator it = m_array.begin(); it != m_array.end(); ++it) @@ -272,10 +309,22 @@ bool CAPRSWriter::isConnected() const void CAPRSWriter::close() { + if (m_socket != NULL) { + m_socket->close(); + delete m_socket; + } + m_thread->stop(); } -void CAPRSWriter::sendIdFrames() +bool CAPRSWriter::pollGPS() +{ + assert(m_socket != NULL); + + return m_socket->write((unsigned char*)"ircDDBGateway", 13U, m_address, m_port); +} + +void CAPRSWriter::sendIdFramesFixed() { if (!m_thread->isConnected()) return; @@ -357,12 +406,12 @@ void CAPRSWriter::sendIdFrames() lon.Replace(wxT(","), wxT(".")); wxString output; - output.Printf(wxT("%s-S>APDG01,TCPIP*,qAC,%s-GS:;%-7s%-2s*%02d%02d%02dz%s%cD%s%caRNG%04.0lf %s %s"), + output.Printf(wxT("%s-S>APDG01,TCPIP*,qAC,%s-GS:;%-7s%-2s*%02d%02d%02dz%s%cD%s%ca/A=%06.0lfRNG%04.0lf %s %s"), m_gateway.c_str(), m_gateway.c_str(), entry->getCallsign().c_str(), entry->getBand().c_str(), tm->tm_mday, tm->tm_hour, tm->tm_min, lat.c_str(), (entry->getLatitude() < 0.0F) ? wxT('S') : wxT('N'), lon.c_str(), (entry->getLongitude() < 0.0F) ? wxT('W') : wxT('E'), - entry->getRange() * 0.6214, band.c_str(), desc.c_str()); + entry->getAGL() * 3.28, entry->getRange() * 0.6214, band.c_str(), desc.c_str()); char ascii[300U]; ::memset(ascii, 0x00, 300U); @@ -372,11 +421,11 @@ void CAPRSWriter::sendIdFrames() m_thread->write(ascii); if (entry->getBand().Len() == 1U) { - output.Printf(wxT("%s-%s>APDG02,TCPIP*,qAC,%s-%sS:!%s%cD%s%c&RNG%04.0lf %s %s"), + output.Printf(wxT("%s-%s>APDG02,TCPIP*,qAC,%s-%sS:!%s%cD%s%c&/A=%06.0lfRNG%04.0lf %s %s"), entry->getCallsign().c_str(), entry->getBand().c_str(), entry->getCallsign().c_str(), entry->getBand().c_str(), lat.c_str(), (entry->getLatitude() < 0.0F) ? wxT('S') : wxT('N'), lon.c_str(), (entry->getLongitude() < 0.0F) ? wxT('W') : wxT('E'), - entry->getRange() * 0.6214, band.c_str(), desc.c_str()); + entry->getAGL() * 3.28, entry->getRange() * 0.6214, band.c_str(), desc.c_str()); ::memset(ascii, 0x00, 300U); for (unsigned int i = 0U; i < output.Len(); i++) @@ -385,6 +434,158 @@ void CAPRSWriter::sendIdFrames() m_thread->write(ascii); } } - - m_idTimer.start(); } + +void CAPRSWriter::sendIdFramesMobile() +{ + // Grab GPS data if it's available + unsigned char buffer[200U]; + in_addr address; + unsigned int port; + int ret = m_socket->read(buffer, 200U, address, port); + if (ret <= 0) + return; + + if (!m_thread->isConnected()) + return; + + buffer[ret] = '\0'; + + // Parse the GPS data + char* pLatitude = ::strtok((char*)buffer, ",\n"); // Latitude + char* pLongitude = ::strtok(NULL, ",\n"); // Longitude + char* pAltitude = ::strtok(NULL, ",\n"); // Altitude (m) + char* pVelocity = ::strtok(NULL, ",\n"); // Velocity (kms/h) + char* pBearing = ::strtok(NULL, "\n"); // Bearing + + if (pLatitude == NULL || pLongitude == NULL || pAltitude == NULL) + return; + + double rawLatitude = ::atof(pLatitude); + double rawLongitude = ::atof(pLongitude); + double rawAltitude = ::atof(pAltitude); + + time_t now; + ::time(&now); + struct tm* tm = ::gmtime(&now); + + for (CEntry_t::iterator it = m_array.begin(); it != m_array.end(); ++it) { + CAPRSEntry* entry = it->second; + if (entry == NULL) + continue; + + wxString desc; + if (entry->getBand().Len() > 1U) { + if (entry->getFrequency() != 0.0) + desc.Printf(wxT("Data %.5lfMHz"), entry->getFrequency()); + else + desc = wxT("Data"); + } else { + if (entry->getFrequency() != 0.0) + desc.Printf(wxT("Voice %.5lfMHz %c%.4lfMHz"), + entry->getFrequency(), + entry->getOffset() < 0.0 ? wxT('-') : wxT('+'), + ::fabs(entry->getOffset())); + else + desc = wxT("Voice"); + } + + wxString band; + if (entry->getFrequency() >= 1200.0) + band = wxT("1.2"); + else if (entry->getFrequency() >= 420.0) + band = wxT("440"); + else if (entry->getFrequency() >= 144.0) + band = wxT("2m"); + else if (entry->getFrequency() >= 50.0) + band = wxT("6m"); + else if (entry->getFrequency() >= 28.0) + band = wxT("10m"); + + double tempLat = ::fabs(rawLatitude); + double tempLong = ::fabs(rawLongitude); + + double latitude = ::floor(tempLat); + double longitude = ::floor(tempLong); + + latitude = (tempLat - latitude) * 60.0 + latitude * 100.0; + longitude = (tempLong - longitude) * 60.0 + longitude * 100.0; + + wxString lat; + if (latitude >= 1000.0F) + lat.Printf(wxT("%.2lf"), latitude); + else if (latitude >= 100.0F) + lat.Printf(wxT("0%.2lf"), latitude); + else if (latitude >= 10.0F) + lat.Printf(wxT("00%.2lf"), latitude); + else + lat.Printf(wxT("000%.2lf"), latitude); + + wxString lon; + if (longitude >= 10000.0F) + lon.Printf(wxT("%.2lf"), longitude); + else if (longitude >= 1000.0F) + lon.Printf(wxT("0%.2lf"), longitude); + else if (longitude >= 100.0F) + lon.Printf(wxT("00%.2lf"), longitude); + else if (longitude >= 10.0F) + lon.Printf(wxT("000%.2lf"), longitude); + else + lon.Printf(wxT("0000%.2lf"), longitude); + + // Convert commas to periods in the latitude and longitude + lat.Replace(wxT(","), wxT(".")); + lon.Replace(wxT(","), wxT(".")); + + wxString output1; + output1.Printf(wxT("%s-S>APDG01,TCPIP*,qAC,%s-GS:;%-7s%-2s*%02d%02d%02dz%s%cD%s%ca/A=%06.0lf"), + m_gateway.c_str(), m_gateway.c_str(), entry->getCallsign().c_str(), entry->getBand().c_str(), + tm->tm_mday, tm->tm_hour, tm->tm_min, + lat.c_str(), (rawLatitude < 0.0) ? wxT('S') : wxT('N'), + lon.c_str(), (rawLongitude < 0.0) ? wxT('W') : wxT('E'), + rawAltitude * 3.28); + + wxString output2; + if (pBearing != NULL && pVelocity != NULL) { + double rawBearing = ::atof(pBearing); + double rawVelocity = ::atof(pVelocity); + + output2.Printf(wxT("%03.0lf/%03.0lf"), rawBearing, rawVelocity * 0.539957F); + } + + wxString output3; + output3.Printf(wxT("RNG%04.0lf %s %s"), entry->getRange() * 0.6214, band.c_str(), desc.c_str()); + + char ascii[300U]; + ::memset(ascii, 0x00, 300U); + unsigned int n = 0U; + for (unsigned int i = 0U; i < output1.Len(); i++, n++) + ascii[n] = output1.GetChar(i); + for (unsigned int i = 0U; i < output2.Len(); i++, n++) + ascii[n] = output2.GetChar(i); + for (unsigned int i = 0U; i < output3.Len(); i++, n++) + ascii[n] = output3.GetChar(i); + + m_thread->write(ascii); + + if (entry->getBand().Len() == 1U) { + output1.Printf(wxT("%s-%s>APDG02,TCPIP*,qAC,%s-%sS:!%s%cD%s%c&/A=%06.0lf"), + entry->getCallsign().c_str(), entry->getBand().c_str(), entry->getCallsign().c_str(), entry->getBand().c_str(), + lat.c_str(), (rawLatitude < 0.0) ? wxT('S') : wxT('N'), + lon.c_str(), (rawLongitude < 0.0) ? wxT('W') : wxT('E'), + rawAltitude * 3.28); + + ::memset(ascii, 0x00, 300U); + unsigned int n = 0U; + for (unsigned int i = 0U; i < output1.Len(); i++, n++) + ascii[n] = output1.GetChar(i); + for (unsigned int i = 0U; i < output2.Len(); i++, n++) + ascii[n] = output2.GetChar(i); + for (unsigned int i = 0U; i < output3.Len(); i++, n++) + ascii[n] = output3.GetChar(i); + + m_thread->write(ascii); + } + } +} + diff --git a/Common/APRSWriter.h b/Common/APRSWriter.h index 2a5485c..7e7438b 100644 --- a/Common/APRSWriter.h +++ b/Common/APRSWriter.h @@ -20,6 +20,7 @@ #define APRSWriter_H #include "APRSWriterThread.h" +#include "UDPReaderWriter.h" #include "APRSCollector.h" #include "DStarDefines.h" #include "HeaderData.h" @@ -72,7 +73,9 @@ public: bool open(); - void setPort(const wxString& callsign, const wxString& band, double frequency, double offset, double range, double latitude, double longitude, double agl); + void setFixedPort(const wxString& callsign, const wxString& band, double frequency, double offset, double range, double latitude, double longitude, double agl); + + void setMobilePort(const wxString& callsign, const wxString& band, double frequency, double offset, double range, const wxString& address, unsigned int port); void writeHeader(const wxString& callsign, const CHeaderData& header); @@ -89,8 +92,14 @@ private: CTimer m_idTimer; wxString m_gateway; CEntry_t m_array; + in_addr m_address; + unsigned int m_port; + CUDPReaderWriter* m_socket; - void sendIdFrames(); + bool pollGPS(); + void sendIdFramesFixed(); + void sendIdFramesMobile(); }; #endif + diff --git a/Common/IRCDDBGatewayConfig.cpp b/Common/IRCDDBGatewayConfig.cpp index 7e3da47..3748933 100644 --- a/Common/IRCDDBGatewayConfig.cpp +++ b/Common/IRCDDBGatewayConfig.cpp @@ -202,6 +202,9 @@ const wxString KEY_ECHO_ENABLED = wxT("echoEnabled"); const wxString KEY_LOG_ENABLED = wxT("logEnabled"); const wxString KEY_DRATS_ENABLED = wxT("dratsEnabled"); const wxString KEY_DTMF_ENABLED = wxT("dtmfEnabled"); +const wxString KEY_MOBILE_GPS_ENABLED = wxT("mobileGPSEnabled"); +const wxString KEY_MOBILE_GPS_ADDRESS = wxT("mobileGPSAddress"); +const wxString KEY_MOBILE_GPS_PORT = wxT("mobileGPSPort"); const wxString KEY_WINDOW_X = wxT("windowX"); const wxString KEY_WINDOW_Y = wxT("windowY"); @@ -285,6 +288,9 @@ const bool DEFAULT_INFO_ENABLED = true; const bool DEFAULT_ECHO_ENABLED = true; const bool DEFAULT_DRATS_ENABLED = false; const bool DEFAULT_DTMF_ENABLED = true; +const bool DEFAULT_MOBILE_GPS_ENABLED = false; +const wxString DEFAULT_MOBILE_GPS_ADDRESS = wxT("127.0.0.1"); +const unsigned int DEFAULT_MOBILE_GPS_PORT = 7834U; const int DEFAULT_WINDOW_X = -1; const int DEFAULT_WINDOW_Y = -1; @@ -477,6 +483,9 @@ m_echoEnabled(DEFAULT_ECHO_ENABLED), m_logEnabled(DEFAULT_LOG_ENABLED), m_dratsEnabled(DEFAULT_DRATS_ENABLED), m_dtmfEnabled(DEFAULT_DTMF_ENABLED), +m_mobileGPSEnabled(DEFAULT_MOBILE_GPS_ENABLED), +m_mobileGPSAddress(DEFAULT_MOBILE_GPS_ADDRESS), +m_mobileGPSPort(DEFAULT_MOBILE_GPS_PORT), m_x(DEFAULT_WINDOW_X), m_y(DEFAULT_WINDOW_Y) { @@ -892,6 +901,13 @@ m_y(DEFAULT_WINDOW_Y) m_config->Read(m_name + KEY_DTMF_ENABLED, &m_dtmfEnabled, DEFAULT_DTMF_ENABLED); + m_config->Read(m_name + KEY_MOBILE_GPS_ENABLED, &m_mobileGPSEnabled, DEFAULT_MOBILE_GPS_ENABLED); + + m_config->Read(m_name + KEY_MOBILE_GPS_ADDRESS, &m_mobileGPSAddress, DEFAULT_MOBILE_GPS_ADDRESS); + + m_config->Read(m_name + KEY_MOBILE_GPS_PORT, &temp, long(DEFAULT_MOBILE_GPS_PORT)); + m_mobileGPSPort = (unsigned int)temp; + m_config->Read(m_name + KEY_WINDOW_X, &temp, long(DEFAULT_WINDOW_X)); m_x = int(temp); @@ -1090,6 +1106,9 @@ m_echoEnabled(DEFAULT_ECHO_ENABLED), m_logEnabled(DEFAULT_LOG_ENABLED), m_dratsEnabled(DEFAULT_DRATS_ENABLED), m_dtmfEnabled(DEFAULT_DTMF_ENABLED), +m_mobileGPSEnabled(DEFAULT_MOBILE_GPS_ENABLED), +m_mobileGPSAddress(DEFAULT_MOBILE_GPS_ADDRESS), +m_mobileGPSPort(DEFAULT_MOBILE_GPS_PORT), m_x(DEFAULT_WINDOW_X), m_y(DEFAULT_WINDOW_Y) { @@ -1570,6 +1589,14 @@ m_y(DEFAULT_WINDOW_Y) } else if (key.IsSameAs(KEY_DTMF_ENABLED)) { val.ToLong(&temp1); m_dtmfEnabled = temp1 == 1L; + } else if (key.IsSameAs(KEY_MOBILE_GPS_ENABLED)) { + val.ToLong(&temp1); + m_mobileGPSEnabled = temp1 == 1L; + } else if (key.IsSameAs(KEY_MOBILE_GPS_ADDRESS)) { + m_mobileGPSAddress = val; + } else if (key.IsSameAs(KEY_MOBILE_GPS_PORT)) { + val.ToULong(&temp2); + m_mobileGPSPort = (unsigned int)temp2; } else if (key.IsSameAs(KEY_WINDOW_X)) { val.ToLong(&temp1); m_x = int(temp1); @@ -2199,6 +2226,20 @@ void CIRCDDBGatewayConfig::setMiscellaneous(TEXT_LANG language, bool infoEnabled m_dtmfEnabled = dtmfEnabled; } +void CIRCDDBGatewayConfig::getMobileGPS(bool& enabled, wxString& address, unsigned int& port) const +{ + enabled = m_mobileGPSEnabled; + address = m_mobileGPSAddress; + port = m_mobileGPSPort; +} + +void CIRCDDBGatewayConfig::setMobileGPS(bool enabled, const wxString& address, unsigned int port) +{ + m_mobileGPSEnabled = enabled; + m_mobileGPSAddress = address; + m_mobileGPSPort = port; +} + void CIRCDDBGatewayConfig::getPosition(int& x, int& y) const { x = m_x; @@ -2439,6 +2480,9 @@ bool CIRCDDBGatewayConfig::write() m_config->Write(m_name + KEY_LOG_ENABLED, m_logEnabled); m_config->Write(m_name + KEY_DRATS_ENABLED, m_dratsEnabled); m_config->Write(m_name + KEY_DTMF_ENABLED, m_dtmfEnabled); + m_config->Write(m_name + KEY_MOBILE_GPS_ENABLED, m_mobileGPSEnabled); + m_config->Write(m_name + KEY_MOBILE_GPS_ADDRESS, m_mobileGPSAddress); + m_config->Write(m_name + KEY_MOBILE_GPS_PORT, long(m_mobileGPSPort)); m_config->Write(m_name + KEY_WINDOW_X, long(m_x)); m_config->Write(m_name + KEY_WINDOW_Y, long(m_y)); m_config->Flush(); @@ -2647,6 +2691,9 @@ bool CIRCDDBGatewayConfig::write() buffer.Printf(wxT("%s=%d"), KEY_LOG_ENABLED.c_str(), m_logEnabled ? 1 : 0); file.AddLine(buffer); buffer.Printf(wxT("%s=%d"), KEY_DRATS_ENABLED.c_str(), m_dratsEnabled ? 1 : 0); file.AddLine(buffer); buffer.Printf(wxT("%s=%d"), KEY_DTMF_ENABLED.c_str(), m_dtmfEnabled ? 1 : 0); file.AddLine(buffer); + buffer.Printf(wxT("%s=%d"), KEY_MOBILE_GPS_ENABLED.c_str(), m_mobileGPSEnabled ? 1 : 0); file.AddLine(buffer); + buffer.Printf(wxT("%s=%s"), KEY_MOBILE_GPS_ADDRESS.c_str(), m_mobileGPSAddress.c_str()); file.AddLine(buffer); + buffer.Printf(wxT("%s=%u"), KEY_MOBILE_GPS_PORT.c_str(), m_mobileGPSPort); file.AddLine(buffer); buffer.Printf(wxT("%s=%d"), KEY_WINDOW_X.c_str(), m_x); file.AddLine(buffer); buffer.Printf(wxT("%s=%d"), KEY_WINDOW_Y.c_str(), m_y); file.AddLine(buffer); diff --git a/Common/IRCDDBGatewayConfig.h b/Common/IRCDDBGatewayConfig.h index 5583b91..b3a1dc9 100644 --- a/Common/IRCDDBGatewayConfig.h +++ b/Common/IRCDDBGatewayConfig.h @@ -112,6 +112,9 @@ public: void getMiscellaneous(TEXT_LANG& language, bool& infoEnabled, bool& echoEnabled, bool& logEnabled, bool& dratsEnabled, bool& dtmfEnabled) const; void setMiscellaneous(TEXT_LANG language, bool infoEnabled, bool echoEnabled, bool logEnabled, bool dratsEnabled, bool dtmfEnabled); + void getMobileGPS(bool& enabled, wxString& address, unsigned int& port) const; + void setMobileGPS(bool enabled, const wxString& address, unsigned int port); + void getPosition(int& x, int& y) const; void setPosition(int x, int y); @@ -305,6 +308,9 @@ private: bool m_logEnabled; bool m_dratsEnabled; bool m_dtmfEnabled; + bool m_mobileGPSEnabled; + wxString m_mobileGPSAddress; + unsigned int m_mobileGPSPort; int m_x; int m_y; }; diff --git a/ircDDBGateway/IRCDDBGatewayApp.cpp b/ircDDBGateway/IRCDDBGatewayApp.cpp index 2be5ca8..798183e 100644 --- a/ircDDBGateway/IRCDDBGatewayApp.cpp +++ b/ircDDBGateway/IRCDDBGatewayApp.cpp @@ -276,6 +276,12 @@ void CIRCDDBGatewayApp::createThread() m_config->getMiscellaneous(language, infoEnabled, echoEnabled, logEnabled, dratsEnabled, dtmfEnabled); wxLogInfo(wxT("Language: %d, info enabled: %d, echo enabled: %d, log enabled : %d, D-RATS enabled: %d, DTMF control enabled: %d"), int(language), int(infoEnabled), int(echoEnabled), int(logEnabled), int(dratsEnabled), int(dtmfEnabled)); + bool mobileGPSEnabled; + wxString mobileGPSAddress; + unsigned int mobileGPSPort; + m_config->getMobileGPS(mobileGPSEnabled, mobileGPSAddress, mobileGPSPort); + wxLogInfo(wxT("Mobile GPS: %d, address: %s, port: %u"), int(mobileGPSEnabled), mobileGPSAddress.c_str(), m_mobileGPSPort); + CIcomRepeaterProtocolHandler* icomRepeaterHandler = NULL; CHBRepeaterProtocolHandler* hbRepeaterHandler = NULL; CDummyRepeaterProtocolHandler* dummyRepeaterHandler = NULL; @@ -351,15 +357,23 @@ void CIRCDDBGatewayApp::createThread() wxLogInfo(wxT("Repeater 1 bands: %u %u %u"), band11, band12, band13); thread->addRepeater(callsign1, repeaterBand1, repeaterAddress1, repeaterPort1, repeaterType1, reflector1, atStartup1, reconnect1, dratsEnabled, frequency1, offset1, range1, latitude1, longitude1, agl1, description11, description12, url1, icomRepeaterHandler, band11, band12, band13); - if (aprs != NULL) - aprs->setPort(callsign1, repeaterBand1, frequency1, offset1, range1, latitude1, longitude1, agl1); + if (aprs != NULL) { + if (mobileGPSEnabled) + aprs->setPortMobile(callsign1, repeaterBand1, frequency1, offset1, range1, m_mobileGPSAddress, m_mobileGPSPort); + else + aprs->setPortFixed(callsign1, repeaterBand1, frequency1, offset1, range1, latitude1, longitude1, agl1); + } icomCount++; } else if (repeaterType1 == HW_HOMEBREW && hbRepeaterHandler != NULL) { thread->addRepeater(callsign1, repeaterBand1, repeaterAddress1, repeaterPort1, repeaterType1, reflector1, atStartup1, reconnect1, dratsEnabled, frequency1, offset1, range1, latitude1, longitude1, agl1, description11, description12, url1, hbRepeaterHandler); - if (aprs != NULL) - aprs->setPort(callsign1, repeaterBand1, frequency1, offset1, range1, latitude1, longitude1, agl1); + if (aprs != NULL) { + if (mobileGPSEnabled) + aprs->setPortMobile(callsign1, repeaterBand1, frequency1, offset1, range1, m_mobileGPSAddress, m_mobileGPSPort); + else + aprs->setPortFixed(callsign1, repeaterBand1, frequency1, offset1, range1, latitude1, longitude1, agl1); + } } else if (repeaterType1 == HW_DUMMY && dummyRepeaterHandler != NULL) { thread->addRepeater(callsign1, repeaterBand1, repeaterAddress1, repeaterPort1, repeaterType1, reflector1, atStartup1, reconnect1, dratsEnabled, frequency1, offset1, range1, latitude1, longitude1, agl1, description11, description12, url1, dummyRepeaterHandler); } @@ -439,15 +453,23 @@ void CIRCDDBGatewayApp::createThread() wxLogInfo(wxT("Repeater 2 bands: %u %u %u"), band21, band22, band23); thread->addRepeater(callsign2, repeaterBand2, repeaterAddress2, repeaterPort2, repeaterType2, reflector2, atStartup2, reconnect2, dratsEnabled, frequency2, offset2, range2, latitude2, longitude2, agl2, description21, description22, url2, icomRepeaterHandler, band21, band22, band23); - if (aprs != NULL) - aprs->setPort(callsign2, repeaterBand2, frequency2, offset2, range2, latitude2, longitude2, agl2); + if (aprs != NULL) { + if (mobileGPSEnabled) + aprs->setPortMobile(callsign2, repeaterBand2, frequency2, offset2, range2, m_mobileGPSAddress, m_mobileGPSPort); + else + aprs->setPortFixed(callsign2, repeaterBand2, frequency2, offset2, range2, latitude2, longitude2, agl2); + } icomCount++; } else if (repeaterType2 == HW_HOMEBREW && hbRepeaterHandler != NULL) { thread->addRepeater(callsign2, repeaterBand2, repeaterAddress2, repeaterPort2, repeaterType2, reflector2, atStartup2, reconnect2, dratsEnabled, frequency2, offset2, range2, latitude2, longitude2, agl2, description21, description22, url2, hbRepeaterHandler); - if (aprs != NULL) - aprs->setPort(callsign2, repeaterBand2, frequency2, offset2, range2, latitude2, longitude2, agl2); + if (aprs != NULL) { + if (mobileGPSEnabled) + aprs->setPortMobile(callsign2, repeaterBand2, frequency2, offset2, range2, m_mobileGPSAddress, m_mobileGPSPort); + else + aprs->setPortFixed(callsign2, repeaterBand2, frequency2, offset2, range2, latitude2, longitude2, agl2); + } } else if (repeaterType2 == HW_DUMMY && dummyRepeaterHandler != NULL) { thread->addRepeater(callsign2, repeaterBand2, repeaterAddress2, repeaterPort2, repeaterType2, reflector2, atStartup2, reconnect2, dratsEnabled, frequency2, offset2, range2, latitude2, longitude2, agl2, description21, description22, url2, dummyRepeaterHandler); } @@ -531,15 +553,23 @@ void CIRCDDBGatewayApp::createThread() wxLogInfo(wxT("Repeater 3 bands: %u %u %u"), band31, band32, band33); thread->addRepeater(callsign3, repeaterBand3, repeaterAddress3, repeaterPort3, repeaterType3, reflector3, atStartup3, reconnect3, dratsEnabled, frequency3, offset3, range3, latitude3, longitude3, agl3, description31, description32, url3, icomRepeaterHandler, band31, band32, band33); - if (aprs != NULL) - aprs->setPort(callsign3, repeaterBand3, frequency3, offset3, range3, latitude3, longitude3, agl3); + if (aprs != NULL) { + if (mobileGPSEnabled) + aprs->setPortMobile(callsign3, repeaterBand3, frequency3, offset3, range3, m_mobileGPSAddress, m_mobileGPSPort); + else + aprs->setPortFixed(callsign3, repeaterBand3, frequency3, offset3, range3, latitude3, longitude3, agl3); + } icomCount++; } else if (repeaterType3 == HW_HOMEBREW && hbRepeaterHandler != NULL) { thread->addRepeater(callsign3, repeaterBand3, repeaterAddress3, repeaterPort3, repeaterType3, reflector3, atStartup3, reconnect3, dratsEnabled, frequency3, offset3, range3, latitude3, longitude3, agl3, description31, description32, url3, hbRepeaterHandler); - if (aprs != NULL) - aprs->setPort(callsign3, repeaterBand3, frequency3, offset3, range3, latitude3, longitude3, agl3); + if (aprs != NULL) { + if (mobileGPSEnabled) + aprs->setPortMobile(callsign3, repeaterBand3, frequency3, offset3, range3, m_mobileGPSAddress, m_mobileGPSPort); + else + aprs->setPortFixed(callsign3, repeaterBand3, frequency3, offset3, range3, latitude3, longitude3, agl3); + } } else if (repeaterType3 == HW_DUMMY && dummyRepeaterHandler != NULL) { thread->addRepeater(callsign3, repeaterBand3, repeaterAddress3, repeaterPort3, repeaterType3, reflector3, atStartup3, reconnect3, dratsEnabled, frequency3, offset3, range3, latitude3, longitude3, agl3, description31, description32, url3, dummyRepeaterHandler); } @@ -627,15 +657,23 @@ void CIRCDDBGatewayApp::createThread() wxLogInfo(wxT("Repeater 4 bands: %u %u %u"), band41, band42, band43); thread->addRepeater(callsign4, repeaterBand4, repeaterAddress4, repeaterPort4, repeaterType4, reflector4, atStartup4, reconnect4, dratsEnabled, frequency4, offset4, range4, latitude4, longitude4, agl4, description41, description42, url4, icomRepeaterHandler, band41, band42, band43); - if (aprs != NULL) - aprs->setPort(callsign4, repeaterBand4, frequency4, offset4, range4, latitude4, longitude4, agl4); + if (aprs != NULL) { + if (mobileGPSEnabled) + aprs->setPortMobile(callsign4, repeaterBand4, frequency4, offset4, range4, m_mobileGPSAddress, m_mobileGPSPort); + else + aprs->setPortFixed(callsign4, repeaterBand4, frequency4, offset4, range4, latitude4, longitude4, agl4); + } icomCount++; } else if (repeaterType4 == HW_HOMEBREW && hbRepeaterHandler != NULL) { thread->addRepeater(callsign4, repeaterBand4, repeaterAddress4, repeaterPort4, repeaterType4, reflector4, atStartup4, reconnect4, dratsEnabled, frequency4, offset4, range4, latitude4, longitude4, agl4, description41, description42, url4, hbRepeaterHandler); - if (aprs != NULL) - aprs->setPort(callsign4, repeaterBand4, frequency4, offset4, range4, latitude4, longitude4, agl4); + if (aprs != NULL) { + if (mobileGPSEnabled) + aprs->setPortMobile(callsign4, repeaterBand4, frequency4, offset4, range4, m_mobileGPSAddress, m_mobileGPSPort); + else + aprs->setPortFixed(callsign4, repeaterBand4, frequency4, offset4, range4, latitude4, longitude4, agl4); + } } else if (repeaterType4 == HW_DUMMY && dummyRepeaterHandler != NULL) { thread->addRepeater(callsign4, repeaterBand4, repeaterAddress4, repeaterPort4, repeaterType4, reflector4, atStartup4, reconnect4, dratsEnabled, frequency4, offset4, range4, latitude4, longitude4, agl4, description41, description42, url4, dummyRepeaterHandler); } diff --git a/ircDDBGateway/IRCDDBGatewayAppD.cpp b/ircDDBGateway/IRCDDBGatewayAppD.cpp index 4f0a438..00122c4 100644 --- a/ircDDBGateway/IRCDDBGatewayAppD.cpp +++ b/ircDDBGateway/IRCDDBGatewayAppD.cpp @@ -265,6 +265,12 @@ bool CIRCDDBGatewayAppD::createThread() config.getMiscellaneous(language, infoEnabled, echoEnabled, logEnabled, dratsEnabled, dtmfEnabled); wxLogInfo(wxT("Language: %d, info enabled: %d, echo enabled: %d, log enabled : %d, D-RATS enabled: %d, DTMF control enabled: %d"), int(language), int(infoEnabled), int(echoEnabled), int(logEnabled), int(dratsEnabled), int(dtmfEnabled)); + bool mobileGPSEnabled; + wxString mobileGPSAddress; + unsigned int mobileGPSPort; + config.getMobileGPS(mobileGPSEnabled, mobileGPSAddress, mobileGPSPort); + wxLogInfo(wxT("Mobile GPS: %d, address: %s, port: %u"), int(mobileGPSEnabled), mobileGPSAddress.c_str(), m_mobileGPSPort); + CIcomRepeaterProtocolHandler* icomRepeaterHandler = NULL; CHBRepeaterProtocolHandler* hbRepeaterHandler = NULL; CDummyRepeaterProtocolHandler* dummyRepeaterHandler = NULL; @@ -340,15 +346,23 @@ bool CIRCDDBGatewayAppD::createThread() wxLogInfo(wxT("Repeater 1 bands: %u %u %u"), band11, band12, band13); m_thread->addRepeater(callsign1, repeaterBand1, repeaterAddress1, repeaterPort1, repeaterType1, reflector1, atStartup1, reconnect1, dratsEnabled, frequency1, offset1, range1, latitude1, longitude1, agl1, description11, description12, url1, icomRepeaterHandler, band11, band12, band13); - if (aprs != NULL) - aprs->setPort(callsign1, repeaterBand1, frequency1, offset1, range1, latitude1, longitude1, agl1); + if (aprs != NULL) { + if (mobileGPSEnabled) + aprs->setPortMobile(callsign1, repeaterBand1, frequency1, offset1, range1, m_mobileGPSAddress, m_mobileGPSPort); + else + aprs->setPortFixed(callsign1, repeaterBand1, frequency1, offset1, range1, latitude1, longitude1, agl1); + } icomCount++; } else if (repeaterType1 == HW_HOMEBREW && hbRepeaterHandler != NULL) { m_thread->addRepeater(callsign1, repeaterBand1, repeaterAddress1, repeaterPort1, repeaterType1, reflector1, atStartup1, reconnect1, dratsEnabled, frequency1, offset1, range1, latitude1, longitude1, agl1, description11, description12, url1, hbRepeaterHandler); - if (aprs != NULL) - aprs->setPort(callsign1, repeaterBand1, frequency1, offset1, range1, latitude1, longitude1, agl1); + if (aprs != NULL) { + if (mobileGPSEnabled) + aprs->setPortMobile(callsign1, repeaterBand1, frequency1, offset1, range1, m_mobileGPSAddress, m_mobileGPSPort); + else + aprs->setPortFixed(callsign1, repeaterBand1, frequency1, offset1, range1, latitude1, longitude1, agl1); + } } else if (repeaterType1 == HW_DUMMY && dummyRepeaterHandler != NULL) { m_thread->addRepeater(callsign1, repeaterBand1, repeaterAddress1, repeaterPort1, repeaterType1, reflector1, atStartup1, reconnect1, dratsEnabled, frequency1, offset1, range1, latitude1, longitude1, agl1, description11, description12, url1, dummyRepeaterHandler); } @@ -428,15 +442,23 @@ bool CIRCDDBGatewayAppD::createThread() wxLogInfo(wxT("Repeater 2 bands: %u %u %u"), band21, band22, band23); m_thread->addRepeater(callsign2, repeaterBand2, repeaterAddress2, repeaterPort2, repeaterType2, reflector2, atStartup2, reconnect2, dratsEnabled, frequency2, offset2, range2, latitude2, longitude2, agl2, description21, description22, url2, icomRepeaterHandler, band21, band22, band23); - if (aprs != NULL) - aprs->setPort(callsign2, repeaterBand2, frequency2, offset2, range2, latitude2, longitude2, agl2); + if (aprs != NULL) { + if (mobileGPSEnabled) + aprs->setPortMobile(callsign2, repeaterBand2, frequency2, offset2, range2, m_mobileGPSAddress, m_mobileGPSPort); + else + aprs->setPortFixed(callsign2, repeaterBand2, frequency2, offset2, range2, latitude2, longitude2, agl2); + } icomCount++; } else if (repeaterType2 == HW_HOMEBREW && hbRepeaterHandler != NULL) { m_thread->addRepeater(callsign2, repeaterBand2, repeaterAddress2, repeaterPort2, repeaterType2, reflector2, atStartup2, reconnect2, dratsEnabled, frequency2, offset2, range2, latitude2, longitude2, agl2, description21, description22, url2, hbRepeaterHandler); - if (aprs != NULL) - aprs->setPort(callsign2, repeaterBand2, frequency2, offset2, range2, latitude2, longitude2, agl2); + if (aprs != NULL) { + if (mobileGPSEnabled) + aprs->setPortMobile(callsign2, repeaterBand2, frequency2, offset2, range2, m_mobileGPSAddress, m_mobileGPSPort); + else + aprs->setPortFixed(callsign2, repeaterBand2, frequency2, offset2, range2, latitude2, longitude2, agl1); + } } else if (repeaterType2 == HW_DUMMY && dummyRepeaterHandler != NULL) { m_thread->addRepeater(callsign2, repeaterBand2, repeaterAddress2, repeaterPort2, repeaterType2, reflector2, atStartup2, reconnect2, dratsEnabled, frequency2, offset2, range2, latitude2, longitude2, agl2, description21, description22, url2, dummyRepeaterHandler); } @@ -520,15 +542,23 @@ bool CIRCDDBGatewayAppD::createThread() wxLogInfo(wxT("Repeater 3 bands: %u %u %u"), band31, band32, band33); m_thread->addRepeater(callsign3, repeaterBand3, repeaterAddress3, repeaterPort3, repeaterType3, reflector3, atStartup3, reconnect3, dratsEnabled, frequency3, offset3, range3, latitude3, longitude3, agl3, description31, description32, url3, icomRepeaterHandler, band31, band32, band33); - if (aprs != NULL) - aprs->setPort(callsign3, repeaterBand3, frequency3, offset3, range3, latitude3, longitude3, agl3); + if (aprs != NULL) { + if (mobileGPSEnabled) + aprs->setPortMobile(callsign3, repeaterBand3, frequency3, offset3, range3, m_mobileGPSAddress, m_mobileGPSPort); + else + aprs->setPortFixed(callsign3, repeaterBand3, frequency3, offset3, range3, latitude3, longitude3, agl3); + } icomCount++; } else if (repeaterType3 == HW_HOMEBREW && hbRepeaterHandler != NULL) { m_thread->addRepeater(callsign3, repeaterBand3, repeaterAddress3, repeaterPort3, repeaterType3, reflector3, atStartup3, reconnect3, dratsEnabled, frequency3, offset3, range3, latitude3, longitude3, agl3, description31, description32, url3, hbRepeaterHandler); - if (aprs != NULL) - aprs->setPort(callsign3, repeaterBand3, frequency3, offset3, range3, latitude3, longitude3, agl3); + if (aprs != NULL) { + if (mobileGPSEnabled) + aprs->setPortMobile(callsign3, repeaterBand3, frequency3, offset3, range3, m_mobileGPSAddress, m_mobileGPSPort); + else + aprs->setPortFixed(callsign3, repeaterBand3, frequency3, offset3, range3, latitude3, longitude3, agl3); + } } else if (repeaterType3 == HW_DUMMY && dummyRepeaterHandler != NULL) { m_thread->addRepeater(callsign3, repeaterBand3, repeaterAddress3, repeaterPort3, repeaterType3, reflector3, atStartup3, reconnect3, dratsEnabled, frequency3, offset3, range3, latitude3, longitude3, agl3, description31, description32, url3, dummyRepeaterHandler); } @@ -616,15 +646,23 @@ bool CIRCDDBGatewayAppD::createThread() wxLogInfo(wxT("Repeater 4 bands: %u %u %u"), band41, band42, band43); m_thread->addRepeater(callsign4, repeaterBand4, repeaterAddress4, repeaterPort4, repeaterType4, reflector4, atStartup4, reconnect4, dratsEnabled, frequency4, offset4, range4, latitude4, longitude4, agl4, description41, description42, url4, icomRepeaterHandler, band41, band42, band43); - if (aprs != NULL) - aprs->setPort(callsign4, repeaterBand4, frequency4, offset4, range4, latitude4, longitude4, agl4); + if (aprs != NULL) { + if (mobileGPSEnabled) + aprs->setPortMobile(callsign4, repeaterBand4, frequency4, offset4, range4, m_mobileGPSAddress, m_mobileGPSPort); + else + aprs->setPortFixed(callsign4, repeaterBand4, frequency4, offset4, range4, latitude4, longitude4, agl4); + } icomCount++; } else if (repeaterType4 == HW_HOMEBREW && hbRepeaterHandler != NULL) { m_thread->addRepeater(callsign4, repeaterBand4, repeaterAddress4, repeaterPort4, repeaterType4, reflector4, atStartup4, reconnect4, dratsEnabled, frequency4, offset4, range4, latitude4, longitude4, agl4, description41, description42, url4, hbRepeaterHandler); - if (aprs != NULL) - aprs->setPort(callsign4, repeaterBand4, frequency4, offset4, range4, latitude4, longitude4, agl4); + if (aprs != NULL) { + if (mobileGPSEnabled) + aprs->setPortMobile(callsign4, repeaterBand4, frequency4, offset4, range4, m_mobileGPSAddress, m_mobileGPSPort); + else + aprs->setPortFixed(callsign4, repeaterBand4, frequency4, offset4, range4, latitude4, longitude4, agl4); + } } else if (repeaterType4 == HW_DUMMY && dummyRepeaterHandler != NULL) { m_thread->addRepeater(callsign4, repeaterBand4, repeaterAddress4, repeaterPort4, repeaterType4, reflector4, atStartup4, reconnect4, dratsEnabled, frequency4, offset4, range4, latitude4, longitude4, agl4, description41, description42, url4, dummyRepeaterHandler); } From 356b94e12686c3b1aa15c92c5b7703e202bf189e Mon Sep 17 00:00:00 2001 From: Geoffrey Merck F4FXL - KC3FRA Date: Tue, 6 Nov 2018 19:52:17 +0100 Subject: [PATCH 048/166] Use $(MAKE) variable This allow to use make -jx flag to parallelize build otherwise the -j flag was not propagated to sub make --- Makefile | 68 ++++++++++++++++++++++++++--------------------------- MakefileGUI | 68 ++++++++++++++++++++++++++--------------------------- 2 files changed, 68 insertions(+), 68 deletions(-) diff --git a/Makefile b/Makefile index e3c3283..7ebc1e6 100644 --- a/Makefile +++ b/Makefile @@ -16,64 +16,64 @@ all: ircDDBGateway/ircddbgatewayd ircDDBGatewayConfig/ircddbgatewayconfig APRSTr StarNetServer/starnetserverd TextTransmit/texttransmitd TimerControl/timercontrold TimeServer/timeserverd VoiceTransmit/voicetransmitd ircDDBGateway/ircddbgatewayd: Common/Common.a ircDDB/IRCDDB.a - make -C ircDDBGateway + $(MAKE) -C ircDDBGateway ircDDBGatewayConfig/ircddbgatewayconfig: GUICommon/GUICommon.a Common/Common.a - make -C ircDDBGatewayConfig + $(MAKE) -C ircDDBGatewayConfig APRSTransmit/aprstransmitd: Common/Common.a - make -C APRSTransmit + $(MAKE) -C APRSTransmit RemoteControl/remotecontrold: Common/Common.a - make -C RemoteControl + $(MAKE) -C RemoteControl StarNetServer/starnetserverd: Common/Common.a ircDDB/IRCDDB.a - make -C StarNetServer + $(MAKE) -C StarNetServer TextTransmit/texttransmitd: Common/Common.a - make -C TextTransmit + $(MAKE) -C TextTransmit TimerControl/timercontrold: Common/Common.a GUICommon/GUICommon.a - make -C TimerControl + $(MAKE) -C TimerControl TimeServer/timeserverd: Common/Common.a GUICommon/GUICommon.a - make -C TimeServer + $(MAKE) -C TimeServer VoiceTransmit/voicetransmitd: Common/Common.a - make -C VoiceTransmit + $(MAKE) -C VoiceTransmit GUICommon/GUICommon.a: - make -C GUICommon + $(MAKE) -C GUICommon Common/Common.a: - make -C Common + $(MAKE) -C Common ircDDB/IRCDDB.a: - make -C ircDDB + $(MAKE) -C ircDDB install: all - make -C Data install - make -C APRSTransmit install - make -C ircDDBGateway install - make -C RemoteControl install - make -C StarNetServer install - make -C TextTransmit install - make -C TimerControl install - make -C TimeServer install - make -C VoiceTransmit install - make -C ircDDBGatewayConfig install + $(MAKE) -C Data install + $(MAKE) -C APRSTransmit install + $(MAKE) -C ircDDBGateway install + $(MAKE) -C RemoteControl install + $(MAKE) -C StarNetServer install + $(MAKE) -C TextTransmit install + $(MAKE) -C TimerControl install + $(MAKE) -C TimeServer install + $(MAKE) -C VoiceTransmit install + $(MAKE) -C ircDDBGatewayConfig install clean: - make -C Common clean - make -C ircDDB clean - make -C GUICommon clean - make -C APRSTransmit clean - make -C ircDDBGateway clean - make -C RemoteControl clean - make -C StarNetServer clean - make -C TextTransmit clean - make -C TimerControl clean - make -C TimeServer clean - make -C VoiceTransmit clean - make -C ircDDBGatewayConfig clean + $(MAKE) -C Common clean + $(MAKE) -C ircDDB clean + $(MAKE) -C GUICommon clean + $(MAKE) -C APRSTransmit clean + $(MAKE) -C ircDDBGateway clean + $(MAKE) -C RemoteControl clean + $(MAKE) -C StarNetServer clean + $(MAKE) -C TextTransmit clean + $(MAKE) -C TimerControl clean + $(MAKE) -C TimeServer clean + $(MAKE) -C VoiceTransmit clean + $(MAKE) -C ircDDBGatewayConfig clean diff --git a/MakefileGUI b/MakefileGUI index 6cd4315..af13d02 100644 --- a/MakefileGUI +++ b/MakefileGUI @@ -16,63 +16,63 @@ all: ircDDBGateway/ircddbgateway ircDDBGatewayConfig/ircddbgatewayconfig APRSTra StarNetServer/starnetserver TextTransmit/texttransmitd TimerControl/timercontrol TimeServer/timeserver VoiceTransmit/voicetransmitd ircDDBGateway/ircddbgateway: GUICommon/GUICommon.a Common/Common.a ircDDB/IRCDDB.a - make -C ircDDBGateway -f MakefileGUI + $(MAKE) -C ircDDBGateway -f MakefileGUI ircDDBGatewayConfig/ircddbgatewayconfig: GUICommon/GUICommon.a Common/Common.a - make -C ircDDBGatewayConfig + $(MAKE) -C ircDDBGatewayConfig APRSTransmit/aprstransmitd: Common/Common.a - make -C APRSTransmit + $(MAKE) -C APRSTransmit RemoteControl/remotecontrol: Common/Common.a - make -C RemoteControl -f MakefileGUI + $(MAKE) -C RemoteControl -f MakefileGUI StarNetServer/starnetserver: Common/Common.a ircDDB/IRCDDB.a - make -C StarNetServer -f MakefileGUI + $(MAKE) -C StarNetServer -f MakefileGUI TextTransmit/texttransmitd: Common/Common.a - make -C TextTransmit + $(MAKE) -C TextTransmit TimerControl/timercontrol: Common/Common.a GUICommon/GUICommon.a - make -C TimerControl -f MakefileGUI + $(MAKE) -C TimerControl -f MakefileGUI TimeServer/timeserver: Common/Common.a GUICommon/GUICommon.a - make -C TimeServer -f MakefileGUI + $(MAKE) -C TimeServer -f MakefileGUI VoiceTransmit/voicetransmitd: Common/Common.a - make -C VoiceTransmit + $(MAKE) -C VoiceTransmit GUICommon/GUICommon.a: - make -C GUICommon + $(MAKE) -C GUICommon Common/Common.a: - make -C Common + $(MAKE) -C Common ircDDB/IRCDDB.a: - make -C ircDDB + $(MAKE) -C ircDDB install: all - make -C Data install - make -C APRSTransmit install - make -C ircDDBGateway -f MakefileGUI install - make -C RemoteControl -f MakefileGUI install - make -C StarNetServer -f MakefileGUI install - make -C TextTransmit install - make -C TimerControl -f MakefileGUI install - make -C TimeServer -f MakefileGUI install - make -C VoiceTransmit install - make -C ircDDBGatewayConfig install + $(MAKE) -C Data install + $(MAKE) -C APRSTransmit install + $(MAKE) -C ircDDBGateway -f MakefileGUI install + $(MAKE) -C RemoteControl -f MakefileGUI install + $(MAKE) -C StarNetServer -f MakefileGUI install + $(MAKE) -C TextTransmit install + $(MAKE) -C TimerControl -f MakefileGUI install + $(MAKE) -C TimeServer -f MakefileGUI install + $(MAKE) -C VoiceTransmit install + $(MAKE) -C ircDDBGatewayConfig install clean: - make -C Common clean - make -C ircDDB clean - make -C GUICommon clean - make -C APRSTransmit clean - make -C ircDDBGateway -f MakefileGUI clean - make -C RemoteControl -f MakefileGUI clean - make -C StarNetServer -f MakefileGUI clean - make -C TextTransmit clean - make -C TimerControl -f MakefileGUI clean - make -C TimeServer -f MakefileGUI clean - make -C VoiceTransmit clean - make -C ircDDBGatewayConfig clean + $(MAKE) -C Common clean + $(MAKE) -C ircDDB clean + $(MAKE) -C GUICommon clean + $(MAKE) -C APRSTransmit clean + $(MAKE) -C ircDDBGateway -f MakefileGUI clean + $(MAKE) -C RemoteControl -f MakefileGUI clean + $(MAKE) -C StarNetServer -f MakefileGUI clean + $(MAKE) -C TextTransmit clean + $(MAKE) -C TimerControl -f MakefileGUI clean + $(MAKE) -C TimeServer -f MakefileGUI clean + $(MAKE) -C VoiceTransmit clean + $(MAKE) -C ircDDBGatewayConfig clean From dd4549a7536ac5c90f5822ce5e017c376091b4a6 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Tue, 6 Nov 2018 19:52:30 +0000 Subject: [PATCH 049/166] Fix compile issues. --- Common/APRSWriter.cpp | 4 ++-- Common/APRSWriter.h | 4 ++-- Common/UDPReaderWriter.cpp | 30 ++++++++++++++++++++++++++++- Common/UDPReaderWriter.h | 4 +++- ircDDBGateway/IRCDDBGatewayApp.cpp | 18 ++++++++--------- ircDDBGateway/IRCDDBGatewayAppD.cpp | 18 ++++++++--------- 6 files changed, 54 insertions(+), 24 deletions(-) diff --git a/Common/APRSWriter.cpp b/Common/APRSWriter.cpp index b027e34..d0d840e 100644 --- a/Common/APRSWriter.cpp +++ b/Common/APRSWriter.cpp @@ -290,10 +290,10 @@ void CAPRSWriter::clock(unsigned int ms) m_idTimer.start(); } - sendIdFrameMobile(); + sendIdFramesMobile(); } else { if (m_idTimer.hasExpired()) { - sendIdFrameFixed(); + sendIdFramesFixed(); m_idTimer.start(); } } diff --git a/Common/APRSWriter.h b/Common/APRSWriter.h index 7e7438b..9b54760 100644 --- a/Common/APRSWriter.h +++ b/Common/APRSWriter.h @@ -73,9 +73,9 @@ public: bool open(); - void setFixedPort(const wxString& callsign, const wxString& band, double frequency, double offset, double range, double latitude, double longitude, double agl); + void setPortFixed(const wxString& callsign, const wxString& band, double frequency, double offset, double range, double latitude, double longitude, double agl); - void setMobilePort(const wxString& callsign, const wxString& band, double frequency, double offset, double range, const wxString& address, unsigned int port); + void setPortMobile(const wxString& callsign, const wxString& band, double frequency, double offset, double range, const wxString& address, unsigned int port); void writeHeader(const wxString& callsign, const CHeaderData& header); diff --git a/Common/UDPReaderWriter.cpp b/Common/UDPReaderWriter.cpp index 5a18a8e..9e9063b 100644 --- a/Common/UDPReaderWriter.cpp +++ b/Common/UDPReaderWriter.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006-2014 by Jonathan Naylor G4KLX + * Copyright (C) 2006-2014,2018 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 @@ -37,6 +37,34 @@ m_fd(-1) #endif } +CUDPReaderWriter::CUDPReaderWriter(unsigned int port) : +m_address(), +m_port(port), +m_addr(), +m_fd(-1) +{ +#if defined(__WINDOWS__) + WSAData data; + int wsaRet = ::WSAStartup(MAKEWORD(2, 2), &data); + if (wsaRet != 0) + wxLogError(wxT("Error from WSAStartup")); +#endif +} + +CUDPReaderWriter::CUDPReaderWriter() : +m_address(), +m_port(0U), +m_addr(), +m_fd(-1) +{ +#if defined(__WINDOWS__) + WSAData data; + int wsaRet = ::WSAStartup(MAKEWORD(2, 2), &data); + if (wsaRet != 0) + wxLogError(wxT("Error from WSAStartup")); +#endif +} + CUDPReaderWriter::~CUDPReaderWriter() { #if defined(__WINDOWS__) diff --git a/Common/UDPReaderWriter.h b/Common/UDPReaderWriter.h index 4167662..fd60c1d 100644 --- a/Common/UDPReaderWriter.h +++ b/Common/UDPReaderWriter.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009-2011,2013 by Jonathan Naylor G4KLX + * Copyright (C) 2009-2011,2013,2018 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 @@ -35,6 +35,8 @@ class CUDPReaderWriter { public: CUDPReaderWriter(const wxString& address, unsigned int port); + CUDPReaderWriter(unsigned int port); + CUDPReaderWriter(); ~CUDPReaderWriter(); static in_addr lookup(const wxString& hostName); diff --git a/ircDDBGateway/IRCDDBGatewayApp.cpp b/ircDDBGateway/IRCDDBGatewayApp.cpp index 798183e..dc563d4 100644 --- a/ircDDBGateway/IRCDDBGatewayApp.cpp +++ b/ircDDBGateway/IRCDDBGatewayApp.cpp @@ -280,7 +280,7 @@ void CIRCDDBGatewayApp::createThread() wxString mobileGPSAddress; unsigned int mobileGPSPort; m_config->getMobileGPS(mobileGPSEnabled, mobileGPSAddress, mobileGPSPort); - wxLogInfo(wxT("Mobile GPS: %d, address: %s, port: %u"), int(mobileGPSEnabled), mobileGPSAddress.c_str(), m_mobileGPSPort); + wxLogInfo(wxT("Mobile GPS: %d, address: %s, port: %u"), int(mobileGPSEnabled), mobileGPSAddress.c_str(), mobileGPSPort); CIcomRepeaterProtocolHandler* icomRepeaterHandler = NULL; CHBRepeaterProtocolHandler* hbRepeaterHandler = NULL; @@ -359,7 +359,7 @@ void CIRCDDBGatewayApp::createThread() if (aprs != NULL) { if (mobileGPSEnabled) - aprs->setPortMobile(callsign1, repeaterBand1, frequency1, offset1, range1, m_mobileGPSAddress, m_mobileGPSPort); + aprs->setPortMobile(callsign1, repeaterBand1, frequency1, offset1, range1, mobileGPSAddress, mobileGPSPort); else aprs->setPortFixed(callsign1, repeaterBand1, frequency1, offset1, range1, latitude1, longitude1, agl1); } @@ -370,7 +370,7 @@ void CIRCDDBGatewayApp::createThread() if (aprs != NULL) { if (mobileGPSEnabled) - aprs->setPortMobile(callsign1, repeaterBand1, frequency1, offset1, range1, m_mobileGPSAddress, m_mobileGPSPort); + aprs->setPortMobile(callsign1, repeaterBand1, frequency1, offset1, range1, mobileGPSAddress, mobileGPSPort); else aprs->setPortFixed(callsign1, repeaterBand1, frequency1, offset1, range1, latitude1, longitude1, agl1); } @@ -455,7 +455,7 @@ void CIRCDDBGatewayApp::createThread() if (aprs != NULL) { if (mobileGPSEnabled) - aprs->setPortMobile(callsign2, repeaterBand2, frequency2, offset2, range2, m_mobileGPSAddress, m_mobileGPSPort); + aprs->setPortMobile(callsign2, repeaterBand2, frequency2, offset2, range2, mobileGPSAddress, mobileGPSPort); else aprs->setPortFixed(callsign2, repeaterBand2, frequency2, offset2, range2, latitude2, longitude2, agl2); } @@ -466,7 +466,7 @@ void CIRCDDBGatewayApp::createThread() if (aprs != NULL) { if (mobileGPSEnabled) - aprs->setPortMobile(callsign2, repeaterBand2, frequency2, offset2, range2, m_mobileGPSAddress, m_mobileGPSPort); + aprs->setPortMobile(callsign2, repeaterBand2, frequency2, offset2, range2, mobileGPSAddress, mobileGPSPort); else aprs->setPortFixed(callsign2, repeaterBand2, frequency2, offset2, range2, latitude2, longitude2, agl2); } @@ -555,7 +555,7 @@ void CIRCDDBGatewayApp::createThread() if (aprs != NULL) { if (mobileGPSEnabled) - aprs->setPortMobile(callsign3, repeaterBand3, frequency3, offset3, range3, m_mobileGPSAddress, m_mobileGPSPort); + aprs->setPortMobile(callsign3, repeaterBand3, frequency3, offset3, range3, mobileGPSAddress, mobileGPSPort); else aprs->setPortFixed(callsign3, repeaterBand3, frequency3, offset3, range3, latitude3, longitude3, agl3); } @@ -566,7 +566,7 @@ void CIRCDDBGatewayApp::createThread() if (aprs != NULL) { if (mobileGPSEnabled) - aprs->setPortMobile(callsign3, repeaterBand3, frequency3, offset3, range3, m_mobileGPSAddress, m_mobileGPSPort); + aprs->setPortMobile(callsign3, repeaterBand3, frequency3, offset3, range3, mobileGPSAddress, mobileGPSPort); else aprs->setPortFixed(callsign3, repeaterBand3, frequency3, offset3, range3, latitude3, longitude3, agl3); } @@ -659,7 +659,7 @@ void CIRCDDBGatewayApp::createThread() if (aprs != NULL) { if (mobileGPSEnabled) - aprs->setPortMobile(callsign4, repeaterBand4, frequency4, offset4, range4, m_mobileGPSAddress, m_mobileGPSPort); + aprs->setPortMobile(callsign4, repeaterBand4, frequency4, offset4, range4, mobileGPSAddress, mobileGPSPort); else aprs->setPortFixed(callsign4, repeaterBand4, frequency4, offset4, range4, latitude4, longitude4, agl4); } @@ -670,7 +670,7 @@ void CIRCDDBGatewayApp::createThread() if (aprs != NULL) { if (mobileGPSEnabled) - aprs->setPortMobile(callsign4, repeaterBand4, frequency4, offset4, range4, m_mobileGPSAddress, m_mobileGPSPort); + aprs->setPortMobile(callsign4, repeaterBand4, frequency4, offset4, range4, mobileGPSAddress, mobileGPSPort); else aprs->setPortFixed(callsign4, repeaterBand4, frequency4, offset4, range4, latitude4, longitude4, agl4); } diff --git a/ircDDBGateway/IRCDDBGatewayAppD.cpp b/ircDDBGateway/IRCDDBGatewayAppD.cpp index 00122c4..4fc59be 100644 --- a/ircDDBGateway/IRCDDBGatewayAppD.cpp +++ b/ircDDBGateway/IRCDDBGatewayAppD.cpp @@ -269,7 +269,7 @@ bool CIRCDDBGatewayAppD::createThread() wxString mobileGPSAddress; unsigned int mobileGPSPort; config.getMobileGPS(mobileGPSEnabled, mobileGPSAddress, mobileGPSPort); - wxLogInfo(wxT("Mobile GPS: %d, address: %s, port: %u"), int(mobileGPSEnabled), mobileGPSAddress.c_str(), m_mobileGPSPort); + wxLogInfo(wxT("Mobile GPS: %d, address: %s, port: %u"), int(mobileGPSEnabled), mobileGPSAddress.c_str(), mobileGPSPort); CIcomRepeaterProtocolHandler* icomRepeaterHandler = NULL; CHBRepeaterProtocolHandler* hbRepeaterHandler = NULL; @@ -348,7 +348,7 @@ bool CIRCDDBGatewayAppD::createThread() if (aprs != NULL) { if (mobileGPSEnabled) - aprs->setPortMobile(callsign1, repeaterBand1, frequency1, offset1, range1, m_mobileGPSAddress, m_mobileGPSPort); + aprs->setPortMobile(callsign1, repeaterBand1, frequency1, offset1, range1, mobileGPSAddress, mobileGPSPort); else aprs->setPortFixed(callsign1, repeaterBand1, frequency1, offset1, range1, latitude1, longitude1, agl1); } @@ -359,7 +359,7 @@ bool CIRCDDBGatewayAppD::createThread() if (aprs != NULL) { if (mobileGPSEnabled) - aprs->setPortMobile(callsign1, repeaterBand1, frequency1, offset1, range1, m_mobileGPSAddress, m_mobileGPSPort); + aprs->setPortMobile(callsign1, repeaterBand1, frequency1, offset1, range1, mobileGPSAddress, mobileGPSPort); else aprs->setPortFixed(callsign1, repeaterBand1, frequency1, offset1, range1, latitude1, longitude1, agl1); } @@ -444,7 +444,7 @@ bool CIRCDDBGatewayAppD::createThread() if (aprs != NULL) { if (mobileGPSEnabled) - aprs->setPortMobile(callsign2, repeaterBand2, frequency2, offset2, range2, m_mobileGPSAddress, m_mobileGPSPort); + aprs->setPortMobile(callsign2, repeaterBand2, frequency2, offset2, range2, mobileGPSAddress, mobileGPSPort); else aprs->setPortFixed(callsign2, repeaterBand2, frequency2, offset2, range2, latitude2, longitude2, agl2); } @@ -455,7 +455,7 @@ bool CIRCDDBGatewayAppD::createThread() if (aprs != NULL) { if (mobileGPSEnabled) - aprs->setPortMobile(callsign2, repeaterBand2, frequency2, offset2, range2, m_mobileGPSAddress, m_mobileGPSPort); + aprs->setPortMobile(callsign2, repeaterBand2, frequency2, offset2, range2, mobileGPSAddress, mobileGPSPort); else aprs->setPortFixed(callsign2, repeaterBand2, frequency2, offset2, range2, latitude2, longitude2, agl1); } @@ -544,7 +544,7 @@ bool CIRCDDBGatewayAppD::createThread() if (aprs != NULL) { if (mobileGPSEnabled) - aprs->setPortMobile(callsign3, repeaterBand3, frequency3, offset3, range3, m_mobileGPSAddress, m_mobileGPSPort); + aprs->setPortMobile(callsign3, repeaterBand3, frequency3, offset3, range3, mobileGPSAddress, mobileGPSPort); else aprs->setPortFixed(callsign3, repeaterBand3, frequency3, offset3, range3, latitude3, longitude3, agl3); } @@ -555,7 +555,7 @@ bool CIRCDDBGatewayAppD::createThread() if (aprs != NULL) { if (mobileGPSEnabled) - aprs->setPortMobile(callsign3, repeaterBand3, frequency3, offset3, range3, m_mobileGPSAddress, m_mobileGPSPort); + aprs->setPortMobile(callsign3, repeaterBand3, frequency3, offset3, range3, mobileGPSAddress, mobileGPSPort); else aprs->setPortFixed(callsign3, repeaterBand3, frequency3, offset3, range3, latitude3, longitude3, agl3); } @@ -648,7 +648,7 @@ bool CIRCDDBGatewayAppD::createThread() if (aprs != NULL) { if (mobileGPSEnabled) - aprs->setPortMobile(callsign4, repeaterBand4, frequency4, offset4, range4, m_mobileGPSAddress, m_mobileGPSPort); + aprs->setPortMobile(callsign4, repeaterBand4, frequency4, offset4, range4, mobileGPSAddress, mobileGPSPort); else aprs->setPortFixed(callsign4, repeaterBand4, frequency4, offset4, range4, latitude4, longitude4, agl4); } @@ -659,7 +659,7 @@ bool CIRCDDBGatewayAppD::createThread() if (aprs != NULL) { if (mobileGPSEnabled) - aprs->setPortMobile(callsign4, repeaterBand4, frequency4, offset4, range4, m_mobileGPSAddress, m_mobileGPSPort); + aprs->setPortMobile(callsign4, repeaterBand4, frequency4, offset4, range4, mobileGPSAddress, mobileGPSPort); else aprs->setPortFixed(callsign4, repeaterBand4, frequency4, offset4, range4, latitude4, longitude4, agl4); } From dcb1a8a5660ef170f4b79b6491acab961572712b Mon Sep 17 00:00:00 2001 From: Shawn Chain Date: Fri, 9 Nov 2018 13:40:06 +0800 Subject: [PATCH 050/166] Update DStarGateway Global Defs --- Common/Defs.h | 1 + GlobalDefines.h | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Common/Defs.h b/Common/Defs.h index f2c5c31..ca9d950 100644 --- a/Common/Defs.h +++ b/Common/Defs.h @@ -20,6 +20,7 @@ #define Defs_H #include +#include "../GlobalDefines.h" const wxString DEXTRA_HOSTS_FILE_NAME = wxT("DExtra_Hosts.txt"); const wxString DPLUS_HOSTS_FILE_NAME = wxT("DPlus_Hosts.txt"); diff --git a/GlobalDefines.h b/GlobalDefines.h index c5317a5..fbfa10b 100644 --- a/GlobalDefines.h +++ b/GlobalDefines.h @@ -6,21 +6,18 @@ #define LOG_DIR "/opt/mmdvm/logs" #define CONF_DIR "/opt/mmdvm/conf" #define CONF_FILE "ircDDBGateway.ini" -#define LOG_BASE "ircDDBGateway" #elif defined(OPENWRT) && OPENWRT == 1 #define DATA_DIR "/etc/mmdvm/dstar" #define LOG_DIR "/var/log/mmdvm" #define CONF_DIR "/etc" #define CONF_FILE "ircDDBGateway.ini" -#define LOG_BASE "ircDDBGateway" #else #define DATA_DIR "/usr/share/ircddbgateway" #define LOG_DIR "/tmp" #define CONF_DIR "/etc" #define CONF_FILE "ircddbgateway" -#define LOG_BASE "ircddbgatewayd" #endif From dc1f555ceb7593fff5c6d426285caf48276d052e Mon Sep 17 00:00:00 2001 From: Shawn Chain Date: Fri, 9 Nov 2018 16:43:30 +0800 Subject: [PATCH 051/166] Support local time format on log --- Common/Logger.cpp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/Common/Logger.cpp b/Common/Logger.cpp index 1976f79..de6bd8f 100644 --- a/Common/Logger.cpp +++ b/Common/Logger.cpp @@ -18,6 +18,8 @@ #include "Logger.h" +static bool utc = false; + CLogger::CLogger(const wxString& directory, const wxString& name) : wxLog(), m_name(name), @@ -32,7 +34,12 @@ m_day(0) time_t timestamp; ::time(×tamp); - struct tm* tm = ::gmtime(×tamp); + struct tm* tm; + if (utc){ + tm = ::gmtime(×tamp); + }else{ + tm = ::localtime(×tamp); + } wxString text; text.Printf(wxT("%s-%04d-%02d-%02d"), m_name.c_str(), tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday); @@ -75,7 +82,6 @@ void CLogger::DoLog(wxLogLevel level, const wxChar* msg, time_t timestamp) default: letter = wxT("U"); break; } - bool utc = false; struct tm* tm; if (utc){ tm = ::gmtime(×tamp); @@ -98,7 +104,12 @@ void CLogger::DoLogString(const wxChar* msg, time_t timestamp) wxASSERT(m_file->IsOpened()); wxASSERT(msg != NULL); - struct tm* tm = ::gmtime(×tamp); + struct tm* tm; + if (utc){ + tm = ::gmtime(×tamp); + }else{ + tm = ::localtime(×tamp); + } int day = tm->tm_yday; if (day != m_day) { From f8947805a3533932f63ea13ff9fdece312ef5b0b Mon Sep 17 00:00:00 2001 From: Shawn Chain Date: Fri, 9 Nov 2018 17:18:11 +0800 Subject: [PATCH 052/166] Fix no log issue under openwrt --- Common/Logger.cpp | 3 +++ Common/Logger.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/Common/Logger.cpp b/Common/Logger.cpp index de6bd8f..936bf37 100644 --- a/Common/Logger.cpp +++ b/Common/Logger.cpp @@ -132,3 +132,6 @@ void CLogger::DoLogString(const wxChar* msg, time_t timestamp) m_file->Flush(); } +void CLogger::DoLogRecord(wxLogLevel level, const wxString& msg, const wxLogRecordInfo& info) { + DoLog(level, msg.c_str(), info.timestamp); +} \ No newline at end of file diff --git a/Common/Logger.h b/Common/Logger.h index 29523df..8c5c6e3 100644 --- a/Common/Logger.h +++ b/Common/Logger.h @@ -31,6 +31,8 @@ public: virtual void DoLog(wxLogLevel level, const wxChar* msg, time_t timestamp); virtual void DoLogString(const wxChar* msg, time_t timestamp); + virtual void DoLogRecord(wxLogLevel level, const wxString& msg, const wxLogRecordInfo& info); + private: wxString m_name; wxFFile* m_file; From 1ca7e0a24bb3cd0c56aa278e79e85c34a37d3b41 Mon Sep 17 00:00:00 2001 From: Shawn Chain Date: Fri, 9 Nov 2018 17:39:12 +0800 Subject: [PATCH 053/166] Add new makefiles --- Makefile.openwrt | 70 ++++++++++++++++++++++++++++++++++++++++++++++++ Makefile.osx | 70 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 140 insertions(+) create mode 100644 Makefile.openwrt create mode 100644 Makefile.osx diff --git a/Makefile.openwrt b/Makefile.openwrt new file mode 100644 index 0000000..8e07cf3 --- /dev/null +++ b/Makefile.openwrt @@ -0,0 +1,70 @@ +# export CXX ?= $(shell wx-config --cxx) +# export CFLAGS ?= -O2 -Wall $(shell wx-config --cxxflags) +# export GUILIBS ?= $(shell wx-config --libs adv,core,base) +# export LIBS ?= $(shell wx-config --libs base) +# export LDFLAGS ?= + +all: ircDDBGateway/ircddbgatewayd + +ircDDBGateway/ircddbgatewayd: Common/Common.a ircDDB/IRCDDB.a + $(MAKE) -C ircDDBGateway + +ircDDBGatewayConfig/ircddbgatewayconfig: GUICommon/GUICommon.a Common/Common.a + $(MAKE) -C ircDDBGatewayConfig + +APRSTransmit/aprstransmitd: Common/Common.a + $(MAKE) -C APRSTransmit + +RemoteControl/remotecontrold: Common/Common.a + $(MAKE) -C RemoteControl + +StarNetServer/starnetserverd: Common/Common.a ircDDB/IRCDDB.a + $(MAKE) -C StarNetServer + +TextTransmit/texttransmitd: Common/Common.a + $(MAKE) -C TextTransmit + +TimerControl/timercontrold: Common/Common.a GUICommon/GUICommon.a + $(MAKE) -C TimerControl + +TimeServer/timeserverd: Common/Common.a GUICommon/GUICommon.a + $(MAKE) -C TimeServer + +VoiceTransmit/voicetransmitd: Common/Common.a + $(MAKE) -C VoiceTransmit + +GUICommon/GUICommon.a: + $(MAKE) -C GUICommon + +Common/Common.a: + $(MAKE) -C Common + +ircDDB/IRCDDB.a: + $(MAKE) -C ircDDB + +install: all + $(MAKE) -C Data install + $(MAKE) -C APRSTransmit install + $(MAKE) -C ircDDBGateway install + $(MAKE) -C RemoteControl install + $(MAKE) -C StarNetServer install + $(MAKE) -C TextTransmit install + $(MAKE) -C TimerControl install + $(MAKE) -C TimeServer install + $(MAKE) -C VoiceTransmit install + $(MAKE) -C ircDDBGatewayConfig install + +clean: + $(MAKE) -C Common clean + $(MAKE) -C ircDDB clean + $(MAKE) -C GUICommon clean + $(MAKE) -C APRSTransmit clean + $(MAKE) -C ircDDBGateway clean + $(MAKE) -C RemoteControl clean + $(MAKE) -C StarNetServer clean + $(MAKE) -C TextTransmit clean + $(MAKE) -C TimerControl clean + $(MAKE) -C TimeServer clean + $(MAKE) -C VoiceTransmit clean + $(MAKE) -C ircDDBGatewayConfig clean + diff --git a/Makefile.osx b/Makefile.osx new file mode 100644 index 0000000..ac25bae --- /dev/null +++ b/Makefile.osx @@ -0,0 +1,70 @@ +export CXX ?= $(shell wx-config --cxx) +export CFLAGS ?= -O2 -Wall $(shell wx-config --cxxflags) +export GUILIBS ?= $(shell wx-config --libs adv,core,base) +export LIBS ?= $(shell wx-config --libs base) +export LDFLAGS ?= + +all: ircDDBGateway/ircddbgatewayd ircDDBGatewayConfig/ircddbgatewayconfig + +ircDDBGateway/ircddbgatewayd: Common/Common.a ircDDB/IRCDDB.a + $(MAKE) -C ircDDBGateway + +ircDDBGatewayConfig/ircddbgatewayconfig: GUICommon/GUICommon.a Common/Common.a + $(MAKE) -C ircDDBGatewayConfig + +APRSTransmit/aprstransmitd: Common/Common.a + $(MAKE) -C APRSTransmit + +RemoteControl/remotecontrold: Common/Common.a + $(MAKE) -C RemoteControl + +StarNetServer/starnetserverd: Common/Common.a ircDDB/IRCDDB.a + $(MAKE) -C StarNetServer + +TextTransmit/texttransmitd: Common/Common.a + $(MAKE) -C TextTransmit + +TimerControl/timercontrold: Common/Common.a GUICommon/GUICommon.a + $(MAKE) -C TimerControl + +TimeServer/timeserverd: Common/Common.a GUICommon/GUICommon.a + $(MAKE) -C TimeServer + +VoiceTransmit/voicetransmitd: Common/Common.a + $(MAKE) -C VoiceTransmit + +GUICommon/GUICommon.a: + $(MAKE) -C GUICommon + +Common/Common.a: + $(MAKE) -C Common + +ircDDB/IRCDDB.a: + $(MAKE) -C ircDDB + +install: all + $(MAKE) -C Data install + $(MAKE) -C APRSTransmit install + $(MAKE) -C ircDDBGateway install + $(MAKE) -C RemoteControl install + $(MAKE) -C StarNetServer install + $(MAKE) -C TextTransmit install + $(MAKE) -C TimerControl install + $(MAKE) -C TimeServer install + $(MAKE) -C VoiceTransmit install + $(MAKE) -C ircDDBGatewayConfig install + +clean: + $(MAKE) -C Common clean + $(MAKE) -C ircDDB clean + $(MAKE) -C GUICommon clean + $(MAKE) -C APRSTransmit clean + $(MAKE) -C ircDDBGateway clean + $(MAKE) -C RemoteControl clean + $(MAKE) -C StarNetServer clean + $(MAKE) -C TextTransmit clean + $(MAKE) -C TimerControl clean + $(MAKE) -C TimeServer clean + $(MAKE) -C VoiceTransmit clean + $(MAKE) -C ircDDBGatewayConfig clean + From cf22bb061a1caf0b0f92d1f6eca6c6cd3fad4a50 Mon Sep 17 00:00:00 2001 From: Shawn Chain Date: Fri, 9 Nov 2018 17:53:16 +0800 Subject: [PATCH 054/166] Revert the default Makefile --- Makefile | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 8e07cf3..979fa73 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,19 @@ -# export CXX ?= $(shell wx-config --cxx) -# export CFLAGS ?= -O2 -Wall $(shell wx-config --cxxflags) -# export GUILIBS ?= $(shell wx-config --libs adv,core,base) -# export LIBS ?= $(shell wx-config --libs base) -# export LDFLAGS ?= +export DATADIR := "/usr/share/ircddbgateway" +export LOGDIR := "/var/log" +export CONFDIR := "/etc" +export BINDIR := "/usr/bin" -all: ircDDBGateway/ircddbgatewayd +# Add -DDCS_LINK to the end of the CFLAGS line below to add DCS linking to StarNet +# Add -DDEXTRA_LINK to the end of the CFLAGS line below to add DExtra linking to StarNet + +export CXX := $(shell wx-config --cxx) +export CFLAGS := -O2 -Wall $(shell wx-config --cxxflags) -DLOG_DIR='$(LOGDIR)' -DCONF_DIR='$(CONFDIR)' -DDATA_DIR='$(DATADIR)' +export GUILIBS := $(shell wx-config --libs adv,core,base) +export LIBS := $(shell wx-config --libs base) +export LDFLAGS := + +all: ircDDBGateway/ircddbgatewayd ircDDBGatewayConfig/ircddbgatewayconfig APRSTransmit/aprstransmitd RemoteControl/remotecontrold \ + StarNetServer/starnetserverd TextTransmit/texttransmitd TimerControl/timercontrold TimeServer/timeserverd VoiceTransmit/voicetransmitd ircDDBGateway/ircddbgatewayd: Common/Common.a ircDDB/IRCDDB.a $(MAKE) -C ircDDBGateway @@ -67,4 +76,3 @@ clean: $(MAKE) -C TimeServer clean $(MAKE) -C VoiceTransmit clean $(MAKE) -C ircDDBGatewayConfig clean - From 970d57b99778684907925c41ac9e414c279db8e7 Mon Sep 17 00:00:00 2001 From: Shawn Chain Date: Fri, 9 Nov 2018 18:00:11 +0800 Subject: [PATCH 055/166] Add compile switch for log in local time --- Common/Logger.cpp | 6 +++++- Makefile.osx | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Common/Logger.cpp b/Common/Logger.cpp index 936bf37..c64685b 100644 --- a/Common/Logger.cpp +++ b/Common/Logger.cpp @@ -18,7 +18,11 @@ #include "Logger.h" -static bool utc = false; +#if defined(LOG_LOCALTIME) && LOG_LOCAL_TIME == 1 +static const bool utc = false; +#else +static const bool utc = true; +#endif CLogger::CLogger(const wxString& directory, const wxString& name) : wxLog(), diff --git a/Makefile.osx b/Makefile.osx index ac25bae..66755cd 100644 --- a/Makefile.osx +++ b/Makefile.osx @@ -1,5 +1,5 @@ export CXX ?= $(shell wx-config --cxx) -export CFLAGS ?= -O2 -Wall $(shell wx-config --cxxflags) +export CFLAGS ?= -O2 -Wall $(shell wx-config --cxxflags) -DLOG_LOCALTIME=1 export GUILIBS ?= $(shell wx-config --libs adv,core,base) export LIBS ?= $(shell wx-config --libs base) export LDFLAGS ?= From 17af032279a2ef387c459b3ae8501615750d1ce1 Mon Sep 17 00:00:00 2001 From: Shawn Chain Date: Fri, 9 Nov 2018 18:10:05 +0800 Subject: [PATCH 056/166] Fix log issue --- Common/Logger.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Common/Logger.cpp b/Common/Logger.cpp index c64685b..9931f33 100644 --- a/Common/Logger.cpp +++ b/Common/Logger.cpp @@ -18,7 +18,7 @@ #include "Logger.h" -#if defined(LOG_LOCALTIME) && LOG_LOCAL_TIME == 1 +#if defined(LOG_LOCALTIME) && LOG_LOCALTIME == 1 static const bool utc = false; #else static const bool utc = true; From 95b7e51c30bd380af948a8469956625a810692bc Mon Sep 17 00:00:00 2001 From: Shawn Chain Date: Fri, 9 Nov 2018 18:29:09 +0800 Subject: [PATCH 057/166] Extract pid file name to global defs --- GlobalDefines.h | 30 +++++++++++++++++------------ ircDDBGateway/IRCDDBGatewayAppD.cpp | 4 ++-- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/GlobalDefines.h b/GlobalDefines.h index fbfa10b..08c68ba 100644 --- a/GlobalDefines.h +++ b/GlobalDefines.h @@ -2,22 +2,28 @@ #define __GLOBAL_DEFS__ #if defined(__APPLE__) -#define DATA_DIR "/opt/mmdvm/conf/dstar" -#define LOG_DIR "/opt/mmdvm/logs" -#define CONF_DIR "/opt/mmdvm/conf" -#define CONF_FILE "ircDDBGateway.ini" +#define DATA_DIR "/opt/mmdvm/conf/dstar" +#define LOG_DIR "/opt/mmdvm/logs" +#define CONF_DIR "/opt/mmdvm/conf" +#define CONF_FILE "ircDDBGateway.ini" +#define PID_FILE "/tmp/ircDDBGateway.pid" +#define PID_FILE_T "/tmp/ircDDBGateway_%s.pid" #elif defined(OPENWRT) && OPENWRT == 1 -#define DATA_DIR "/etc/mmdvm/dstar" -#define LOG_DIR "/var/log/mmdvm" -#define CONF_DIR "/etc" -#define CONF_FILE "ircDDBGateway.ini" +#define DATA_DIR "/etc/mmdvm/dstar" +#define LOG_DIR "/var/log/mmdvm" +#define CONF_DIR "/etc" +#define CONF_FILE "ircDDBGateway.ini" +#define PID_FILE "/tmp/ircDDBGateway.pid" +#define PID_FILE_T "/tmp/ircDDBGateway_%s.pid" #else -#define DATA_DIR "/usr/share/ircddbgateway" -#define LOG_DIR "/tmp" -#define CONF_DIR "/etc" -#define CONF_FILE "ircddbgateway" +#define DATA_DIR "/usr/share/ircddbgateway" +#define LOG_DIR "/tmp" +#define CONF_DIR "/etc" +#define CONF_FILE "ircddbgateway" +#define PID_FILE "/tmp/ircddbgateway.pid" +#define PID_FILE_T "/tmp/ircddbgateway_%s.pid" #endif diff --git a/ircDDBGateway/IRCDDBGatewayAppD.cpp b/ircDDBGateway/IRCDDBGatewayAppD.cpp index a391c52..df485e3 100644 --- a/ircDDBGateway/IRCDDBGatewayAppD.cpp +++ b/ircDDBGateway/IRCDDBGatewayAppD.cpp @@ -124,9 +124,9 @@ int main(int argc, char** argv) wxString pidFileName; if (!name.IsEmpty()) - pidFileName.Printf(wxT("/var/run/opendv/ircddbgateway_%s.pid"), name.c_str()); + pidFileName.Printf(wxT(PID_FILE_T), name.c_str()); else - pidFileName = wxT("/var/run/opendv/ircddbgateway.pid"); + pidFileName = wxT(PID_FILE); pidFileName.Replace(wxT(" "), wxT("_")); char fileName[128U]; From 8b70ae399da4b9727f1028cd36a4049683ab56c9 Mon Sep 17 00:00:00 2001 From: Shawn Chain Date: Fri, 9 Nov 2018 18:31:18 +0800 Subject: [PATCH 058/166] Revert the default pid file path to /var/run/ircddbgateway.pid --- GlobalDefines.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GlobalDefines.h b/GlobalDefines.h index 08c68ba..adc4397 100644 --- a/GlobalDefines.h +++ b/GlobalDefines.h @@ -22,8 +22,8 @@ #define LOG_DIR "/tmp" #define CONF_DIR "/etc" #define CONF_FILE "ircddbgateway" -#define PID_FILE "/tmp/ircddbgateway.pid" -#define PID_FILE_T "/tmp/ircddbgateway_%s.pid" +#define PID_FILE "/var/run/ircddbgateway.pid" +#define PID_FILE_T "/var/run/ircddbgateway_%s.pid" #endif From 75bc1d3488e398ff33c0c90d5caa2b23926a47d5 Mon Sep 17 00:00:00 2001 From: Shawn Chain Date: Fri, 9 Nov 2018 18:45:08 +0800 Subject: [PATCH 059/166] Don't check single instance under OpenWrt --- ircDDBGateway/IRCDDBGatewayAppD.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ircDDBGateway/IRCDDBGatewayAppD.cpp b/ircDDBGateway/IRCDDBGatewayAppD.cpp index df485e3..07d5d35 100644 --- a/ircDDBGateway/IRCDDBGatewayAppD.cpp +++ b/ircDDBGateway/IRCDDBGatewayAppD.cpp @@ -199,6 +199,7 @@ bool CIRCDDBGatewayAppD::init() new wxLogNull; } +#if !defined(OPENWRT) || OPENWRT != 1 wxString appName; if (!m_name.IsEmpty()) appName = APPLICATION_NAME + wxT(" ") + m_name; @@ -212,6 +213,7 @@ bool CIRCDDBGatewayAppD::init() wxLogError(wxT("Another copy of the ircDDB Gateway is running, exiting")); return false; } +#endif wxLogInfo(wxT("Starting ") + APPLICATION_NAME + wxT(" daemon - ") + VERSION); From baeee75cfd355aea7eef8d6287e1a67bb7f627b0 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Fri, 9 Nov 2018 11:31:10 +0000 Subject: [PATCH 060/166] Cherry picked changes/fixes from Shawnchain's OpenWrt changes. --- Common/APRSWriterThread.cpp | 6 +++--- Common/DDHandler.cpp | 11 +++++------ Common/XLXHostsFileDownloader.cpp | 4 +++- ircDDBGateway/IRCDDBGatewayApp.cpp | 12 ++++++++++++ ircDDBGateway/IRCDDBGatewayApp.h | 1 + ircDDBGateway/IRCDDBGatewayAppD.cpp | 17 ++++++++++++++--- ircDDBGateway/IRCDDBGatewayAppD.h | 5 +++-- 7 files changed, 41 insertions(+), 15 deletions(-) diff --git a/Common/APRSWriterThread.cpp b/Common/APRSWriterThread.cpp index 6c97d62..1f9bb98 100644 --- a/Common/APRSWriterThread.cpp +++ b/Common/APRSWriterThread.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2014 by Jonathan Naylor G4KLX + * Copyright (C) 2010-2014,2018 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 @@ -216,7 +216,7 @@ bool CAPRSWriterThread::connect() m_socket.close(); return false; } - wxLogMessage(wxT("Received login banner : ") + serverResponse); + wxLogMessage(wxT("Received login banner : %s"), serverResponse.c_str()); wxString filter(m_filter); if (filter.Length() > 0) filter.Prepend(wxT(" filter ")); @@ -242,7 +242,7 @@ bool CAPRSWriterThread::connect() return false; } - wxLogMessage(wxT("Response from APRS server: ") + serverResponse); + wxLogMessage(wxT("Response from APRS server: %s"), serverResponse.c_str()); wxLogMessage(wxT("Connected to the APRS server")); diff --git a/Common/DDHandler.cpp b/Common/DDHandler.cpp index cab79e6..f1f6f28 100644 --- a/Common/DDHandler.cpp +++ b/Common/DDHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011,2012,2013 by Jonathan Naylor G4KLX + * Copyright (C) 2011,2012,2013,2018 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 @@ -22,8 +22,7 @@ #include -#if !defined(WIN32) -// XXX Check these +#if defined(__linux__) #include #include #include @@ -103,7 +102,7 @@ void CDDHandler::initialise(unsigned int maxRoutes, const wxString& name) // Add a dummy entry for "DX-Cluster" multicast m_list[2] = new CEthernet(DX_MULTICAST_ADDRESS, wxT("CQCQCQ ")); -#if !defined(WIN32) +#if defined(__linux__) m_fd = ::open("/dev/net/tun", O_RDWR); if (m_fd < 0) { wxLogError(wxT("Cannot open /dev/net/tun")); @@ -238,7 +237,7 @@ void CDDHandler::process(CDDData& data) } } -#if !defined(WIN32) +#if defined(__linux__) unsigned int length = data.getEthernetFrame(m_buffer, BUFFER_LENGTH); ssize_t len = ::write(m_fd, (char*)m_buffer, length); @@ -253,7 +252,7 @@ CDDData* CDDHandler::read() if (m_maxRoutes == 0U) return NULL; -#if defined(WIN32) +#if !defined(WIN32) return NULL; #else // Check that the read() won't block diff --git a/Common/XLXHostsFileDownloader.cpp b/Common/XLXHostsFileDownloader.cpp index bcf86de..438e770 100644 --- a/Common/XLXHostsFileDownloader.cpp +++ b/Common/XLXHostsFileDownloader.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2013,2015 by Jonathan Naylor G4KLX + * Copyright (C) 2010-2013,2015,2018 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 @@ -28,6 +28,8 @@ wxString CXLXHostsFileDownloader::Download(const wxString & xlxHostsFileURL) { #ifdef XLX_USE_WGET + wxLogMessage(_T("Downloading XLX reflector list from %s"), xlxHostsFileURL.c_str()); + wxString xlxHostsFileName = wxFileName::CreateTempFileName(_T("XLX_Hosts_")); wxString commandLine = _T("wget -q -O ") + xlxHostsFileName + _T(" ") + xlxHostsFileURL; bool execResult = wxShell(commandLine); diff --git a/ircDDBGateway/IRCDDBGatewayApp.cpp b/ircDDBGateway/IRCDDBGatewayApp.cpp index dc563d4..7c50b4b 100644 --- a/ircDDBGateway/IRCDDBGatewayApp.cpp +++ b/ircDDBGateway/IRCDDBGatewayApp.cpp @@ -40,6 +40,7 @@ wxIMPLEMENT_APP(CIRCDDBGatewayApp); const wxChar* NAME_PARAM = wxT("Gateway Name"); const wxChar* NOLOGGING_SWITCH = wxT("nolog"); +const wxChar* DEBUG_SWITCH = wxT("debug"); const wxChar* GUI_SWITCH = wxT("gui"); const wxChar* LOGDIR_OPTION = wxT("logdir"); const wxChar* CONFDIR_OPTION = wxT("confdir"); @@ -50,6 +51,7 @@ CIRCDDBGatewayApp::CIRCDDBGatewayApp() : wxApp(), m_name(), m_nolog(false), +m_debug(false), m_gui(false), m_logDir(), m_confDir(), @@ -89,6 +91,14 @@ bool CIRCDDBGatewayApp::OnInit() wxLog* log = new CLogger(m_logDir, logBaseName); wxLog::SetActiveTarget(log); + + if (m_debug) { + wxLog::SetVerbose(true); + wxLog::SetLogLevel(wxLOG_Debug); + } else { + wxLog::SetVerbose(false); + wxLog::SetLogLevel(wxLOG_Message); + } } else { new wxLogNull; } @@ -174,6 +184,7 @@ int CIRCDDBGatewayApp::OnExit() void CIRCDDBGatewayApp::OnInitCmdLine(wxCmdLineParser& parser) { parser.AddSwitch(NOLOGGING_SWITCH, wxEmptyString, wxEmptyString, wxCMD_LINE_PARAM_OPTIONAL); + parser.AddSwitch(DEBUG_SWITCH, wxEmptyString, wxEmptyString, wxCMD_LINE_PARAM_OPTIONAL); parser.AddSwitch(GUI_SWITCH, wxEmptyString, wxEmptyString, wxCMD_LINE_PARAM_OPTIONAL); parser.AddOption(LOGDIR_OPTION, wxEmptyString, wxEmptyString, wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL); parser.AddOption(CONFDIR_OPTION, wxEmptyString, wxEmptyString, wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL); @@ -188,6 +199,7 @@ bool CIRCDDBGatewayApp::OnCmdLineParsed(wxCmdLineParser& parser) return false; m_nolog = parser.Found(NOLOGGING_SWITCH); + m_debug = parser.Found(DEBUG_SWITCH); m_gui = parser.Found(GUI_SWITCH); wxString logDir; diff --git a/ircDDBGateway/IRCDDBGatewayApp.h b/ircDDBGateway/IRCDDBGatewayApp.h index 3d11ba6..2bf5a3d 100644 --- a/ircDDBGateway/IRCDDBGatewayApp.h +++ b/ircDDBGateway/IRCDDBGatewayApp.h @@ -54,6 +54,7 @@ public: private: wxString m_name; bool m_nolog; + bool m_debug; bool m_gui; wxString m_logDir; wxString m_confDir; diff --git a/ircDDBGateway/IRCDDBGatewayAppD.cpp b/ircDDBGateway/IRCDDBGatewayAppD.cpp index 4fc59be..fa59b7f 100644 --- a/ircDDBGateway/IRCDDBGatewayAppD.cpp +++ b/ircDDBGateway/IRCDDBGatewayAppD.cpp @@ -44,6 +44,7 @@ const wxChar* NAME_PARAM = wxT("Gateway Name"); const wxChar* NOLOGGING_SWITCH = wxT("nolog"); +const wxChar* DEBUG_SWITCH = wxT("debug"); const wxChar* LOGDIR_OPTION = wxT("logdir"); const wxChar* CONFDIR_OPTION = wxT("confdir"); const wxChar* DAEMON_SWITCH = wxT("daemon"); @@ -67,6 +68,7 @@ int main(int argc, char** argv) wxCmdLineParser parser(argc, argv); parser.AddSwitch(NOLOGGING_SWITCH, wxEmptyString, wxEmptyString, wxCMD_LINE_PARAM_OPTIONAL); + parser.AddSwitch(DEBUG_SWITCH, wxEmptyString, wxEmptyString, wxCMD_LINE_PARAM_OPTIONAL); parser.AddSwitch(DAEMON_SWITCH, wxEmptyString, wxEmptyString, wxCMD_LINE_PARAM_OPTIONAL); parser.AddOption(LOGDIR_OPTION, wxEmptyString, wxEmptyString, wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL); parser.AddOption(CONFDIR_OPTION, wxEmptyString, wxEmptyString, wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL); @@ -79,6 +81,7 @@ int main(int argc, char** argv) } bool nolog = parser.Found(NOLOGGING_SWITCH); + bool debug = parser.Found(DEBUG_SWITCH); bool daemon = parser.Found(DAEMON_SWITCH); wxString logDir; @@ -135,7 +138,7 @@ int main(int argc, char** argv) ::fclose(fp); } - m_gateway = new CIRCDDBGatewayAppD(nolog, logDir, confDir, name); + m_gateway = new CIRCDDBGatewayAppD(nolog, debug, logDir, confDir, name); if (!m_gateway->init()) { ::wxUninitialize(); return 1; @@ -154,9 +157,10 @@ int main(int argc, char** argv) return 0; } -CIRCDDBGatewayAppD::CIRCDDBGatewayAppD(bool nolog, const wxString& logDir, const wxString& confDir, const wxString& name) : +CIRCDDBGatewayAppD::CIRCDDBGatewayAppD(bool nolog, bool debug, const wxString& logDir, const wxString& confDir, const wxString& name) : m_name(name), m_nolog(nolog), +m_debug(debug), m_logDir(logDir), m_confDir(confDir), m_thread(NULL), @@ -182,7 +186,14 @@ bool CIRCDDBGatewayAppD::init() wxLog* log = new CLogger(m_logDir, logBaseName); wxLog::SetActiveTarget(log); - wxLog::SetVerbose(); + + if (m_debug) { + wxLog::SetVerbose(true); + wxLog::SetLogLevel(wxLOG_Debug); + } else { + wxLog::SetVerbose(false); + wxLog::SetLogLevel(wxLOG_Message); + } } else { new wxLogNull; } diff --git a/ircDDBGateway/IRCDDBGatewayAppD.h b/ircDDBGateway/IRCDDBGatewayAppD.h index bee1aa4..5fd1d40 100644 --- a/ircDDBGateway/IRCDDBGatewayAppD.h +++ b/ircDDBGateway/IRCDDBGatewayAppD.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2013 by Jonathan Naylor G4KLX + * Copyright (C) 2010-2013,2018 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 @@ -28,7 +28,7 @@ class CIRCDDBGatewayAppD { public: - CIRCDDBGatewayAppD(bool nolog, const wxString& logDir, const wxString& confDir, const wxString& name); + CIRCDDBGatewayAppD(bool nolog, bool debug, const wxString& logDir, const wxString& confDir, const wxString& name); ~CIRCDDBGatewayAppD(); bool init(); @@ -40,6 +40,7 @@ public: private: wxString m_name; bool m_nolog; + bool m_debug; wxString m_logDir; wxString m_confDir; CIRCDDBGatewayThread* m_thread; From 86744087a4c7094f4a19310fff246fcea442916d Mon Sep 17 00:00:00 2001 From: Geoffrey Merck F4FXL - KC3FRA Date: Sun, 11 Nov 2018 17:12:05 +0100 Subject: [PATCH 061/166] Force crawling of sub-makes for changed dependencies Inspired by https://stackoverflow.com/questions/31293557/how-to-tell-make-to-watch-dependencies-of-a-sub-make-target Also make install, clean and all PHONY targets --- Makefile | 31 +++++++++++++++++++------------ MakefileGUI | 31 +++++++++++++++++++------------ 2 files changed, 38 insertions(+), 24 deletions(-) diff --git a/Makefile b/Makefile index 7ebc1e6..7db19e6 100644 --- a/Makefile +++ b/Makefile @@ -12,45 +12,47 @@ export GUILIBS := $(shell wx-config --libs adv,core,base) export LIBS := $(shell wx-config --libs base) export LDFLAGS := +.PHONY: all all: ircDDBGateway/ircddbgatewayd ircDDBGatewayConfig/ircddbgatewayconfig APRSTransmit/aprstransmitd RemoteControl/remotecontrold \ StarNetServer/starnetserverd TextTransmit/texttransmitd TimerControl/timercontrold TimeServer/timeserverd VoiceTransmit/voicetransmitd -ircDDBGateway/ircddbgatewayd: Common/Common.a ircDDB/IRCDDB.a +ircDDBGateway/ircddbgatewayd: Common/Common.a ircDDB/IRCDDB.a force $(MAKE) -C ircDDBGateway -ircDDBGatewayConfig/ircddbgatewayconfig: GUICommon/GUICommon.a Common/Common.a +ircDDBGatewayConfig/ircddbgatewayconfig: GUICommon/GUICommon.a Common/Common.a force $(MAKE) -C ircDDBGatewayConfig -APRSTransmit/aprstransmitd: Common/Common.a +APRSTransmit/aprstransmitd: Common/Common.a force $(MAKE) -C APRSTransmit -RemoteControl/remotecontrold: Common/Common.a +RemoteControl/remotecontrold: Common/Common.a force $(MAKE) -C RemoteControl -StarNetServer/starnetserverd: Common/Common.a ircDDB/IRCDDB.a +StarNetServer/starnetserverd: Common/Common.a ircDDB/IRCDDB.a force $(MAKE) -C StarNetServer -TextTransmit/texttransmitd: Common/Common.a +TextTransmit/texttransmitd: Common/Common.a force $(MAKE) -C TextTransmit -TimerControl/timercontrold: Common/Common.a GUICommon/GUICommon.a +TimerControl/timercontrold: Common/Common.a GUICommon/GUICommon.a force $(MAKE) -C TimerControl -TimeServer/timeserverd: Common/Common.a GUICommon/GUICommon.a +TimeServer/timeserverd: Common/Common.a GUICommon/GUICommon.a force $(MAKE) -C TimeServer -VoiceTransmit/voicetransmitd: Common/Common.a +VoiceTransmit/voicetransmitd: Common/Common.a force $(MAKE) -C VoiceTransmit -GUICommon/GUICommon.a: +GUICommon/GUICommon.a: force $(MAKE) -C GUICommon -Common/Common.a: +Common/Common.a: force $(MAKE) -C Common -ircDDB/IRCDDB.a: +ircDDB/IRCDDB.a: force $(MAKE) -C ircDDB +.PHONY: install install: all $(MAKE) -C Data install $(MAKE) -C APRSTransmit install @@ -63,6 +65,7 @@ install: all $(MAKE) -C VoiceTransmit install $(MAKE) -C ircDDBGatewayConfig install +.PHONY: clean clean: $(MAKE) -C Common clean $(MAKE) -C ircDDB clean @@ -77,3 +80,7 @@ clean: $(MAKE) -C VoiceTransmit clean $(MAKE) -C ircDDBGatewayConfig clean +.PHONY: force +force : + true + diff --git a/MakefileGUI b/MakefileGUI index af13d02..e3ee47d 100644 --- a/MakefileGUI +++ b/MakefileGUI @@ -12,45 +12,47 @@ export GUILIBS := $(shell wx-config --libs adv,core,base) export LIBS := $(shell wx-config --libs base) export LDFLAGS := +.PHONY: all all: ircDDBGateway/ircddbgateway ircDDBGatewayConfig/ircddbgatewayconfig APRSTransmit/aprstransmitd RemoteControl/remotecontrol \ StarNetServer/starnetserver TextTransmit/texttransmitd TimerControl/timercontrol TimeServer/timeserver VoiceTransmit/voicetransmitd -ircDDBGateway/ircddbgateway: GUICommon/GUICommon.a Common/Common.a ircDDB/IRCDDB.a +ircDDBGateway/ircddbgateway: GUICommon/GUICommon.a Common/Common.a ircDDB/IRCDDB.a force $(MAKE) -C ircDDBGateway -f MakefileGUI -ircDDBGatewayConfig/ircddbgatewayconfig: GUICommon/GUICommon.a Common/Common.a +ircDDBGatewayConfig/ircddbgatewayconfig: GUICommon/GUICommon.a Common/Common.a force $(MAKE) -C ircDDBGatewayConfig -APRSTransmit/aprstransmitd: Common/Common.a +APRSTransmit/aprstransmitd: Common/Common.a force $(MAKE) -C APRSTransmit -RemoteControl/remotecontrol: Common/Common.a +RemoteControl/remotecontrol: Common/Common.a force $(MAKE) -C RemoteControl -f MakefileGUI -StarNetServer/starnetserver: Common/Common.a ircDDB/IRCDDB.a +StarNetServer/starnetserver: Common/Common.a ircDDB/IRCDDB.a force $(MAKE) -C StarNetServer -f MakefileGUI -TextTransmit/texttransmitd: Common/Common.a +TextTransmit/texttransmitd: Common/Common.a force $(MAKE) -C TextTransmit -TimerControl/timercontrol: Common/Common.a GUICommon/GUICommon.a +TimerControl/timercontrol: Common/Common.a GUICommon/GUICommon.a force $(MAKE) -C TimerControl -f MakefileGUI -TimeServer/timeserver: Common/Common.a GUICommon/GUICommon.a +TimeServer/timeserver: Common/Common.a GUICommon/GUICommon.a force $(MAKE) -C TimeServer -f MakefileGUI -VoiceTransmit/voicetransmitd: Common/Common.a +VoiceTransmit/voicetransmitd: Common/Common.a force $(MAKE) -C VoiceTransmit -GUICommon/GUICommon.a: +GUICommon/GUICommon.a: force $(MAKE) -C GUICommon -Common/Common.a: +Common/Common.a: force $(MAKE) -C Common -ircDDB/IRCDDB.a: +ircDDB/IRCDDB.a: force $(MAKE) -C ircDDB +.PHONY: install install: all $(MAKE) -C Data install $(MAKE) -C APRSTransmit install @@ -63,6 +65,7 @@ install: all $(MAKE) -C VoiceTransmit install $(MAKE) -C ircDDBGatewayConfig install +.PHONY: clean clean: $(MAKE) -C Common clean $(MAKE) -C ircDDB clean @@ -76,3 +79,7 @@ clean: $(MAKE) -C TimeServer -f MakefileGUI clean $(MAKE) -C VoiceTransmit clean $(MAKE) -C ircDDBGatewayConfig clean + +.PHONY: force +force: + true; From e66484340b1c7e067e5ac7a8c17cbdf1772e42a2 Mon Sep 17 00:00:00 2001 From: Geoffrey Merck F4FXL - KC3FRA Date: Sun, 11 Nov 2018 17:13:17 +0100 Subject: [PATCH 062/166] Add generation of dependency files Generate dependency files so that when changing one file only stuff dependant on that file gets rebuilt. Avoid cleaning the whole thing on every small change --- APRSTransmit/Makefile | 6 ++++++ Common/Makefile | 5 +++++ Data/Makefile | 1 + GUICommon/Makefile | 5 +++++ RemoteControl/Makefile | 6 ++++++ RemoteControl/MakefileGUI | 6 ++++++ StarNetServer/Makefile | 6 ++++++ StarNetServer/MakefileGUI | 6 ++++++ TextTransmit/Makefile | 6 ++++++ TimeServer/Makefile | 6 ++++++ TimeServer/MakefileGUI | 6 ++++++ TimerControl/Makefile | 6 ++++++ TimerControl/MakefileGUI | 6 ++++++ VoiceTransmit/Makefile | 6 ++++++ ircDDB/Makefile | 5 +++++ ircDDBGateway/Makefile | 6 ++++++ ircDDBGateway/MakefileGUI | 6 ++++++ ircDDBGatewayConfig/Makefile | 6 ++++++ 18 files changed, 100 insertions(+) diff --git a/APRSTransmit/Makefile b/APRSTransmit/Makefile index 8814c53..20e9521 100644 --- a/APRSTransmit/Makefile +++ b/APRSTransmit/Makefile @@ -1,16 +1,22 @@ OBJECTS = APRSParser.o APRSTransmitAppD.o APRSTransmit.o +.PHONY: all all: aprstransmitd aprstransmitd: $(OBJECTS) $(CXX) $(OBJECTS) ../Common/Common.a $(LDFLAGS) $(LIBS) -o aprstransmitd +-include $(OBJECTS:.o=.d) + %.o: %.cpp $(CXX) -DwxUSE_GUI=0 $(CFLAGS) -I../Common -c -o $@ $< + $(CXX) -MM -DwxUSE_GUI=0 $(CFLAGS) -I../Common $< > $*.d +.PHONY: install install: install -g bin -o root -m 0775 aprstransmitd $(BINDIR) +.PHONY: clean clean: $(RM) aprstransmitd *.o *.d *.bak *~ diff --git a/Common/Makefile b/Common/Makefile index 8643148..b818a62 100644 --- a/Common/Makefile +++ b/Common/Makefile @@ -9,14 +9,19 @@ OBJECTS = AMBEData.o AnnouncementUnit.o APRSCollector.o APRSWriter.o APRSWriterT TCPReaderWriterClient.o TCPReaderWriterServer.o TextCollector.o TextData.o Timer.o UDPReaderWriter.o UserCache.o Utils.o \ VersionUnit.o XLXHostsFileDownloader.o +.PHONY: all all: Common.a Common.a: $(OBJECTS) $(AR) rcs Common.a $(OBJECTS) +-include $(OBJECTS:.o=.d) + %.o: %.cpp $(CXX) -DwxUSE_GUI=0 $(CFLAGS) -I../ircDDB -c -o $@ $< + $(CXX) -MM -DwxUSE_GUI=0 $(CFLAGS) -I../ircDDB $< > $*.d +.PHONY: clean clean: $(RM) Common.a *.o *.d *.bak *~ diff --git a/Data/Makefile b/Data/Makefile index 4350c30..c115445 100644 --- a/Data/Makefile +++ b/Data/Makefile @@ -1,3 +1,4 @@ +.PHONY: install install: install -d -g bin -o root -m 0775 $(DATADIR) install -g bin -o root -m 0664 CCS_Hosts.txt $(DATADIR) diff --git a/GUICommon/Makefile b/GUICommon/Makefile index 4a837a3..9c4717c 100644 --- a/GUICommon/Makefile +++ b/GUICommon/Makefile @@ -1,14 +1,19 @@ OBJECTS = AddressTextCtrl.o CallsignTextCtrl.o DCSSet.o DescriptionTextCtrl.o DExtraSet.o DPlusSet.o DPRSSet.o PortTextCtrl.o RemoteSet.o \ RepeaterDataSet.o RepeaterInfoSet.o RestrictedTextCtrl.o StarNetSet.o XLXSet.o +.PHONY: all all: GUICommon.a GUICommon.a: $(OBJECTS) $(AR) rcs GUICommon.a $(OBJECTS) +-include $(OBJECTS:.o=.d) + %.o: %.cpp $(CXX) $(CFLAGS) -I../Common -c -o $@ $< + $(CXX) -MM $(CFLAGS) -I../Common $< > $*.d +.PHONY: clean clean: $(RM) GUICommon.a *.o *.d *.bak *~ diff --git a/RemoteControl/Makefile b/RemoteControl/Makefile index 48a2a54..978286d 100644 --- a/RemoteControl/Makefile +++ b/RemoteControl/Makefile @@ -1,17 +1,23 @@ OBJECTS = RemoteControlAppD.o RemoteControlCallsignData.o RemoteControlConfig.o RemoteControlLinkData.o RemoteControlRemoteControlHandler.o \ RemoteControlRepeaterData.o RemoteControlStarNetGroup.o RemoteControlStarNetUser.o +.PHONY: all all: remotecontrold remotecontrold: $(OBJECTS) $(CXX) $(OBJECTS) ../Common/Common.a $(LDFLAGS) $(LIBS) -o remotecontrold +-include $(OBJECTS:.o=.d) + %.o: %.cpp $(CXX) -DwxUSE_GUI=0 $(CFLAGS) -I../Common -c -o $@ $< + $(CXX) -MM -DwxUSE_GUI=0 $(CFLAGS) -I../Common $< > $*.d +.PHONY: install install: install -g bin -o root -m 0775 remotecontrold $(BINDIR) +.PHONY: clean clean: $(RM) remotecontrold *.o *.d *.bak *~ diff --git a/RemoteControl/MakefileGUI b/RemoteControl/MakefileGUI index 316607f..566a990 100644 --- a/RemoteControl/MakefileGUI +++ b/RemoteControl/MakefileGUI @@ -2,17 +2,23 @@ OBJECTS = RemoteControlApp.o RemoteControlCallsignData.o RemoteControlConfig.o R RemoteControlPreferences.o RemoteControlRemoteControlHandler.o RemoteControlRemoteSet.o RemoteControlRepeaterData.o \ RemoteControlRepeaterPanel.o RemoteControlStarNetGroup.o RemoteControlStarNetPanel.o RemoteControlStarNetUser.o +.PHONY: all all: remotecontrol remotecontrol: $(OBJECTS) $(CXX) $(OBJECTS) ../GUICommon/GUICommon.a ../Common/Common.a $(LDFLAGS) $(GUILIBS) -o remotecontrol +-include $(OBJECTS:.o=.d) + %.o: %.cpp $(CXX) $(CFLAGS) -I../Common -I../GUICommon -c -o $@ $< + $(CXX) -MM $(CFLAGS) -I../Common -I../GUICommon $< > $*.d +.PHONY: install install: install -g bin -o root -m 0775 remotecontrol $(BINDIR) +.PHONY: clean clean: $(RM) remotecontrol *.o *.d *.bak *~ diff --git a/StarNetServer/Makefile b/StarNetServer/Makefile index f49f112..cffdda5 100644 --- a/StarNetServer/Makefile +++ b/StarNetServer/Makefile @@ -1,16 +1,22 @@ OBJECTS = StarNetServerAppD.o StarNetServerConfig.o StarNetServerThread.o StarNetServerThreadHelper.o +.PHONY: all all: starnetserverd starnetserverd: $(OBJECTS) $(CXX) $(OBJECTS) ../Common/Common.a ../ircDDB/IRCDDB.a $(LDFLAGS) $(LIBS) -o starnetserverd +-include $(OBJECTS:.o=.d) + %.o: %.cpp $(CXX) -DwxUSE_GUI=0 $(CFLAGS) -I../Common -I../ircDDB -c -o $@ $< + $(CXX) -MM -DwxUSE_GUI=0 $(CFLAGS) -I../Common -I../ircDDB $< > $*.d +.PHONY: install install: install -g bin -o root -m 0775 starnetserverd $(BINDIR) +.PHONY: clean clean: $(RM) starnetserverd *.o *.d *.bak *~ diff --git a/StarNetServer/MakefileGUI b/StarNetServer/MakefileGUI index 9073dab..3f45261 100644 --- a/StarNetServer/MakefileGUI +++ b/StarNetServer/MakefileGUI @@ -2,17 +2,23 @@ OBJECTS = StarNetServerApp.o StarNetServerCallsignSet.o StarNetServerConfig.o St StarNetServerLogRedirect.o StarNetServerMiscellaneousSet.o StarNetServerPreferences.o StarNetServerThread.o \ StarNetServerThreadHelper.o +.PHONY: all all: starnetserver starnetserver: $(OBJECTS) $(CXX) $(OBJECTS) ../GUICommon/GUICommon.a ../Common/Common.a ../ircDDB/IRCDDB.a $(LDFLAGS) $(GUILIBS) -o starnetserver +-include $(OBJECTS:.o=.d) + %.o: %.cpp $(CXX) $(CFLAGS) -I../Common -I../GUICommon -I../ircDDB -c -o $@ $< + $(CXX) -MM $(CFLAGS) -I../Common -I../GUICommon -I../ircDDB $< > $*.d +.PHONY: install install: install -g bin -o root -m 0775 starnetserver $(BINDIR) +.PHONY: clean clean: $(RM) starnetserver *.o *.d *.bak *~ diff --git a/TextTransmit/Makefile b/TextTransmit/Makefile index c4e70bc..14ddb89 100644 --- a/TextTransmit/Makefile +++ b/TextTransmit/Makefile @@ -1,16 +1,22 @@ OBJECTS = TextTransmit.o +.PHONY: all all: texttransmitd texttransmitd: $(OBJECTS) $(CXX) $(OBJECTS) ../Common/Common.a $(LDFLAGS) $(LIBS) -o texttransmitd +-include $(OBJECTS:.o=.d) + %.o: %.cpp $(CXX) -DwxUSE_GUI=0 $(CFLAGS) -I../Common -c -o $@ $< + $(CXX) -MM -DwxUSE_GUI=0 $(CFLAGS) -I../Common $< > $*.d +.PHONY: install install: install -g bin -o root -m 0775 texttransmitd $(BINDIR) +.PHONY: clean clean: $(RM) texttransmitd *.o *.d *.bak *~ diff --git a/TimeServer/Makefile b/TimeServer/Makefile index 69b2339..88119ee 100644 --- a/TimeServer/Makefile +++ b/TimeServer/Makefile @@ -1,16 +1,22 @@ OBJECTS = TimeServerD.o TimeServerConfig.o TimeServerThread.o TimeServerThreadHelper.o +.PHONY: all all: timeserverd timeserverd: $(OBJECTS) $(CXX) $(OBJECTS) ../Common/Common.a $(LDFLAGS) $(LIBS) -o timeserverd +-include $(OBJECTS:.o=.d) + %.o: %.cpp $(CXX) -DwxUSE_GUI=0 $(CFLAGS) -I../Common -c -o $@ $< + $(CXX) -MM -DwxUSE_GUI=0 $(CFLAGS) -I../Common $< > $*.d +.PHONY: install install: install -g bin -o root -m 0775 timeserverd $(BINDIR) +.PHONY: clean clean: $(RM) timeserverd *.o *.d *.bak *~ diff --git a/TimeServer/MakefileGUI b/TimeServer/MakefileGUI index 9ac2e11..3f902cf 100644 --- a/TimeServer/MakefileGUI +++ b/TimeServer/MakefileGUI @@ -1,17 +1,23 @@ OBJECTS = TimeServerApp.o TimeServerAnnouncementsSet.o TimeServerConfig.o TimeServerFrame.o TimeServerGatewaySet.o TimeServerLogRedirect.o \ TimeServerPreferences.o TimeServerThread.o TimeServerThreadHelper.o +.PHONY: all all: timeserver timeserver: $(OBJECTS) $(CXX) $(OBJECTS) ../GUICommon/GUICommon.a ../Common/Common.a $(LDFLAGS) $(GUILIBS) -o timeserver +-include $(OBJECTS:.o=.d) + %.o: %.cpp $(CXX) $(CFLAGS) -I../Common -I../GUICommon -c -o $@ $< + $(CXX) -MM $(CFLAGS) -I../Common -I../GUICommon $< > $*.d +.PHONY: install install: install -g bin -o root -m 0775 timeserver $(BINDIR) +.PHONY: clean clean: $(RM) timeserver *.o *.d *.bak *~ diff --git a/TimerControl/Makefile b/TimerControl/Makefile index 53877ff..eebb6a6 100644 --- a/TimerControl/Makefile +++ b/TimerControl/Makefile @@ -1,17 +1,23 @@ OBJECTS = TimerControlAppD.o TimerControlConfig.o TimerControlItemFile.o TimerControlRemoteControlHandler.o TimerControlThread.o \ TimerControlThreadHelper.o +.PHONY: all all: timercontrold timercontrold: $(OBJECTS) $(CXX) $(OBJECTS) ../Common/Common.a $(LDFLAGS) $(LIBS) -o timercontrold +-include $(OBJECTS:.o=.d) + %.o: %.cpp $(CXX) -DwxUSE_GUI=0 $(CFLAGS) -I../Common -c -o $@ $< + $(CXX) -MM -DwxUSE_GUI=0 $(CFLAGS) -I../Common $< > $*.d +.PHONY: install install: install -g bin -o root -m 0775 timercontrold $(BINDIR) +.PHONY: clean clean: $(RM) timercontrold *.o *.d *.bak *~ diff --git a/TimerControl/MakefileGUI b/TimerControl/MakefileGUI index 0012a10..58646ea 100644 --- a/TimerControl/MakefileGUI +++ b/TimerControl/MakefileGUI @@ -2,17 +2,23 @@ OBJECTS = TimerControlApp.o TimerControlConfig.o TimerControlFrame.o TimerContro TimerControlRemoteControlHandler.o TimerControlRemoteSet.o TimerControlRepeaterPanel.o TimerControlThread.o \ TimerControlThreadHelper.o +.PHONY: all all: timercontrol timercontrol: $(OBJECTS) $(CXX) $(OBJECTS) ../GUICommon/GUICommon.a ../Common/Common.a $(LDFLAGS) $(GUILIBS) -o timercontrol +-include $(OBJECTS:.o=.d) + %.o: %.cpp $(CXX) $(CFLAGS) -I../Common -I../GUICommon -c -o $@ $< + $(CXX) -MM $(CFLAGS) -I../Common -I../GUICommon $< > $*.d +.PHONY: install install: install -g bin -o root -m 0775 timercontrol $(BINDIR) +.PHONY: clean clean: $(RM) timercontrol *.o *.d *.bak *~ diff --git a/VoiceTransmit/Makefile b/VoiceTransmit/Makefile index 71cb8ef..ee651bf 100644 --- a/VoiceTransmit/Makefile +++ b/VoiceTransmit/Makefile @@ -1,16 +1,22 @@ OBJECTS = VoiceStore.o VoiceTransmit.o +.PHONY: all all: voicetransmitd voicetransmitd: $(OBJECTS) $(CXX) $(OBJECTS) ../Common/Common.a $(LDFLAGS) $(LIBS) -o voicetransmitd +-include $(OBJECTS:.o=.d) + %.o: %.cpp $(CXX) -DwxUSE_GUI=0 $(CFLAGS) -I../Common -c -o $@ $< + $(CXX) -MM -DwxUSE_GUI=0 $(CFLAGS) -I../Common $< > $*.d +.PHONY: install install: install -g bin -o root -m 0775 voicetransmitd $(BINDIR) +.PHONY: clean clean: $(RM) voicetransmitd *.o *.d *.bak *~ diff --git a/ircDDB/Makefile b/ircDDB/Makefile index b841a5e..5a6602c 100644 --- a/ircDDB/Makefile +++ b/ircDDB/Makefile @@ -1,14 +1,19 @@ OBJECTS = IRCClient.o IRCDDBApp.o IRCDDBClient.o IRCDDB.o IRCDDBMultiClient.o IRCMessage.o IRCMessageQueue.o IRCProtocol.o IRCReceiver.o \ IRCutils.o +.PHONY: all all: IRCDDB.a IRCDDB.a: $(OBJECTS) $(AR) rcs IRCDDB.a $(OBJECTS) +-include $(OBJECTS:.o=.d) + %.o: %.cpp $(CXX) -DwxUSE_GUI=0 $(CFLAGS) -c -o $@ $< + $(CXX) -MM -DwxUSE_GUI=0 $(CFLAGS) $< > $*.d +.PHONY: clean clean: $(RM) IRCDDB.a *.o *.d *.bak *~ diff --git a/ircDDBGateway/Makefile b/ircDDBGateway/Makefile index 3bf974e..9a43de0 100644 --- a/ircDDBGateway/Makefile +++ b/ircDDBGateway/Makefile @@ -1,16 +1,22 @@ OBJECTS = IRCDDBGatewayAppD.o IRCDDBGatewayStatusData.o IRCDDBGatewayThread.o IRCDDBGatewayThreadHelper.o +.PHONY: all all: ircddbgatewayd ircddbgatewayd: $(OBJECTS) $(CXX) $(OBJECTS) ../Common/Common.a ../ircDDB/IRCDDB.a $(LDFLAGS) $(LIBS) -o ircddbgatewayd +-include $(OBJECTS:.o=.d) + %.o: %.cpp $(CXX) -DwxUSE_GUI=0 $(CFLAGS) -I../Common -I../ircDDB -c -o $@ $< + $(CXX) -MM -DwxUSE_GUI=0 $(CFLAGS) -I../Common -I../ircDDB $< > $*.d +.PHONY: install install: install -g bin -o root -m 0775 ircddbgatewayd $(BINDIR) +.PHONY: clean clean: $(RM) ircddbgatewayd *.o *.d *.bak *~ diff --git a/ircDDBGateway/MakefileGUI b/ircDDBGateway/MakefileGUI index 8ebf8fa..e6c2a86 100644 --- a/ircDDBGateway/MakefileGUI +++ b/ircDDBGateway/MakefileGUI @@ -1,17 +1,23 @@ OBJECTS = IRCDDBGatewayApp.o IRCDDBGatewayFrame.o IRCDDBGatewayLogRedirect.o IRCDDBGatewayStatusData.o IRCDDBGatewayThread.o \ IRCDDBGatewayThreadHelper.o +.PHONY: all all: ircddbgateway ircddbgateway: $(OBJECTS) $(CXX) $(OBJECTS) ../GUICommon/GUICommon.a ../Common/Common.a ../ircDDB/IRCDDB.a $(LDFLAGS) $(GUILIBS) -o ircddbgateway +-include $(OBJECTS:.o=.d) + %.o: %.cpp $(CXX) $(CFLAGS) -I../Common -I../GUICommon -I../ircDDB -c -o $@ $< + $(CXX) -MM $(CFLAGS) -I../Common -I../GUICommon -I../ircDDB $< > $*.d +.PHONY: install install: install -g bin -o root -m 0775 ircddbgateway $(BINDIR) +.PHONY: clean clean: $(RM) ircddbgateway *.o *.d *.bak *~ diff --git a/ircDDBGatewayConfig/Makefile b/ircDDBGatewayConfig/Makefile index bdc24ef..9099d00 100644 --- a/ircDDBGatewayConfig/Makefile +++ b/ircDDBGatewayConfig/Makefile @@ -1,17 +1,23 @@ OBJECTS = IRCDDBGatewayConfigApp.o IRCDDBGatewayConfigFrame.o IRCDDBGatewayConfigGatewaySet.o IRCDDBGatewayConfigIrcDDBSet.o \ IRCDDBGatewayConfigMiscellaneousSet.o +.PHONY: all all: ircddbgatewayconfig ircddbgatewayconfig: $(OBJECTS) $(CXX) $(OBJECTS) ../GUICommon/GUICommon.a ../Common/Common.a $(LDFLAGS) $(GUILIBS) -o ircddbgatewayconfig +-include $(OBJECTS:.o=.d) + %.o: %.cpp $(CXX) $(CFLAGS) -I../Common -I../GUICommon -c -o $@ $< + $(CXX) -MM -DwxUSE_GUI=0 $(CFLAGS) -I../Common -I../GUICommon $< > $*.d +.PHONY: install install: install -g bin -o root -m 0775 ircddbgatewayconfig $(BINDIR) +.PHONY: clean clean: $(RM) ircddbgatewayconfig *.o *.d *.bak *~ From dcb5b4b455dd2869358bb461aec51a40a867f219 Mon Sep 17 00:00:00 2001 From: Geoffrey Merck F4FXL - KC3FRA Date: Sun, 11 Nov 2018 18:35:30 +0100 Subject: [PATCH 063/166] Add empty targets for dependencies in sub make file This forces make to check if dependency (eg ../Common/Common.a) is more recent than the target --- APRSTransmit/Makefile | 4 +++- Common/Makefile | 3 ++- GUICommon/Makefile | 3 ++- Makefile | 2 +- RemoteControl/Makefile | 3 ++- RemoteControl/MakefileGUI | 4 +++- StarNetServer/Makefile | 4 +++- StarNetServer/MakefileGUI | 4 +++- TextTransmit/Makefile | 3 ++- TimeServer/Makefile | 3 ++- TimeServer/MakefileGUI | 4 +++- TimerControl/Makefile | 4 +++- TimerControl/MakefileGUI | 4 +++- VoiceTransmit/Makefile | 3 ++- ircDDBGateway/Makefile | 5 ++++- ircDDBGateway/MakefileGUI | 5 ++++- ircDDBGatewayConfig/Makefile | 4 +++- 17 files changed, 45 insertions(+), 17 deletions(-) diff --git a/APRSTransmit/Makefile b/APRSTransmit/Makefile index 20e9521..17e82b4 100644 --- a/APRSTransmit/Makefile +++ b/APRSTransmit/Makefile @@ -3,7 +3,7 @@ OBJECTS = APRSParser.o APRSTransmitAppD.o APRSTransmit.o .PHONY: all all: aprstransmitd -aprstransmitd: $(OBJECTS) +aprstransmitd: $(OBJECTS) ../Common/Common.a $(CXX) $(OBJECTS) ../Common/Common.a $(LDFLAGS) $(LIBS) -o aprstransmitd -include $(OBJECTS:.o=.d) @@ -20,3 +20,5 @@ install: clean: $(RM) aprstransmitd *.o *.d *.bak *~ +../Common/Common.a: + diff --git a/Common/Makefile b/Common/Makefile index b818a62..0243a4b 100644 --- a/Common/Makefile +++ b/Common/Makefile @@ -12,7 +12,7 @@ OBJECTS = AMBEData.o AnnouncementUnit.o APRSCollector.o APRSWriter.o APRSWriterT .PHONY: all all: Common.a -Common.a: $(OBJECTS) +Common.a: $(OBJECTS) ../ircDDB/IRCDDB.a $(AR) rcs Common.a $(OBJECTS) -include $(OBJECTS:.o=.d) @@ -25,3 +25,4 @@ Common.a: $(OBJECTS) clean: $(RM) Common.a *.o *.d *.bak *~ +../ircDDB/IRCDDB.a: diff --git a/GUICommon/Makefile b/GUICommon/Makefile index 9c4717c..6412cb2 100644 --- a/GUICommon/Makefile +++ b/GUICommon/Makefile @@ -4,7 +4,7 @@ OBJECTS = AddressTextCtrl.o CallsignTextCtrl.o DCSSet.o DescriptionTextCtrl.o DE .PHONY: all all: GUICommon.a -GUICommon.a: $(OBJECTS) +GUICommon.a: $(OBJECTS) ../Common/Common.a $(AR) rcs GUICommon.a $(OBJECTS) -include $(OBJECTS:.o=.d) @@ -17,3 +17,4 @@ GUICommon.a: $(OBJECTS) clean: $(RM) GUICommon.a *.o *.d *.bak *~ +../Common/Common.a: diff --git a/Makefile b/Makefile index 7db19e6..1610fd0 100644 --- a/Makefile +++ b/Makefile @@ -82,5 +82,5 @@ clean: .PHONY: force force : - true + @true diff --git a/RemoteControl/Makefile b/RemoteControl/Makefile index 978286d..a4c399a 100644 --- a/RemoteControl/Makefile +++ b/RemoteControl/Makefile @@ -4,7 +4,7 @@ OBJECTS = RemoteControlAppD.o RemoteControlCallsignData.o RemoteControlConfig.o .PHONY: all all: remotecontrold -remotecontrold: $(OBJECTS) +remotecontrold: $(OBJECTS) ../Common/Common.a $(CXX) $(OBJECTS) ../Common/Common.a $(LDFLAGS) $(LIBS) -o remotecontrold -include $(OBJECTS:.o=.d) @@ -21,3 +21,4 @@ install: clean: $(RM) remotecontrold *.o *.d *.bak *~ +../Common/Common.a: diff --git a/RemoteControl/MakefileGUI b/RemoteControl/MakefileGUI index 566a990..ed75ed9 100644 --- a/RemoteControl/MakefileGUI +++ b/RemoteControl/MakefileGUI @@ -5,7 +5,7 @@ OBJECTS = RemoteControlApp.o RemoteControlCallsignData.o RemoteControlConfig.o R .PHONY: all all: remotecontrol -remotecontrol: $(OBJECTS) +remotecontrol: $(OBJECTS) ../GUICommon/GUICommon.a ../Common/Common.a $(CXX) $(OBJECTS) ../GUICommon/GUICommon.a ../Common/Common.a $(LDFLAGS) $(GUILIBS) -o remotecontrol -include $(OBJECTS:.o=.d) @@ -22,3 +22,5 @@ install: clean: $(RM) remotecontrol *.o *.d *.bak *~ +../GUICommon/GUICommon.a: +../Common/Common.a: diff --git a/StarNetServer/Makefile b/StarNetServer/Makefile index cffdda5..a08a3b6 100644 --- a/StarNetServer/Makefile +++ b/StarNetServer/Makefile @@ -3,7 +3,7 @@ OBJECTS = StarNetServerAppD.o StarNetServerConfig.o StarNetServerThread.o StarNe .PHONY: all all: starnetserverd -starnetserverd: $(OBJECTS) +starnetserverd: $(OBJECTS) ../Common/Common.a ../ircDDB/IRCDDB.a $(CXX) $(OBJECTS) ../Common/Common.a ../ircDDB/IRCDDB.a $(LDFLAGS) $(LIBS) -o starnetserverd -include $(OBJECTS:.o=.d) @@ -20,3 +20,5 @@ install: clean: $(RM) starnetserverd *.o *.d *.bak *~ +../Common/Common.a: +../ircDDB/IRCDDB.a: diff --git a/StarNetServer/MakefileGUI b/StarNetServer/MakefileGUI index 3f45261..61fe271 100644 --- a/StarNetServer/MakefileGUI +++ b/StarNetServer/MakefileGUI @@ -5,7 +5,7 @@ OBJECTS = StarNetServerApp.o StarNetServerCallsignSet.o StarNetServerConfig.o St .PHONY: all all: starnetserver -starnetserver: $(OBJECTS) +starnetserver: $(OBJECTS) ../GUICommon/GUICommon.a ../Common/Common.a $(CXX) $(OBJECTS) ../GUICommon/GUICommon.a ../Common/Common.a ../ircDDB/IRCDDB.a $(LDFLAGS) $(GUILIBS) -o starnetserver -include $(OBJECTS:.o=.d) @@ -22,3 +22,5 @@ install: clean: $(RM) starnetserver *.o *.d *.bak *~ +../GUICommon/GUICommon.a: +../Common/Common.a: diff --git a/TextTransmit/Makefile b/TextTransmit/Makefile index 14ddb89..a059e2e 100644 --- a/TextTransmit/Makefile +++ b/TextTransmit/Makefile @@ -3,7 +3,7 @@ OBJECTS = TextTransmit.o .PHONY: all all: texttransmitd -texttransmitd: $(OBJECTS) +texttransmitd: $(OBJECTS) ../Common/Common.a $(CXX) $(OBJECTS) ../Common/Common.a $(LDFLAGS) $(LIBS) -o texttransmitd -include $(OBJECTS:.o=.d) @@ -20,3 +20,4 @@ install: clean: $(RM) texttransmitd *.o *.d *.bak *~ +../Common/Common.a: diff --git a/TimeServer/Makefile b/TimeServer/Makefile index 88119ee..eca5c6a 100644 --- a/TimeServer/Makefile +++ b/TimeServer/Makefile @@ -3,7 +3,7 @@ OBJECTS = TimeServerD.o TimeServerConfig.o TimeServerThread.o TimeServerThreadHe .PHONY: all all: timeserverd -timeserverd: $(OBJECTS) +timeserverd: $(OBJECTS) ../Common/Common.a $(CXX) $(OBJECTS) ../Common/Common.a $(LDFLAGS) $(LIBS) -o timeserverd -include $(OBJECTS:.o=.d) @@ -20,3 +20,4 @@ install: clean: $(RM) timeserverd *.o *.d *.bak *~ +../Common/Common.a: diff --git a/TimeServer/MakefileGUI b/TimeServer/MakefileGUI index 3f902cf..9982b46 100644 --- a/TimeServer/MakefileGUI +++ b/TimeServer/MakefileGUI @@ -4,7 +4,7 @@ OBJECTS = TimeServerApp.o TimeServerAnnouncementsSet.o TimeServerConfig.o TimeSe .PHONY: all all: timeserver -timeserver: $(OBJECTS) +timeserver: $(OBJECTS) ../GUICommon/GUICommon.a ../Common/Common.a $(CXX) $(OBJECTS) ../GUICommon/GUICommon.a ../Common/Common.a $(LDFLAGS) $(GUILIBS) -o timeserver -include $(OBJECTS:.o=.d) @@ -21,3 +21,5 @@ install: clean: $(RM) timeserver *.o *.d *.bak *~ +../GUICommon/GUICommon.a: +../Common/Common.a: diff --git a/TimerControl/Makefile b/TimerControl/Makefile index eebb6a6..823e32c 100644 --- a/TimerControl/Makefile +++ b/TimerControl/Makefile @@ -4,7 +4,7 @@ OBJECTS = TimerControlAppD.o TimerControlConfig.o TimerControlItemFile.o TimerCo .PHONY: all all: timercontrold -timercontrold: $(OBJECTS) +timercontrold: $(OBJECTS) ../Common/Common.a $(CXX) $(OBJECTS) ../Common/Common.a $(LDFLAGS) $(LIBS) -o timercontrold -include $(OBJECTS:.o=.d) @@ -21,3 +21,5 @@ install: clean: $(RM) timercontrold *.o *.d *.bak *~ +../Common/Common.a: + diff --git a/TimerControl/MakefileGUI b/TimerControl/MakefileGUI index 58646ea..fdcccc0 100644 --- a/TimerControl/MakefileGUI +++ b/TimerControl/MakefileGUI @@ -5,7 +5,7 @@ OBJECTS = TimerControlApp.o TimerControlConfig.o TimerControlFrame.o TimerContro .PHONY: all all: timercontrol -timercontrol: $(OBJECTS) +timercontrol: $(OBJECTS) ../GUICommon/GUICommon.a ../Common/Common.a $(CXX) $(OBJECTS) ../GUICommon/GUICommon.a ../Common/Common.a $(LDFLAGS) $(GUILIBS) -o timercontrol -include $(OBJECTS:.o=.d) @@ -22,3 +22,5 @@ install: clean: $(RM) timercontrol *.o *.d *.bak *~ +../GUICommon/GUICommon.a: +../Common/Common.a: diff --git a/VoiceTransmit/Makefile b/VoiceTransmit/Makefile index ee651bf..a81f4be 100644 --- a/VoiceTransmit/Makefile +++ b/VoiceTransmit/Makefile @@ -3,7 +3,7 @@ OBJECTS = VoiceStore.o VoiceTransmit.o .PHONY: all all: voicetransmitd -voicetransmitd: $(OBJECTS) +voicetransmitd: $(OBJECTS) ../Common/Common.a $(CXX) $(OBJECTS) ../Common/Common.a $(LDFLAGS) $(LIBS) -o voicetransmitd -include $(OBJECTS:.o=.d) @@ -20,3 +20,4 @@ install: clean: $(RM) voicetransmitd *.o *.d *.bak *~ +../Common/Common.a: diff --git a/ircDDBGateway/Makefile b/ircDDBGateway/Makefile index 9a43de0..f36c9a3 100644 --- a/ircDDBGateway/Makefile +++ b/ircDDBGateway/Makefile @@ -3,7 +3,7 @@ OBJECTS = IRCDDBGatewayAppD.o IRCDDBGatewayStatusData.o IRCDDBGatewayThread.o IR .PHONY: all all: ircddbgatewayd -ircddbgatewayd: $(OBJECTS) +ircddbgatewayd: $(OBJECTS) ../ircDDB/IRCDDB.a ../Common/Common.a $(CXX) $(OBJECTS) ../Common/Common.a ../ircDDB/IRCDDB.a $(LDFLAGS) $(LIBS) -o ircddbgatewayd -include $(OBJECTS:.o=.d) @@ -20,3 +20,6 @@ install: clean: $(RM) ircddbgatewayd *.o *.d *.bak *~ +../Common/Common.a: +../ircDDB/IRCDDB.a: + diff --git a/ircDDBGateway/MakefileGUI b/ircDDBGateway/MakefileGUI index e6c2a86..fa27871 100644 --- a/ircDDBGateway/MakefileGUI +++ b/ircDDBGateway/MakefileGUI @@ -4,7 +4,7 @@ OBJECTS = IRCDDBGatewayApp.o IRCDDBGatewayFrame.o IRCDDBGatewayLogRedirect.o IRC .PHONY: all all: ircddbgateway -ircddbgateway: $(OBJECTS) +ircddbgateway: $(OBJECTS) ../GUICommon/GUICommon.a ../Common/Common.a $(CXX) $(OBJECTS) ../GUICommon/GUICommon.a ../Common/Common.a ../ircDDB/IRCDDB.a $(LDFLAGS) $(GUILIBS) -o ircddbgateway -include $(OBJECTS:.o=.d) @@ -21,3 +21,6 @@ install: clean: $(RM) ircddbgateway *.o *.d *.bak *~ +../GUICommon/GUICommon.a: +../Common/Common.a:s + diff --git a/ircDDBGatewayConfig/Makefile b/ircDDBGatewayConfig/Makefile index 9099d00..7aff717 100644 --- a/ircDDBGatewayConfig/Makefile +++ b/ircDDBGatewayConfig/Makefile @@ -4,7 +4,7 @@ OBJECTS = IRCDDBGatewayConfigApp.o IRCDDBGatewayConfigFrame.o IRCDDBGatewayConfi .PHONY: all all: ircddbgatewayconfig -ircddbgatewayconfig: $(OBJECTS) +ircddbgatewayconfig: $(OBJECTS) ../GUICommon/GUICommon.a ../Common/Common.a $(CXX) $(OBJECTS) ../GUICommon/GUICommon.a ../Common/Common.a $(LDFLAGS) $(GUILIBS) -o ircddbgatewayconfig -include $(OBJECTS:.o=.d) @@ -21,3 +21,5 @@ install: clean: $(RM) ircddbgatewayconfig *.o *.d *.bak *~ +../Common/Common.a: +../GUICommon/GUICommon.a: From e57faf24188d7e23c8494ed4a20e8a9e522ee8b1 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Sun, 11 Nov 2018 22:40:37 +0000 Subject: [PATCH 064/166] Add Mobile GPS to ircDDB Gateway Config GUI. --- GUICommon/GUICommon.vcxproj | 2 + GUICommon/GUICommon.vcxproj.filters | 6 + GUICommon/Makefile | 2 +- GUICommon/MobileGPSSet.cpp | 118 ++++++++++++++++++ GUICommon/MobileGPSSet.h | 46 +++++++ .../IRCDDBGatewayConfigFrame.cpp | 26 +++- .../IRCDDBGatewayConfigFrame.h | 6 +- 7 files changed, 197 insertions(+), 9 deletions(-) create mode 100644 GUICommon/MobileGPSSet.cpp create mode 100644 GUICommon/MobileGPSSet.h diff --git a/GUICommon/GUICommon.vcxproj b/GUICommon/GUICommon.vcxproj index b04a02c..57d17b0 100644 --- a/GUICommon/GUICommon.vcxproj +++ b/GUICommon/GUICommon.vcxproj @@ -139,6 +139,7 @@ + @@ -155,6 +156,7 @@ + diff --git a/GUICommon/GUICommon.vcxproj.filters b/GUICommon/GUICommon.vcxproj.filters index 479d80d..1e65ef7 100644 --- a/GUICommon/GUICommon.vcxproj.filters +++ b/GUICommon/GUICommon.vcxproj.filters @@ -53,6 +53,9 @@ Source Files + + Source Files + @@ -97,5 +100,8 @@ Header Files + + Header Files + \ No newline at end of file diff --git a/GUICommon/Makefile b/GUICommon/Makefile index 4a837a3..85660dc 100644 --- a/GUICommon/Makefile +++ b/GUICommon/Makefile @@ -1,4 +1,4 @@ -OBJECTS = AddressTextCtrl.o CallsignTextCtrl.o DCSSet.o DescriptionTextCtrl.o DExtraSet.o DPlusSet.o DPRSSet.o PortTextCtrl.o RemoteSet.o \ +OBJECTS = AddressTextCtrl.o CallsignTextCtrl.o DCSSet.o DescriptionTextCtrl.o DExtraSet.o DPlusSet.o DPRSSet.o MobileGPSSet.o PortTextCtrl.o RemoteSet.o \ RepeaterDataSet.o RepeaterInfoSet.o RestrictedTextCtrl.o StarNetSet.o XLXSet.o all: GUICommon.a diff --git a/GUICommon/MobileGPSSet.cpp b/GUICommon/MobileGPSSet.cpp new file mode 100644 index 0000000..cc1a5d9 --- /dev/null +++ b/GUICommon/MobileGPSSet.cpp @@ -0,0 +1,118 @@ +/* + * Copyright (C) 2018 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 + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include "MobileGPSSet.h" + +const unsigned int CONTROL_WIDTH1 = 130U; +const unsigned int CONTROL_WIDTH2 = 80U; + +const unsigned int ADDRESS_LENGTH = 15U; +const unsigned int PORT_LENGTH = 5U; + +const unsigned int BORDER_SIZE = 5U; + +CMobileGPSSet::CMobileGPSSet(wxWindow* parent, int id, const wxString& title, bool enabled, const wxString& address, unsigned int port) : +wxPanel(parent, id), +m_title(title), +m_enabled(NULL), +m_address(NULL), +m_port(NULL) +{ + wxFlexGridSizer* sizer = new wxFlexGridSizer(2); + + wxStaticText* enabledLabel = new wxStaticText(this, -1, _("Mobile GPS")); + sizer->Add(enabledLabel, 0, wxALL | wxALIGN_RIGHT, BORDER_SIZE); + + m_enabled = new wxChoice(this, -1, wxDefaultPosition, wxSize(CONTROL_WIDTH1, -1)); + m_enabled->Append(_("Disabled")); + m_enabled->Append(_("Enabled")); + sizer->Add(m_enabled, 0, wxALL | wxALIGN_LEFT, BORDER_SIZE); + m_enabled->SetSelection(enabled ? 1 : 0); + + wxStaticText* addressLabel = new wxStaticText(this, -1, _("Address")); + sizer->Add(addressLabel, 0, wxALL | wxALIGN_RIGHT, BORDER_SIZE); + + m_address = new CAddressTextCtrl(this, -1, address, wxDefaultPosition, wxSize(CONTROL_WIDTH1, -1)); + m_address->SetMaxLength(ADDRESS_LENGTH); + sizer->Add(m_address, 0, wxALL | wxALIGN_LEFT, BORDER_SIZE); + + wxStaticText* portLabel = new wxStaticText(this, -1, _("Port")); + sizer->Add(portLabel, 0, wxALL | wxALIGN_RIGHT, BORDER_SIZE); + + wxString buffer; + buffer.Printf(wxT("%u"), port); + + m_port = new CPortTextCtrl(this, -1, buffer, wxDefaultPosition, wxSize(CONTROL_WIDTH2, -1)); + m_port->SetMaxLength(PORT_LENGTH); + sizer->Add(m_port, 0, wxALL | wxALIGN_LEFT, BORDER_SIZE); + + SetAutoLayout(true); + + SetSizer(sizer); +} + + +CMobileGPSSet::~CMobileGPSSet() +{ +} + +bool CMobileGPSSet::Validate() +{ + if (m_enabled->GetCurrentSelection() == wxNOT_FOUND) + return false; + + wxString address = getAddress(); + + if (address.IsEmpty()) { + wxMessageDialog dialog(this, _("The Repeater Address is not valid"), m_title + _(" Error"), wxICON_ERROR); + dialog.ShowModal(); + return false; + } + + unsigned int port = getPort(); + + if (port == 0U || port > 65535U) { + wxMessageDialog dialog(this, _("The Repeater Port is not valid"), m_title + _(" Error"), wxICON_ERROR); + dialog.ShowModal(); + return false; + } + + return true; +} + +bool CMobileGPSSet::getEnabled() const +{ + int c = m_enabled->GetCurrentSelection(); + if (c == wxNOT_FOUND) + return false; + + return c == 1; +} + +wxString CMobileGPSSet::getAddress() const +{ + return m_address->GetValue(); +} + +unsigned int CMobileGPSSet::getPort() const +{ + unsigned long n; + m_port->GetValue().ToULong(&n); + + return n; +} diff --git a/GUICommon/MobileGPSSet.h b/GUICommon/MobileGPSSet.h new file mode 100644 index 0000000..b9813e1 --- /dev/null +++ b/GUICommon/MobileGPSSet.h @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2018 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 + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef MobileGPSSet_H +#define MobileGPSSet_H + +#include "AddressTextCtrl.h" +#include "PortTextCtrl.h" +#include "Defs.h" + +#include + +class CMobileGPSSet: public wxPanel { +public: + CMobileGPSSet(wxWindow* parent, int id, const wxString& title, bool enabled, const wxString& address, unsigned int port); + virtual ~CMobileGPSSet(); + + virtual bool Validate(); + + virtual bool getEnabled() const; + virtual wxString getAddress() const; + virtual unsigned int getPort() const; + +private: + wxString m_title; + wxChoice* m_enabled; + CAddressTextCtrl* m_address; + CPortTextCtrl* m_port; +}; + +#endif diff --git a/ircDDBGatewayConfig/IRCDDBGatewayConfigFrame.cpp b/ircDDBGatewayConfig/IRCDDBGatewayConfigFrame.cpp index a019ebf..1f2765e 100644 --- a/ircDDBGatewayConfig/IRCDDBGatewayConfigFrame.cpp +++ b/ircDDBGatewayConfig/IRCDDBGatewayConfigFrame.cpp @@ -65,6 +65,7 @@ m_starNet3(NULL), m_starNet4(NULL), m_starNet5(NULL), m_remote(NULL), +m_mobileGPS(NULL), m_miscellaneous(NULL) { SetMenuBar(createMenuBar()); @@ -314,6 +315,14 @@ m_miscellaneous(NULL) m_remote = new CRemoteSet(noteBook, -1, APPLICATION_NAME, remoteEnabled, remotePassword, remotePort); noteBook->AddPage(m_remote, wxT("Remote"), false); + bool mobileGPSEnabled; + wxString mobileGPSAddress; + unsigned int mobileGPSPort; + m_config->getMobileGPS(mobileGPSEnabled, mobileGPSAddress, mobileGPSPort); + + m_mobileGPS = new CMobileGPSSet(noteBook, -1, APPLICATION_NAME, mobileGPSEnabled, mobileGPSAddress, mobileGPSPort); + noteBook->AddPage(m_mobileGPS, wxT("Mobile GPS"), false); + TEXT_LANG language; bool infoEnabled, echoEnabled, logEnabled, dratsEnabled, dtmfEnabled; m_config->getMiscellaneous(language, infoEnabled, echoEnabled, logEnabled, dratsEnabled, dtmfEnabled); @@ -321,15 +330,15 @@ m_miscellaneous(NULL) m_miscellaneous = new CIRCDDBGatewayConfigMiscellaneousSet(noteBook, -1, APPLICATION_NAME, language, infoEnabled, echoEnabled, logEnabled, dratsEnabled, dtmfEnabled); noteBook->AddPage(m_miscellaneous, wxT("Misc"), false); - sizer->Add(noteBook, 0, wxEXPAND | wxALL, BORDER_SIZE); + sizer->Add(noteBook, 0, wxEXPAND | wxALL, BORDER_SIZE); - panel->SetSizer(sizer); + panel->SetSizer(sizer); - mainSizer->Add(panel, 0, wxEXPAND | wxALL, BORDER_SIZE); + mainSizer->Add(panel, 0, wxEXPAND | wxALL, BORDER_SIZE); - mainSizer->SetSizeHints(this); + mainSizer->SetSizeHints(this); - SetSizer(mainSizer); + SetSizer(mainSizer); } CIRCDDBGatewayConfigFrame::~CIRCDDBGatewayConfigFrame() @@ -371,7 +380,7 @@ void CIRCDDBGatewayConfigFrame::onSave(wxCommandEvent&) !m_repeaterInfo4->Validate() || !m_ircDDB->Validate() || !m_ircDDB2->Validate() || !m_ircDDB3->Validate() || !m_ircDDB4->Validate() || !m_dprs->Validate() || !m_dplus->Validate() || !m_dcs->Validate() || !m_xlx->Validate() || !m_starNet1->Validate() || !m_starNet2->Validate() || !m_starNet3->Validate() || !m_starNet4->Validate() || - !m_starNet5->Validate() || !m_remote->Validate() || !m_miscellaneous->Validate()) + !m_starNet5->Validate() || !m_remote->Validate() || !m_mobileGPS->Validate() || !m_miscellaneous->Validate()) return; GATEWAY_TYPE gatewayType = m_gateway->getType(); @@ -606,6 +615,11 @@ void CIRCDDBGatewayConfigFrame::onSave(wxCommandEvent&) unsigned int remotePort = m_remote->getPort(); m_config->setRemote(remoteEnabled, remotePassword, remotePort); + bool mobileGPSEnabled = m_mobileGPS->getEnabled(); + wxString mobileGPSAddress = m_mobileGPS->getAddress(); + unsigned int mobileGPSPort = m_mobileGPS->getPort(); + m_config->setMobileGPS(mobileGPSEnabled, mobileGPSAddress, mobileGPSPort); + TEXT_LANG language = m_miscellaneous->getLanguage(); bool infoEnabled = m_miscellaneous->getInfoEnabled(); bool echoEnabled = m_miscellaneous->getEchoEnabled(); diff --git a/ircDDBGatewayConfig/IRCDDBGatewayConfigFrame.h b/ircDDBGatewayConfig/IRCDDBGatewayConfigFrame.h index 15032c0..2970aad 100644 --- a/ircDDBGatewayConfig/IRCDDBGatewayConfigFrame.h +++ b/ircDDBGatewayConfig/IRCDDBGatewayConfigFrame.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2014 by Jonathan Naylor G4KLX + * Copyright (C) 2010-2014,2018 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 @@ -25,6 +25,7 @@ #include "IRCDDBGatewayConfig.h" #include "RepeaterInfoSet.h" #include "RepeaterDataSet.h" +#include "MobileGPSSet.h" #include "StarNetSet.h" #include "RemoteSet.h" #include "DExtraSet.h" @@ -65,13 +66,14 @@ private: CDExtraSet* m_dextra; CDPlusSet* m_dplus; CDCSSet* m_dcs; - CXLXSet* m_xlx; + CXLXSet* m_xlx; CStarNetSet* m_starNet1; CStarNetSet* m_starNet2; CStarNetSet* m_starNet3; CStarNetSet* m_starNet4; CStarNetSet* m_starNet5; CRemoteSet* m_remote; + CMobileGPSSet* m_mobileGPS; CIRCDDBGatewayConfigMiscellaneousSet* m_miscellaneous; DECLARE_EVENT_TABLE() From 3f179985d1024aa36df5abc8fbe381a1df3aa06d Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Wed, 14 Nov 2018 10:50:08 +0000 Subject: [PATCH 065/166] Add AMBE data bypass processing for Fast Data. --- CHANGES.txt | 1 + Common/DStarDefines.h | 9 ++++-- Common/RepeaterHandler.cpp | 65 ++++++++++++++++++++++++-------------- Common/RepeaterHandler.h | 3 +- 4 files changed, 50 insertions(+), 28 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index d5b4c0e..edb04a7 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1486,4 +1486,5 @@ Support the GPS data from the Kenwood TH-D74. -------- Add support for external GPS input for mobile systems. +Add audio bypass processing for fast data mode. diff --git a/Common/DStarDefines.h b/Common/DStarDefines.h index 8ea9ae6..6fbae59 100644 --- a/Common/DStarDefines.h +++ b/Common/DStarDefines.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009-2015 by Jonathan Naylor, G4KLX + * Copyright (C) 2009-2015,2018 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 @@ -31,8 +31,7 @@ const bool DATA_SYNC_BITS[] = {true, false, true, false, true, false, true, true, false, true, true, false, true, false, false, false, true, true, false, true, false, false, false}; -const unsigned char END_PATTERN_BYTES[] = {0x55, 0x55, 0x55, 0x55, 0xC8, 0x7A, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; +const unsigned char END_PATTERN_BYTES[] = {0x55, 0x55, 0x55, 0x55, 0xC8, 0x7A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; const bool END_PATTERN_BITS[] = {true, false, true, false, true, false, true, false, true, false, true, false, true, false, true, false, true, false, true, false, true, false, true, false, @@ -59,6 +58,10 @@ const bool NULL_SLOW_DATA_BITS[] = {false, true, true, false, true, false, fa true, false, false, true, false, true, false, false, true, false, true, false, true, true, true, true}; +const unsigned char KENWOOD_DATA_MODE_BYTES[] = {0xEEU, 0xC2U, 0xA1U, 0xC8U, 0x42U, 0x6EU, 0x52U, 0x51U, 0xC3U}; +const unsigned char ICOM_DATA_MODE_BYTES1[] = {0xB2U, 0x4DU, 0x22U, 0x48U, 0xC0U, 0x16U, 0x28U, 0x26U, 0xC8U}; +const unsigned char ICOM_DATA_MODE_BYTES2[] = {0x70U, 0x4FU, 0x93U, 0x40U, 0x64U, 0x74U, 0x6DU, 0x30U, 0x2BU}; + const unsigned int VOICE_FRAME_LENGTH_BITS = 72U; const unsigned int VOICE_FRAME_LENGTH_BYTES = VOICE_FRAME_LENGTH_BITS / 8U; diff --git a/Common/RepeaterHandler.cpp b/Common/RepeaterHandler.cpp index 215e0dd..ddfc764 100644 --- a/Common/RepeaterHandler.cpp +++ b/Common/RepeaterHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2015 by Jonathan Naylor G4KLX + * Copyright (C) 2010-2015,2018 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 @@ -95,6 +95,7 @@ m_flag1(0x00U), m_flag2(0x00U), m_flag3(0x00U), m_restricted(false), +m_fastData(false), m_frames(0U), m_silence(0U), m_errors(0U), @@ -582,6 +583,9 @@ void CRepeaterHandler::processRepeater(CHeaderData& header) m_silence = 0U; m_errors = 0U; + // Assume voice mode + m_fastData = false; + // An RF header resets the reconnect timer m_linkReconnectTimer.start(); @@ -736,32 +740,45 @@ void CRepeaterHandler::processRepeater(CAMBEData& data) unsigned char buffer[DV_FRAME_MAX_LENGTH_BYTES]; data.getData(buffer, DV_FRAME_MAX_LENGTH_BYTES); - if (::memcmp(buffer, NULL_AMBE_DATA_BYTES, VOICE_FRAME_LENGTH_BYTES) == 0) - m_silence++; + // Data signatures only appear at the beginning of the frame + if (!m_fastData && m_frames < 21U) { + if (::memcmp(buffer, KENWOOD_DATA_MODE_BYTES, VOICE_FRAME_LENGTH_BYTES) == 0) + m_fastData = true; + else if (::memcmp(buffer, ICOM_DATA_MODE_BYTES1, VOICE_FRAME_LENGTH_BYTES) == 0) + m_fastData = true; + else if (::memcmp(buffer, ICOM_DATA_MODE_BYTES2, VOICE_FRAME_LENGTH_BYTES) == 0) { + m_fastData = true; + } - // Don't do DTMF decoding or blanking if off and not on crossband either - if (m_dtmfEnabled && m_g2Status != G2_XBAND) { - bool pressed = m_dtmf.decode(buffer, data.isEnd()); - if (pressed) { - // Replace the DTMF with silence - ::memcpy(buffer, NULL_AMBE_DATA_BYTES, VOICE_FRAME_LENGTH_BYTES); - data.setData(buffer, DV_FRAME_LENGTH_BYTES); - } + // Don't do AMBE processing when in Fast Data mode + if (!m_fastData) { + if (::memcmp(buffer, NULL_AMBE_DATA_BYTES, VOICE_FRAME_LENGTH_BYTES) == 0) + m_silence++; - bool dtmfDone = m_dtmf.hasCommand(); - if (dtmfDone) { - wxString command = m_dtmf.translate(); + // Don't do DTMF decoding or blanking if off and not on crossband either + if (m_dtmfEnabled && m_g2Status != G2_XBAND) { + bool pressed = m_dtmf.decode(buffer, data.isEnd()); + if (pressed) { + // Replace the DTMF with silence + ::memcpy(buffer, NULL_AMBE_DATA_BYTES, VOICE_FRAME_LENGTH_BYTES); + data.setData(buffer, DV_FRAME_LENGTH_BYTES); + } - // Only process the DTMF command if the your call is CQCQCQ and not a restricted user - if (!m_restricted && m_yourCall.Left(4U).IsSameAs(wxT("CQCQ"))) { - if (command.IsEmpty()) { - // Do nothing - } else if (isCCSCommand(command)) { - ccsCommandHandler(command, m_myCall1, wxT("DTMF")); - } else if (command.IsSameAs(wxT(" I"))) { - m_infoNeeded = true; - } else { - reflectorCommandHandler(command, m_myCall1, wxT("DTMF")); + bool dtmfDone = m_dtmf.hasCommand(); + if (dtmfDone) { + wxString command = m_dtmf.translate(); + + // Only process the DTMF command if the your call is CQCQCQ and not a restricted user + if (!m_restricted && m_yourCall.Left(4U).IsSameAs(wxT("CQCQ"))) { + if (command.IsEmpty()) { + // Do nothing + } else if (isCCSCommand(command)) { + ccsCommandHandler(command, m_myCall1, wxT("DTMF")); + } else if (command.IsSameAs(wxT(" I"))) { + m_infoNeeded = true; + } else { + reflectorCommandHandler(command, m_myCall1, wxT("DTMF")); + } } } } diff --git a/Common/RepeaterHandler.h b/Common/RepeaterHandler.h index 5871775..05baca2 100644 --- a/Common/RepeaterHandler.h +++ b/Common/RepeaterHandler.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2015 by Jonathan Naylor G4KLX + * Copyright (C) 2010-2015,2018 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 @@ -208,6 +208,7 @@ private: unsigned char m_flag2; unsigned char m_flag3; bool m_restricted; + bool m_fastData; // Statistics unsigned int m_frames; From 1e4a11f0a6ca2046f2b9274f1313d74a75bad3b3 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Thu, 15 Nov 2018 19:29:14 +0000 Subject: [PATCH 066/166] Fix typo. --- ircDDBGateway/MakefileGUI | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ircDDBGateway/MakefileGUI b/ircDDBGateway/MakefileGUI index fa27871..f9e2bb5 100644 --- a/ircDDBGateway/MakefileGUI +++ b/ircDDBGateway/MakefileGUI @@ -22,5 +22,5 @@ clean: $(RM) ircddbgateway *.o *.d *.bak *~ ../GUICommon/GUICommon.a: -../Common/Common.a:s +../Common/Common.a: From 05e66c15d190e547294b127bde31af6e9a915bd1 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Thu, 15 Nov 2018 19:30:27 +0000 Subject: [PATCH 067/166] Fix typo. --- .gitignore | 2 +- Common/RepeaterHandler.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index e3bcc9a..5b78d6c 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,4 @@ Release *.bak .vs *.a - +*.d diff --git a/Common/RepeaterHandler.cpp b/Common/RepeaterHandler.cpp index ddfc764..1a25db0 100644 --- a/Common/RepeaterHandler.cpp +++ b/Common/RepeaterHandler.cpp @@ -746,7 +746,7 @@ void CRepeaterHandler::processRepeater(CAMBEData& data) m_fastData = true; else if (::memcmp(buffer, ICOM_DATA_MODE_BYTES1, VOICE_FRAME_LENGTH_BYTES) == 0) m_fastData = true; - else if (::memcmp(buffer, ICOM_DATA_MODE_BYTES2, VOICE_FRAME_LENGTH_BYTES) == 0) { + else if (::memcmp(buffer, ICOM_DATA_MODE_BYTES2, VOICE_FRAME_LENGTH_BYTES) == 0) m_fastData = true; } From 21b1b967be0ac453ecdbd7541d7bdaf0a3dac1f5 Mon Sep 17 00:00:00 2001 From: Geoffrey Merck F4FXL - KC3FRA Date: Sat, 17 Nov 2018 18:18:28 +0100 Subject: [PATCH 068/166] Unfix address and port --- Common/G2ProtocolHandler.cpp | 20 +++++++++----------- Common/G2ProtocolHandler.h | 10 ++++------ Common/GatewayCache.h | 3 +++ StarNetServer/StarNetServerThread.cpp | 16 ++++++++++------ ircDDBGateway/IRCDDBGatewayThread.cpp | 10 +++++++--- 5 files changed, 33 insertions(+), 26 deletions(-) diff --git a/Common/G2ProtocolHandler.cpp b/Common/G2ProtocolHandler.cpp index 7d1fc7e..325710d 100644 --- a/Common/G2ProtocolHandler.cpp +++ b/Common/G2ProtocolHandler.cpp @@ -29,9 +29,7 @@ CG2ProtocolHandler::CG2ProtocolHandler(unsigned int port, const wxString& addr) m_socket(addr, port), m_type(GT_NONE), m_buffer(NULL), -m_length(0U), -m_address(), -m_port(0U) +m_length(0U) { m_buffer = new unsigned char[BUFFER_LENGTH]; } @@ -76,23 +74,23 @@ bool CG2ProtocolHandler::writeAMBE(const CAMBEData& data) return m_socket.write(buffer, length, data.getYourAddress(), data.getYourPort()); } -G2_TYPE CG2ProtocolHandler::read() +G2_TYPE CG2ProtocolHandler::read(in_addr& incomingAddress, unsigned int& incomingPort) { bool res = true; // Loop until we have no more data from the socket or we have data for the higher layers while (res) - res = readPackets(); + res = readPackets(incomingAddress, incomingPort); return m_type; } -bool CG2ProtocolHandler::readPackets() +bool CG2ProtocolHandler::readPackets(in_addr& incomingAddress, unsigned int& incomingPort) { m_type = GT_NONE; // No more data? - int length = m_socket.read(m_buffer, BUFFER_LENGTH, m_address, m_port); + int length = m_socket.read(m_buffer, BUFFER_LENGTH, incomingAddress, incomingPort); if (length <= 0) return false; @@ -111,7 +109,7 @@ bool CG2ProtocolHandler::readPackets() } } -CHeaderData* CG2ProtocolHandler::readHeader() +CHeaderData* CG2ProtocolHandler::readHeader(in_addr incomingAddress, unsigned int incomingPort) { if (m_type != GT_HEADER) return NULL; @@ -119,7 +117,7 @@ CHeaderData* CG2ProtocolHandler::readHeader() CHeaderData* header = new CHeaderData; // G2 checksums are unreliable - bool res = header->setG2Data(m_buffer, m_length, false, m_address, m_port); + bool res = header->setG2Data(m_buffer, m_length, false, incomingAddress, incomingPort); if (!res) { delete header; return NULL; @@ -128,14 +126,14 @@ CHeaderData* CG2ProtocolHandler::readHeader() return header; } -CAMBEData* CG2ProtocolHandler::readAMBE() +CAMBEData* CG2ProtocolHandler::readAMBE(in_addr incomingAddress, unsigned int incomingPort) { if (m_type != GT_AMBE) return NULL; CAMBEData* data = new CAMBEData; - bool res = data->setG2Data(m_buffer, m_length, m_address, m_port); + bool res = data->setG2Data(m_buffer, m_length, incomingAddress, incomingPort); if (!res) { delete data; return NULL; diff --git a/Common/G2ProtocolHandler.h b/Common/G2ProtocolHandler.h index 8b74bd5..b9ff1fa 100644 --- a/Common/G2ProtocolHandler.h +++ b/Common/G2ProtocolHandler.h @@ -48,9 +48,9 @@ public: bool writeHeader(const CHeaderData& header); bool writeAMBE(const CAMBEData& data); - G2_TYPE read(); - CHeaderData* readHeader(); - CAMBEData* readAMBE(); + G2_TYPE read(in_addr& incomingAddress, unsigned int& incomingPort); + CHeaderData* readHeader(in_addr incomingAddress, unsigned int incomingPort); + CAMBEData* readAMBE(in_addr incomingAddress, unsigned int incomingPort); void punchUDPHole(const wxString& addr); @@ -61,10 +61,8 @@ private: G2_TYPE m_type; unsigned char* m_buffer; unsigned int m_length; - in_addr m_address; - unsigned int m_port; - bool readPackets(); + bool readPackets(in_addr& incomingAddress, unsigned int& incomingPort); }; #endif diff --git a/Common/GatewayCache.h b/Common/GatewayCache.h index 561743c..fe79cd6 100644 --- a/Common/GatewayCache.h +++ b/Common/GatewayCache.h @@ -81,6 +81,9 @@ public: private: wxString m_gateway; in_addr m_address; + + //the incoming G2 port, usually the default one unless the calling hotspot is behind a NAT, therefore keep track of it and use it to answer back instead of the default one + unsigned int m_G2Port; DSTAR_PROTOCOL m_protocol; bool m_addrLock; bool m_protoLock; diff --git a/StarNetServer/StarNetServerThread.cpp b/StarNetServer/StarNetServerThread.cpp index 2b86002..7b31214 100644 --- a/StarNetServer/StarNetServerThread.cpp +++ b/StarNetServer/StarNetServerThread.cpp @@ -505,15 +505,15 @@ void CStarNetServerThread::processDCS() void CStarNetServerThread::processG2() { + in_addr incomingAddress; + unsigned int incomingPort; + for (;;) { - G2_TYPE type = m_g2Handler->read(); + G2_TYPE type = m_g2Handler->read(incomingAddress, incomingPort); switch (type) { - case GT_NONE: - return; - case GT_HEADER: { - CHeaderData* header = m_g2Handler->readHeader(); + CHeaderData* header = m_g2Handler->readHeader(incomingAddress, incomingPort); if (header != NULL) { // wxLogMessage(wxT("G2 header - My: %s/%s Your: %s Rpt1: %s Rpt2: %s Flags: %02X %02X %02X"), header->getMyCall1().c_str(), header->getMyCall2().c_str(), header->getYourCall().c_str(), header->getRptCall1().c_str(), header->getRptCall2().c_str(), header->getFlag1(), header->getFlag2(), header->getFlag3()); CG2Handler::process(*header); @@ -523,13 +523,17 @@ void CStarNetServerThread::processG2() break; case GT_AMBE: { - CAMBEData* data = m_g2Handler->readAMBE(); + CAMBEData* data = m_g2Handler->readAMBE(incomingAddress, incomingPort); if (data != NULL) { CG2Handler::process(*data); delete data; } } break; + + default: + //Probably someone punching a UDP hole to us + return; } } } diff --git a/ircDDBGateway/IRCDDBGatewayThread.cpp b/ircDDBGateway/IRCDDBGatewayThread.cpp index 9da5110..595b278 100644 --- a/ircDDBGateway/IRCDDBGatewayThread.cpp +++ b/ircDDBGateway/IRCDDBGatewayThread.cpp @@ -1025,12 +1025,15 @@ void CIRCDDBGatewayThread::processDCS() void CIRCDDBGatewayThread::processG2() { + in_addr incomingAddress; + unsigned int incomingPort; + for (;;) { - G2_TYPE type = m_g2Handler->read(); + G2_TYPE type = m_g2Handler->read(incomingAddress, incomingPort); switch (type) { case GT_HEADER: { - CHeaderData* header = m_g2Handler->readHeader(); + CHeaderData* header = m_g2Handler->readHeader(incomingAddress, incomingPort); if (header != NULL) { // wxLogMessage(wxT("G2 header - My: %s/%s Your: %s Rpt1: %s Rpt2: %s Flags: %02X %02X %02X"), header->getMyCall1().c_str(), header->getMyCall2().c_str(), header->getYourCall().c_str(), header->getRptCall1().c_str(), header->getRptCall2().c_str(), header->getFlag1(), header->getFlag2(), header->getFlag3()); CG2Handler::process(*header); @@ -1040,7 +1043,7 @@ void CIRCDDBGatewayThread::processG2() break; case GT_AMBE: { - CAMBEData* data = m_g2Handler->readAMBE(); + CAMBEData* data = m_g2Handler->readAMBE(incomingAddress, incomingPort); if (data != NULL) { CG2Handler::process(*data); delete data; @@ -1049,6 +1052,7 @@ void CIRCDDBGatewayThread::processG2() break; default: + //Probably someone punching a UDP hole to us return; } } From bf4738c8a218cc22a77bfa793b357166a372a4f3 Mon Sep 17 00:00:00 2001 From: Geoffrey Merck F4FXL - KC3FRA Date: Sun, 18 Nov 2018 07:58:52 +0100 Subject: [PATCH 069/166] Add G2 port caching --- Common/CacheManager.cpp | 28 +++++++++++++++++++++++++--- Common/CacheManager.h | 7 ++++++- Common/GatewayCache.cpp | 6 +++--- Common/GatewayCache.h | 20 ++++++++++++++------ 4 files changed, 48 insertions(+), 13 deletions(-) diff --git a/Common/CacheManager.cpp b/Common/CacheManager.cpp index 7915d1b..713624c 100644 --- a/Common/CacheManager.cpp +++ b/Common/CacheManager.cpp @@ -91,6 +91,11 @@ CRepeaterData* CCacheManager::findRepeater(const wxString& repeater) } void CCacheManager::updateUser(const wxString& user, const wxString& repeater, const wxString& gateway, const wxString& address, const wxString& timestamp, DSTAR_PROTOCOL protocol, bool addrLock, bool protoLock) +{ + updateUser(user, repeater, gateway, address, G2_DV_PORT, true, timestamp, protocol, addrLock, protoLock); +} + +void CCacheManager::updateUser(const wxString& user, const wxString& repeater, const wxString& gateway, const wxString& address, unsigned int g2Port, bool ignoreG2Port, const wxString& timestamp, DSTAR_PROTOCOL protocol, bool addrLock, bool protoLock) { wxMutexLocker locker(m_mutex); @@ -103,10 +108,15 @@ void CCacheManager::updateUser(const wxString& user, const wxString& repeater, c if (!repeater7.IsSameAs(gateway7)) m_repeaterCache.update(repeater, gateway); - m_gatewayCache.update(gateway, address, protocol, addrLock, protoLock); + updateGateway(gateway, address, g2Port, ignoreG2Port, protocol, addrLock, protoLock); } void CCacheManager::updateRepeater(const wxString& repeater, const wxString& gateway, const wxString& address, DSTAR_PROTOCOL protocol, bool addrLock, bool protoLock) +{ + updateRepeater(repeater, gateway, address, G2_DV_PORT, true, protocol, addrLock, protoLock); +} + +void CCacheManager::updateRepeater(const wxString& repeater, const wxString& gateway, const wxString& address, unsigned int g2Port, bool ignoreG2Port, DSTAR_PROTOCOL protocol, bool addrLock, bool protoLock) { wxMutexLocker locker(m_mutex); @@ -117,12 +127,24 @@ void CCacheManager::updateRepeater(const wxString& repeater, const wxString& gat if (!repeater7.IsSameAs(gateway7)) m_repeaterCache.update(repeater, gateway); - m_gatewayCache.update(gateway, address, protocol, addrLock, protoLock); + updateGateway(gateway, address, g2Port, ignoreG2Port, protocol, addrLock, protoLock); } void CCacheManager::updateGateway(const wxString& gateway, const wxString& address, DSTAR_PROTOCOL protocol, bool addrLock, bool protoLock) +{ + updateGateway(gateway, address, G2_DV_PORT, true, protocol, addrLock, protoLock); +} + +void CCacheManager::updateGateway(const wxString& gateway, const wxString& address, unsigned int g2Port, bool ignoreG2Port, DSTAR_PROTOCOL protocol, bool addrLock, bool protoLock) { wxMutexLocker locker(m_mutex); - m_gatewayCache.update(gateway, address, protocol, addrLock, protoLock); + m_gatewayCache.update(gateway, address, g2Port, ignoreG2Port, protocol, addrLock, protoLock); +} + +void CCacheManager::updateGatewayG2(const wxString& gateway, const wxString& address, unsigned int g2Port) +{ + CGatewayRecord* gr = m_gatewayCache.find(gateway); + DSTAR_PROTOCOL protocol = gr != NULL? gr->getProtocol() : DP_UNKNOWN; + updateGateway(gateway, address, g2Port, false, protocol, false, false); } diff --git a/Common/CacheManager.h b/Common/CacheManager.h index e8d669b..80d29b1 100644 --- a/Common/CacheManager.h +++ b/Common/CacheManager.h @@ -146,9 +146,14 @@ public: void updateUser(const wxString& user, const wxString& repeater, const wxString& gateway, const wxString& address, const wxString& timeStamp, DSTAR_PROTOCOL protocol, bool addrLock, bool protoLock); void updateRepeater(const wxString& repeater, const wxString& gateway, const wxString& address, DSTAR_PROTOCOL protocol, bool addrLock, bool protoLock); - void updateGateway(const wxString& gateway, const wxString& address, DSTAR_PROTOCOL protocol, bool addrLock, bool protoLock); + void updateGateway(const wxString& gateway, const wxString& address, DSTAR_PROTOCOL protocol,bool addrLock, bool protoLock); + void updateGatewayG2(const wxString& gateway, const wxString& address, unsigned int g2Port); private: + void updateUser(const wxString& user, const wxString& repeater, const wxString& gateway, const wxString& address, unsigned int g2Port, bool ignoreG2Port, const wxString& timeStamp, DSTAR_PROTOCOL protocol, bool addrLock, bool protoLock); + void updateRepeater(const wxString& repeater, const wxString& gateway, const wxString& address, unsigned int g2Port, bool ignoreG2Port, DSTAR_PROTOCOL protocol, bool addrLock, bool protoLock); + void updateGateway(const wxString& gateway, const wxString& address, unsigned int g2Port, bool ignoreG2Port, DSTAR_PROTOCOL protocol,bool addrLock, bool protoLock); + wxMutex m_mutex; CUserCache m_userCache; CGatewayCache m_gatewayCache; diff --git a/Common/GatewayCache.cpp b/Common/GatewayCache.cpp index b029d7c..17ffc5b 100644 --- a/Common/GatewayCache.cpp +++ b/Common/GatewayCache.cpp @@ -36,7 +36,7 @@ CGatewayRecord* CGatewayCache::find(const wxString& gateway) return m_cache[gateway]; } -void CGatewayCache::update(const wxString& gateway, const wxString& address, DSTAR_PROTOCOL protocol, bool addrLock, bool protoLock) +void CGatewayCache::update(const wxString& gateway, const wxString& address, unsigned int g2Port, bool ignoreG2Port, DSTAR_PROTOCOL protocol, bool addrLock, bool protoLock) { CGatewayRecord* rec = m_cache[gateway]; @@ -45,10 +45,10 @@ void CGatewayCache::update(const wxString& gateway, const wxString& address, DST if (rec == NULL) // A brand new record is needed - m_cache[gateway] = new CGatewayRecord(gateway, addr_in, protocol, addrLock, protoLock); + m_cache[gateway] = new CGatewayRecord(gateway, addr_in, g2Port, protocol, addrLock, protoLock); else // Update an existing record - rec->setData(addr_in, protocol, addrLock, protoLock); + rec->setData(addr_in, g2Port, ignoreG2Port, protocol, addrLock, protoLock); } unsigned int CGatewayCache::getCount() const diff --git a/Common/GatewayCache.h b/Common/GatewayCache.h index fe79cd6..4140d24 100644 --- a/Common/GatewayCache.h +++ b/Common/GatewayCache.h @@ -35,9 +35,10 @@ class CGatewayRecord { public: - CGatewayRecord(const wxString& gateway, in_addr address, DSTAR_PROTOCOL protocol, bool addrLock, bool protoLock) : + CGatewayRecord(const wxString& gateway, in_addr address, unsigned int g2Port, DSTAR_PROTOCOL protocol, bool addrLock, bool protoLock) : m_gateway(gateway), m_address(address), + m_g2Port(g2Port), m_protocol(DP_UNKNOWN), m_addrLock(addrLock), m_protoLock(false) @@ -63,8 +64,16 @@ public: return m_protocol; } - void setData(in_addr address, DSTAR_PROTOCOL protocol, bool addrLock, bool protoLock) + unsigned int g2Port() const { + return m_g2Port; + } + + void setData(in_addr address, unsigned int g2Port, bool ignoreG2Port, DSTAR_PROTOCOL protocol, bool addrLock, bool protoLock) + { + if(!ignoreG2Port) + m_g2Port = g2Port; + if (!m_addrLock) { m_address = address; m_addrLock = addrLock; @@ -80,10 +89,9 @@ public: private: wxString m_gateway; - in_addr m_address; - + in_addr m_address; //the incoming G2 port, usually the default one unless the calling hotspot is behind a NAT, therefore keep track of it and use it to answer back instead of the default one - unsigned int m_G2Port; + unsigned int m_g2Port; DSTAR_PROTOCOL m_protocol; bool m_addrLock; bool m_protoLock; @@ -98,7 +106,7 @@ public: CGatewayRecord* find(const wxString& gateway); - void update(const wxString& gateway, const wxString& address, DSTAR_PROTOCOL protocol, bool addrLock, bool protoLock); + void update(const wxString& gateway, const wxString& address, unsigned int g2port, bool ignoreG2Port, DSTAR_PROTOCOL protocol, bool addrLock, bool protoLock); unsigned int getCount() const; From 1f76e03cf5ab1cede5c1d7568871d66484f84b4e Mon Sep 17 00:00:00 2001 From: Geoffrey Merck F4FXL - KC3FRA Date: Sun, 18 Nov 2018 07:59:23 +0100 Subject: [PATCH 070/166] Update G2 port on incoming G2 transmission --- ircDDBGateway/IRCDDBGatewayThread.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/ircDDBGateway/IRCDDBGatewayThread.cpp b/ircDDBGateway/IRCDDBGatewayThread.cpp index 595b278..fbecd53 100644 --- a/ircDDBGateway/IRCDDBGatewayThread.cpp +++ b/ircDDBGateway/IRCDDBGatewayThread.cpp @@ -1037,6 +1037,7 @@ void CIRCDDBGatewayThread::processG2() if (header != NULL) { // wxLogMessage(wxT("G2 header - My: %s/%s Your: %s Rpt1: %s Rpt2: %s Flags: %02X %02X %02X"), header->getMyCall1().c_str(), header->getMyCall2().c_str(), header->getYourCall().c_str(), header->getRptCall1().c_str(), header->getRptCall2().c_str(), header->getFlag1(), header->getFlag2(), header->getFlag3()); CG2Handler::process(*header); + m_cache.updateGatewayG2(header-> getRptCall1(), wxT("127.0.0.1"), incomingPort); delete header; } } From cda4300f3485b36cead6734df4c553874a8a1f2c Mon Sep 17 00:00:00 2001 From: Geoffrey Merck F4FXL - KC3FRA Date: Sun, 18 Nov 2018 16:54:57 +0100 Subject: [PATCH 071/166] Constrain G2 stuff to specific functions Code is much more lighter ! --- Common/CacheManager.cpp | 27 ++++--------------- Common/CacheManager.h | 6 +---- Common/GatewayCache.cpp | 39 +++++++++++++++++++++++---- Common/GatewayCache.h | 26 +++++++++++++----- ircDDBGateway/IRCDDBGatewayThread.cpp | 5 ++-- 5 files changed, 63 insertions(+), 40 deletions(-) diff --git a/Common/CacheManager.cpp b/Common/CacheManager.cpp index 713624c..fd12a47 100644 --- a/Common/CacheManager.cpp +++ b/Common/CacheManager.cpp @@ -91,11 +91,6 @@ CRepeaterData* CCacheManager::findRepeater(const wxString& repeater) } void CCacheManager::updateUser(const wxString& user, const wxString& repeater, const wxString& gateway, const wxString& address, const wxString& timestamp, DSTAR_PROTOCOL protocol, bool addrLock, bool protoLock) -{ - updateUser(user, repeater, gateway, address, G2_DV_PORT, true, timestamp, protocol, addrLock, protoLock); -} - -void CCacheManager::updateUser(const wxString& user, const wxString& repeater, const wxString& gateway, const wxString& address, unsigned int g2Port, bool ignoreG2Port, const wxString& timestamp, DSTAR_PROTOCOL protocol, bool addrLock, bool protoLock) { wxMutexLocker locker(m_mutex); @@ -108,15 +103,10 @@ void CCacheManager::updateUser(const wxString& user, const wxString& repeater, c if (!repeater7.IsSameAs(gateway7)) m_repeaterCache.update(repeater, gateway); - updateGateway(gateway, address, g2Port, ignoreG2Port, protocol, addrLock, protoLock); + m_gatewayCache.update(gateway, address, protocol, addrLock, protoLock); } void CCacheManager::updateRepeater(const wxString& repeater, const wxString& gateway, const wxString& address, DSTAR_PROTOCOL protocol, bool addrLock, bool protoLock) -{ - updateRepeater(repeater, gateway, address, G2_DV_PORT, true, protocol, addrLock, protoLock); -} - -void CCacheManager::updateRepeater(const wxString& repeater, const wxString& gateway, const wxString& address, unsigned int g2Port, bool ignoreG2Port, DSTAR_PROTOCOL protocol, bool addrLock, bool protoLock) { wxMutexLocker locker(m_mutex); @@ -127,24 +117,17 @@ void CCacheManager::updateRepeater(const wxString& repeater, const wxString& gat if (!repeater7.IsSameAs(gateway7)) m_repeaterCache.update(repeater, gateway); - updateGateway(gateway, address, g2Port, ignoreG2Port, protocol, addrLock, protoLock); + m_gatewayCache.update(gateway, address, protocol, addrLock, protoLock); } void CCacheManager::updateGateway(const wxString& gateway, const wxString& address, DSTAR_PROTOCOL protocol, bool addrLock, bool protoLock) -{ - updateGateway(gateway, address, G2_DV_PORT, true, protocol, addrLock, protoLock); -} - -void CCacheManager::updateGateway(const wxString& gateway, const wxString& address, unsigned int g2Port, bool ignoreG2Port, DSTAR_PROTOCOL protocol, bool addrLock, bool protoLock) { wxMutexLocker locker(m_mutex); - m_gatewayCache.update(gateway, address, g2Port, ignoreG2Port, protocol, addrLock, protoLock); + m_gatewayCache.update(gateway, address, protocol, addrLock, protoLock); } -void CCacheManager::updateGatewayG2(const wxString& gateway, const wxString& address, unsigned int g2Port) +void CCacheManager::updateGatewayG2(const wxString& gateway, const in_addr& address, unsigned int g2Port) { - CGatewayRecord* gr = m_gatewayCache.find(gateway); - DSTAR_PROTOCOL protocol = gr != NULL? gr->getProtocol() : DP_UNKNOWN; - updateGateway(gateway, address, g2Port, false, protocol, false, false); + m_gatewayCache.updateG2(gateway, address, g2Port); } diff --git a/Common/CacheManager.h b/Common/CacheManager.h index 80d29b1..c014ce7 100644 --- a/Common/CacheManager.h +++ b/Common/CacheManager.h @@ -147,13 +147,9 @@ public: void updateUser(const wxString& user, const wxString& repeater, const wxString& gateway, const wxString& address, const wxString& timeStamp, DSTAR_PROTOCOL protocol, bool addrLock, bool protoLock); void updateRepeater(const wxString& repeater, const wxString& gateway, const wxString& address, DSTAR_PROTOCOL protocol, bool addrLock, bool protoLock); void updateGateway(const wxString& gateway, const wxString& address, DSTAR_PROTOCOL protocol,bool addrLock, bool protoLock); - void updateGatewayG2(const wxString& gateway, const wxString& address, unsigned int g2Port); + void updateGatewayG2(const wxString& gateway, const in_addr& address, unsigned int g2Port); private: - void updateUser(const wxString& user, const wxString& repeater, const wxString& gateway, const wxString& address, unsigned int g2Port, bool ignoreG2Port, const wxString& timeStamp, DSTAR_PROTOCOL protocol, bool addrLock, bool protoLock); - void updateRepeater(const wxString& repeater, const wxString& gateway, const wxString& address, unsigned int g2Port, bool ignoreG2Port, DSTAR_PROTOCOL protocol, bool addrLock, bool protoLock); - void updateGateway(const wxString& gateway, const wxString& address, unsigned int g2Port, bool ignoreG2Port, DSTAR_PROTOCOL protocol,bool addrLock, bool protoLock); - wxMutex m_mutex; CUserCache m_userCache; CGatewayCache m_gatewayCache; diff --git a/Common/GatewayCache.cpp b/Common/GatewayCache.cpp index 17ffc5b..83bc62a 100644 --- a/Common/GatewayCache.cpp +++ b/Common/GatewayCache.cpp @@ -36,19 +36,48 @@ CGatewayRecord* CGatewayCache::find(const wxString& gateway) return m_cache[gateway]; } -void CGatewayCache::update(const wxString& gateway, const wxString& address, unsigned int g2Port, bool ignoreG2Port, DSTAR_PROTOCOL protocol, bool addrLock, bool protoLock) +void CGatewayCache::update(const wxString& gateway, const wxString& address, DSTAR_PROTOCOL protocol, bool addrLock, bool protoLock) { - CGatewayRecord* rec = m_cache[gateway]; - in_addr addr_in; addr_in.s_addr = ::inet_addr(address.mb_str()); + CGatewayRecord* rec = m_cache[gateway]; + if (rec == NULL) // A brand new record is needed - m_cache[gateway] = new CGatewayRecord(gateway, addr_in, g2Port, protocol, addrLock, protoLock); + m_cache[gateway] = new CGatewayRecord(gateway, addr_in, G2_DV_PORT, protocol, addrLock, protoLock); else // Update an existing record - rec->setData(addr_in, g2Port, ignoreG2Port, protocol, addrLock, protoLock); + rec->setData(addr_in, protocol, addrLock, protoLock); +} + +void CGatewayCache::updateG2(const wxString& gateway, in_addr address, unsigned int g2Port) +{ + //empty gateway means we are coming from udp hole punching, let see if we have an getway with matching address + CGatewayRecord* rec = gateway.empty()? findByAddress(address) : m_cache[gateway]; + + if (rec == NULL) { + // A brand new record is needed + m_cache[gateway] = new CGatewayRecord(gateway, address, g2Port, DP_UNKNOWN, false, false); + } + else { + // Update an existing record + if(rec->getGateway().empty())//if this is a record created from a punch call, set its gateway + rec->setGateway(gateway); + + rec->setG2Data(address, g2Port); + } +} + +CGatewayRecord* CGatewayCache::findByAddress(in_addr address) +{ + for (CGatewayCache_t::iterator it = m_cache.begin(); it != m_cache.end(); ++it) { + if(it-> second != NULL + && it->second->getAddress().s_addr == address.s_addr) + return it->second; + } + + return NULL; } unsigned int CGatewayCache::getCount() const diff --git a/Common/GatewayCache.h b/Common/GatewayCache.h index 4140d24..7729241 100644 --- a/Common/GatewayCache.h +++ b/Common/GatewayCache.h @@ -54,6 +54,11 @@ public: return m_gateway; } + void setGateway(const wxString& gateway) + { + m_gateway = gateway; + } + in_addr getAddress() const { return m_address; @@ -69,11 +74,8 @@ public: return m_g2Port; } - void setData(in_addr address, unsigned int g2Port, bool ignoreG2Port, DSTAR_PROTOCOL protocol, bool addrLock, bool protoLock) + void setData(in_addr address, DSTAR_PROTOCOL protocol, bool addrLock, bool protoLock) { - if(!ignoreG2Port) - m_g2Port = g2Port; - if (!m_addrLock) { m_address = address; m_addrLock = addrLock; @@ -87,10 +89,19 @@ public: } } + void setG2Data(in_addr address, unsigned int g2Port) + { + if (!m_addrLock) { + m_address = address; + } + + m_g2Port = g2Port; + } + private: wxString m_gateway; in_addr m_address; - //the incoming G2 port, usually the default one unless the calling hotspot is behind a NAT, therefore keep track of it and use it to answer back instead of the default one + //the incoming G2 port, keep track of it and use it to answer back instead of the default one. This helps us defeat NAT with no port forwarding to G2_DVPORT unsigned int m_g2Port; DSTAR_PROTOCOL m_protocol; bool m_addrLock; @@ -106,11 +117,14 @@ public: CGatewayRecord* find(const wxString& gateway); - void update(const wxString& gateway, const wxString& address, unsigned int g2port, bool ignoreG2Port, DSTAR_PROTOCOL protocol, bool addrLock, bool protoLock); + void update(const wxString& gateway, const wxString& address, DSTAR_PROTOCOL protocol, bool addrLock, bool protoLock); + void updateG2(const wxString& gateway, in_addr address, unsigned int g2Port); unsigned int getCount() const; private: + CGatewayRecord* findByAddress(in_addr address); + CGatewayCache_t m_cache; }; diff --git a/ircDDBGateway/IRCDDBGatewayThread.cpp b/ircDDBGateway/IRCDDBGatewayThread.cpp index fbecd53..4281e72 100644 --- a/ircDDBGateway/IRCDDBGatewayThread.cpp +++ b/ircDDBGateway/IRCDDBGatewayThread.cpp @@ -1037,7 +1037,7 @@ void CIRCDDBGatewayThread::processG2() if (header != NULL) { // wxLogMessage(wxT("G2 header - My: %s/%s Your: %s Rpt1: %s Rpt2: %s Flags: %02X %02X %02X"), header->getMyCall1().c_str(), header->getMyCall2().c_str(), header->getYourCall().c_str(), header->getRptCall1().c_str(), header->getRptCall2().c_str(), header->getFlag1(), header->getFlag2(), header->getFlag3()); CG2Handler::process(*header); - m_cache.updateGatewayG2(header-> getRptCall1(), wxT("127.0.0.1"), incomingPort); + m_cache.updateGatewayG2(header-> getRptCall1(), incomingAddress, incomingPort); delete header; } } @@ -1053,7 +1053,8 @@ void CIRCDDBGatewayThread::processG2() break; default: - //Probably someone punching a UDP hole to us + //Probably someone punching a UDP hole to us, keep track of that + m_cache.updateGatewayG2(wxT(""), incomingAddress, incomingPort); return; } } From 9f1a1d841a674c1013ca732013abfc3dafd588a8 Mon Sep 17 00:00:00 2001 From: Geoffrey Merck F4FXL - KC3FRA Date: Sun, 18 Nov 2018 17:14:29 +0100 Subject: [PATCH 072/166] Do not update G2 cache when nothing has been read from socket --- Common/G2ProtocolHandler.cpp | 2 ++ ircDDBGateway/IRCDDBGatewayThread.cpp | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Common/G2ProtocolHandler.cpp b/Common/G2ProtocolHandler.cpp index 325710d..3320b5d 100644 --- a/Common/G2ProtocolHandler.cpp +++ b/Common/G2ProtocolHandler.cpp @@ -89,6 +89,8 @@ bool CG2ProtocolHandler::readPackets(in_addr& incomingAddress, unsigned int& inc { m_type = GT_NONE; + incomingPort = 0; + // No more data? int length = m_socket.read(m_buffer, BUFFER_LENGTH, incomingAddress, incomingPort); if (length <= 0) diff --git a/ircDDBGateway/IRCDDBGatewayThread.cpp b/ircDDBGateway/IRCDDBGatewayThread.cpp index 4281e72..6892267 100644 --- a/ircDDBGateway/IRCDDBGatewayThread.cpp +++ b/ircDDBGateway/IRCDDBGatewayThread.cpp @@ -1054,7 +1054,8 @@ void CIRCDDBGatewayThread::processG2() default: //Probably someone punching a UDP hole to us, keep track of that - m_cache.updateGatewayG2(wxT(""), incomingAddress, incomingPort); + if(incomingPort > 0 && incomingPort < 65536) + m_cache.updateGatewayG2(wxT(""), incomingAddress, incomingPort); return; } } From ee9f3e181613ffed5aa5e6cd57a33f8785981a6e Mon Sep 17 00:00:00 2001 From: Geoffrey Merck F4FXL - KC3FRA Date: Sun, 18 Nov 2018 18:41:13 +0100 Subject: [PATCH 073/166] Make repeaterhandler aware of cached G2 Port --- Common/CacheManager.cpp | 2 +- Common/CacheManager.h | 11 +++++++++-- Common/GatewayCache.h | 2 +- Common/RepeaterHandler.cpp | 2 +- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/Common/CacheManager.cpp b/Common/CacheManager.cpp index fd12a47..a9dbe1b 100644 --- a/Common/CacheManager.cpp +++ b/Common/CacheManager.cpp @@ -54,7 +54,7 @@ CUserData* CCacheManager::findUser(const wxString& user) if (gr == NULL) return NULL; - return new CUserData(user, ur->getRepeater(), gr->getGateway(), gr->getAddress()); + return new CUserData(user, ur->getRepeater(), gr->getGateway(), gr->getAddress(), gr->getG2Port()); } CGatewayData* CCacheManager::findGateway(const wxString& gateway) diff --git a/Common/CacheManager.h b/Common/CacheManager.h index c014ce7..2226aee 100644 --- a/Common/CacheManager.h +++ b/Common/CacheManager.h @@ -33,11 +33,12 @@ class CUserData { public: - CUserData(const wxString& user, const wxString& repeater, const wxString& gateway, in_addr address) : + CUserData(const wxString& user, const wxString& repeater, const wxString& gateway, in_addr address, unsigned int g2Port) : m_user(user), m_repeater(repeater), m_gateway(gateway), - m_address(address) + m_address(address), + m_g2Port(g2Port) { } @@ -61,11 +62,17 @@ public: return m_address; } + unsigned int getG2Port() const + { + return m_g2Port; + } + private: wxString m_user; wxString m_repeater; wxString m_gateway; in_addr m_address; + unsigned int m_g2Port; }; class CRepeaterData { diff --git a/Common/GatewayCache.h b/Common/GatewayCache.h index 7729241..dc963b9 100644 --- a/Common/GatewayCache.h +++ b/Common/GatewayCache.h @@ -69,7 +69,7 @@ public: return m_protocol; } - unsigned int g2Port() const + unsigned int getG2Port() const { return m_g2Port; } diff --git a/Common/RepeaterHandler.cpp b/Common/RepeaterHandler.cpp index 1a25db0..0209ecb 100644 --- a/Common/RepeaterHandler.cpp +++ b/Common/RepeaterHandler.cpp @@ -2025,7 +2025,7 @@ void CRepeaterHandler::g2CommandHandler(const wxString& callsign, const wxString m_g2Address = data->getAddress(); m_g2Repeater = data->getRepeater(); m_g2Gateway = data->getGateway(); - header.setDestination(m_g2Address, G2_DV_PORT); + header.setDestination(m_g2Address, data->getG2Port()); header.setRepeaters(m_g2Gateway, m_g2Repeater); m_g2Handler->writeHeader(header); From 65d7081f291e3cd21e956880d40f498354f35e98 Mon Sep 17 00:00:00 2001 From: Geoffrey Merck F4FXL - KC3FRA Date: Sun, 18 Nov 2018 21:38:40 +0100 Subject: [PATCH 074/166] Add update of gateway call to records creted through udp punching --- Common/CacheManager.cpp | 4 ++-- Common/CacheManager.h | 22 ++++++++++++++++++---- Common/GatewayCache.cpp | 8 +++++++- 3 files changed, 27 insertions(+), 7 deletions(-) diff --git a/Common/CacheManager.cpp b/Common/CacheManager.cpp index a9dbe1b..682ad58 100644 --- a/Common/CacheManager.cpp +++ b/Common/CacheManager.cpp @@ -65,7 +65,7 @@ CGatewayData* CCacheManager::findGateway(const wxString& gateway) if (gr == NULL) return NULL; - return new CGatewayData(gateway, gr->getAddress(), gr->getProtocol()); + return new CGatewayData(gateway, gr->getAddress(), gr->getProtocol(), gr->getG2Port()); } CRepeaterData* CCacheManager::findRepeater(const wxString& repeater) @@ -87,7 +87,7 @@ CRepeaterData* CCacheManager::findRepeater(const wxString& repeater) if (gr == NULL) return NULL; - return new CRepeaterData(repeater, gr->getGateway(), gr->getAddress(), gr->getProtocol()); + return new CRepeaterData(repeater, gr->getGateway(), gr->getAddress(), gr->getProtocol(), gr->getG2Port()); } void CCacheManager::updateUser(const wxString& user, const wxString& repeater, const wxString& gateway, const wxString& address, const wxString& timestamp, DSTAR_PROTOCOL protocol, bool addrLock, bool protoLock) diff --git a/Common/CacheManager.h b/Common/CacheManager.h index 2226aee..dc38392 100644 --- a/Common/CacheManager.h +++ b/Common/CacheManager.h @@ -77,11 +77,12 @@ private: class CRepeaterData { public: - CRepeaterData(const wxString& repeater, const wxString& gateway, in_addr address, DSTAR_PROTOCOL protocol) : + CRepeaterData(const wxString& repeater, const wxString& gateway, in_addr address, DSTAR_PROTOCOL protocol, unsigned int g2Port) : m_repeater(repeater), m_gateway(gateway), m_address(address), - m_protocol(protocol) + m_protocol(protocol), + m_g2Port(g2Port) { } @@ -105,19 +106,26 @@ public: return m_protocol; } + unsigned int getG2Port() const + { + return m_g2Port; + } + private: wxString m_repeater; wxString m_gateway; in_addr m_address; DSTAR_PROTOCOL m_protocol; + unsigned int m_g2Port; }; class CGatewayData { public: - CGatewayData(const wxString& gateway, in_addr address, DSTAR_PROTOCOL protocol) : + CGatewayData(const wxString& gateway, in_addr address, DSTAR_PROTOCOL protocol, unsigned int g2Port) : m_gateway(gateway), m_address(address), - m_protocol(protocol) + m_protocol(protocol), + m_g2Port(g2Port) { } @@ -136,10 +144,16 @@ public: return m_protocol; } + unsigned int getG2Port() const + { + return m_g2Port; + } + private: wxString m_gateway; in_addr m_address; DSTAR_PROTOCOL m_protocol; + unsigned int m_g2Port; }; class CCacheManager { diff --git a/Common/GatewayCache.cpp b/Common/GatewayCache.cpp index 83bc62a..436817b 100644 --- a/Common/GatewayCache.cpp +++ b/Common/GatewayCache.cpp @@ -43,6 +43,12 @@ void CGatewayCache::update(const wxString& gateway, const wxString& address, DST CGatewayRecord* rec = m_cache[gateway]; + if(rec == NULL) { + rec = findByAddress(addr_in);//did this gateway punch to us and we do not have a gateway set for it ? + if(rec->getGateway().empty()) + rec->setGateway(gateway); + } + if (rec == NULL) // A brand new record is needed m_cache[gateway] = new CGatewayRecord(gateway, addr_in, G2_DV_PORT, protocol, addrLock, protoLock); @@ -53,7 +59,7 @@ void CGatewayCache::update(const wxString& gateway, const wxString& address, DST void CGatewayCache::updateG2(const wxString& gateway, in_addr address, unsigned int g2Port) { - //empty gateway means we are coming from udp hole punching, let see if we have an getway with matching address + //empty gateway means we are coming from udp hole punching, let see if we have an gateway with matching address CGatewayRecord* rec = gateway.empty()? findByAddress(address) : m_cache[gateway]; if (rec == NULL) { From 713f2958c245354f16295a374d93780257ac01dd Mon Sep 17 00:00:00 2001 From: Geoffrey Merck F4FXL - KC3FRA Date: Sun, 18 Nov 2018 21:39:16 +0100 Subject: [PATCH 075/166] No more hardcoded G2 port in repeater handler --- Common/RepeaterHandler.cpp | 21 ++++++++++++++++----- Common/RepeaterHandler.h | 1 + ircDDBGateway/IRCDDBGatewayThread.cpp | 4 +++- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/Common/RepeaterHandler.cpp b/Common/RepeaterHandler.cpp index 0209ecb..c1f32a9 100644 --- a/Common/RepeaterHandler.cpp +++ b/Common/RepeaterHandler.cpp @@ -109,6 +109,7 @@ m_g2Repeater(), m_g2Gateway(), m_g2Header(NULL), m_g2Address(), +m_g2Port(G2_DV_PORT), m_linkStatus(LS_NONE), m_linkRepeater(), m_linkGateway(), @@ -632,6 +633,7 @@ void CRepeaterHandler::processRepeater(CHeaderData& header) m_g2User.Clear(); m_g2Repeater.Clear(); m_g2Gateway.Clear(); + m_g2Port = G2_DV_PORT; // Check if this user is restricted m_restricted = false; @@ -829,7 +831,7 @@ void CRepeaterHandler::processRepeater(CAMBEData& data) break; case G2_OK: - data.setDestination(m_g2Address, G2_DV_PORT); + data.setDestination(m_g2Address, m_g2Port); m_g2Handler->writeAMBE(data); if (data.isEnd()) { @@ -1213,7 +1215,7 @@ void CRepeaterHandler::resolveUserInt(const wxString& user, const wxString& repe m_g2Repeater = repeater; m_g2Gateway = gateway; - m_g2Header->setDestination(m_g2Address, G2_DV_PORT); + m_g2Header->setDestination(m_g2Address, m_g2Port); m_g2Header->setRepeaters(m_g2Gateway, m_g2Repeater); m_g2Handler->writeHeader(*m_g2Header); @@ -1226,6 +1228,7 @@ void CRepeaterHandler::resolveUserInt(const wxString& user, const wxString& repe m_g2User.Clear(); m_g2Repeater.Clear(); m_g2Gateway.Clear(); + m_g2Port = G2_DV_PORT; delete m_g2Header; m_g2Header = NULL; @@ -1245,7 +1248,10 @@ void CRepeaterHandler::resolveRepeaterInt(const wxString& repeater, const wxStri m_g2Repeater = repeater; m_g2Gateway = gateway; - m_g2Header->setDestination(m_g2Address, G2_DV_PORT); + CRepeaterData* rpt = m_cache->findRepeater(repeater); + m_g2Port = rpt != NULL ? rpt->getG2Port() : G2_DV_PORT; + + m_g2Header->setDestination(m_g2Address, m_g2Port); m_g2Header->setRepeaters(m_g2Gateway, m_g2Repeater); m_g2Handler->writeHeader(*m_g2Header); @@ -1258,6 +1264,7 @@ void CRepeaterHandler::resolveRepeaterInt(const wxString& repeater, const wxStri m_g2User.Clear(); m_g2Repeater.Clear(); m_g2Gateway.Clear(); + m_g2Port = G2_DV_PORT; delete m_g2Header; m_g2Header = NULL; @@ -1459,6 +1466,7 @@ void CRepeaterHandler::clockInt(unsigned int ms) m_g2User.Clear(); m_g2Repeater.Clear(); m_g2Gateway.Clear(); + m_g2Port = G2_DV_PORT; delete m_g2Header; m_g2Header = NULL; @@ -1983,7 +1991,8 @@ void CRepeaterHandler::g2CommandHandler(const wxString& callsign, const wxString m_g2Status = G2_OK; m_g2Address = data->getAddress(); m_g2Gateway = data->getGateway(); - header.setDestination(m_g2Address, G2_DV_PORT); + m_g2Port = data->getG2Port(); + header.setDestination(m_g2Address, m_g2Port); header.setRepeaters(m_g2Gateway, m_g2Repeater); m_g2Handler->writeHeader(header); delete data; @@ -2025,7 +2034,9 @@ void CRepeaterHandler::g2CommandHandler(const wxString& callsign, const wxString m_g2Address = data->getAddress(); m_g2Repeater = data->getRepeater(); m_g2Gateway = data->getGateway(); - header.setDestination(m_g2Address, data->getG2Port()); + m_g2Port = data->getG2Port(); + wxLogMessage(wxT("%s is trying to G2 route to gateway %s on port %d"), user.c_str(), m_g2Gateway.c_str(), m_g2Port); + header.setDestination(m_g2Address, m_g2Port); header.setRepeaters(m_g2Gateway, m_g2Repeater); m_g2Handler->writeHeader(header); diff --git a/Common/RepeaterHandler.h b/Common/RepeaterHandler.h index 05baca2..df16c5a 100644 --- a/Common/RepeaterHandler.h +++ b/Common/RepeaterHandler.h @@ -232,6 +232,7 @@ private: wxString m_g2Gateway; CHeaderData* m_g2Header; in_addr m_g2Address; + unsigned int m_g2Port; // Link info LINK_STATUS m_linkStatus; diff --git a/ircDDBGateway/IRCDDBGatewayThread.cpp b/ircDDBGateway/IRCDDBGatewayThread.cpp index 6892267..d20e83e 100644 --- a/ircDDBGateway/IRCDDBGatewayThread.cpp +++ b/ircDDBGateway/IRCDDBGatewayThread.cpp @@ -732,7 +732,6 @@ void CIRCDDBGatewayThread::processIrcDDB() if (!res) break; - CRepeaterHandler::resolveRepeater(repeater, gateway, address, DP_DEXTRA); if (!address.IsEmpty()) { wxLogMessage(wxT("REPEATER: %s %s %s"), repeater.c_str(), gateway.c_str(), address.c_str()); m_cache.updateRepeater(repeater, gateway, address, DP_DEXTRA, false, false); @@ -740,6 +739,9 @@ void CIRCDDBGatewayThread::processIrcDDB() } else { wxLogMessage(wxT("REPEATER: %s NOT FOUND"), repeater.c_str()); } + + //resolve after updating cache so CRepeaterHandler gets latest g2 port from cache + CRepeaterHandler::resolveRepeater(repeater, gateway, address, DP_DEXTRA); } break; From f0ae853141b98a681c8105728fdd1088a1d57115 Mon Sep 17 00:00:00 2001 From: Geoffrey Merck F4FXL - KC3FRA Date: Sun, 18 Nov 2018 22:10:16 +0100 Subject: [PATCH 076/166] Check for NULL is always a good idea... -_- --- Common/GatewayCache.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Common/GatewayCache.cpp b/Common/GatewayCache.cpp index 436817b..0b6d415 100644 --- a/Common/GatewayCache.cpp +++ b/Common/GatewayCache.cpp @@ -45,7 +45,7 @@ void CGatewayCache::update(const wxString& gateway, const wxString& address, DST if(rec == NULL) { rec = findByAddress(addr_in);//did this gateway punch to us and we do not have a gateway set for it ? - if(rec->getGateway().empty()) + if(rec != NULL && rec->getGateway().empty()) rec->setGateway(gateway); } From a047577506b264542d1ff45ee4024e9a55a699b4 Mon Sep 17 00:00:00 2001 From: Geoffrey Merck F4FXL - KC3FRA Date: Mon, 19 Nov 2018 06:30:12 +0100 Subject: [PATCH 077/166] Fix not being able to have two reflectorx at same address eg XLX under DCS and XRF --- Common/GatewayCache.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Common/GatewayCache.cpp b/Common/GatewayCache.cpp index 0b6d415..e97984e 100644 --- a/Common/GatewayCache.cpp +++ b/Common/GatewayCache.cpp @@ -45,8 +45,10 @@ void CGatewayCache::update(const wxString& gateway, const wxString& address, DST if(rec == NULL) { rec = findByAddress(addr_in);//did this gateway punch to us and we do not have a gateway set for it ? - if(rec != NULL && rec->getGateway().empty()) - rec->setGateway(gateway); + if(rec != NULL && rec->getGateway().empty() && rec->getProtocol() == protocol) + rec->setGateway(gateway); + else + rec = NULL; } if (rec == NULL) From 3968c15c559ffd57aef773cb84836f1795229303 Mon Sep 17 00:00:00 2001 From: Geoffrey Merck F4FXL - KC3FRA Date: Mon, 19 Nov 2018 06:30:48 +0100 Subject: [PATCH 078/166] Only update G2 if != INADDR_NONE --- ircDDBGateway/IRCDDBGatewayThread.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ircDDBGateway/IRCDDBGatewayThread.cpp b/ircDDBGateway/IRCDDBGatewayThread.cpp index d20e83e..b27d64e 100644 --- a/ircDDBGateway/IRCDDBGatewayThread.cpp +++ b/ircDDBGateway/IRCDDBGatewayThread.cpp @@ -1056,8 +1056,9 @@ void CIRCDDBGatewayThread::processG2() default: //Probably someone punching a UDP hole to us, keep track of that - if(incomingPort > 0 && incomingPort < 65536) + if(incomingAddress.s_addr != INADDR_NONE && incomingPort > 0 && incomingPort < 65536) m_cache.updateGatewayG2(wxT(""), incomingAddress, incomingPort); + return; } } From 5c7f3e0be5fc6e52e4446cfca871d042f35230f0 Mon Sep 17 00:00:00 2001 From: Geoffrey Merck F4FXL - KC3FRA Date: Tue, 20 Nov 2018 20:22:08 +0100 Subject: [PATCH 079/166] Add some logging --- ircDDBGateway/IRCDDBGatewayThread.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ircDDBGateway/IRCDDBGatewayThread.cpp b/ircDDBGateway/IRCDDBGatewayThread.cpp index b27d64e..2971e2f 100644 --- a/ircDDBGateway/IRCDDBGatewayThread.cpp +++ b/ircDDBGateway/IRCDDBGatewayThread.cpp @@ -1056,8 +1056,10 @@ void CIRCDDBGatewayThread::processG2() default: //Probably someone punching a UDP hole to us, keep track of that - if(incomingAddress.s_addr != INADDR_NONE && incomingPort > 0 && incomingPort < 65536) + if(incomingAddress.s_addr != INADDR_NONE && incomingPort > 0 && incomingPort < 65536) { + wxLogMessage(wxT("Incoming G2 UDP punch from %s:%i"), ::inet_ntoa(incomingAddress), incomingPort)); m_cache.updateGatewayG2(wxT(""), incomingAddress, incomingPort); + } return; } From 729ffc41c5a061bc08e92ffe474eadcf64417a4f Mon Sep 17 00:00:00 2001 From: Geoffrey Merck F4FXL - KC3FRA Date: Tue, 20 Nov 2018 20:26:13 +0100 Subject: [PATCH 080/166] Fixed type --- ircDDBGateway/IRCDDBGatewayThread.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ircDDBGateway/IRCDDBGatewayThread.cpp b/ircDDBGateway/IRCDDBGatewayThread.cpp index 2971e2f..55fc1db 100644 --- a/ircDDBGateway/IRCDDBGatewayThread.cpp +++ b/ircDDBGateway/IRCDDBGatewayThread.cpp @@ -1057,7 +1057,7 @@ void CIRCDDBGatewayThread::processG2() default: //Probably someone punching a UDP hole to us, keep track of that if(incomingAddress.s_addr != INADDR_NONE && incomingPort > 0 && incomingPort < 65536) { - wxLogMessage(wxT("Incoming G2 UDP punch from %s:%i"), ::inet_ntoa(incomingAddress), incomingPort)); + wxLogMessage(wxT("Incoming G2 UDP punch from %s:%i"), ::inet_ntoa(incomingAddress), incomingPort); m_cache.updateGatewayG2(wxT(""), incomingAddress, incomingPort); } From c3427dbb08c95f6c76424bcba0eb8d4a9ed51c42 Mon Sep 17 00:00:00 2001 From: Geoffrey Merck F4FXL - KC3FRA Date: Wed, 21 Nov 2018 20:42:17 +0100 Subject: [PATCH 081/166] More meaningfull variable names --- ircDDBGateway/IRCDDBGatewayThread.cpp | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/ircDDBGateway/IRCDDBGatewayThread.cpp b/ircDDBGateway/IRCDDBGatewayThread.cpp index 55fc1db..620924e 100644 --- a/ircDDBGateway/IRCDDBGatewayThread.cpp +++ b/ircDDBGateway/IRCDDBGatewayThread.cpp @@ -1027,26 +1027,29 @@ void CIRCDDBGatewayThread::processDCS() void CIRCDDBGatewayThread::processG2() { - in_addr incomingAddress; - unsigned int incomingPort; + in_addr remoteAddress; + unsigned int remotePort; for (;;) { - G2_TYPE type = m_g2Handler->read(incomingAddress, incomingPort); + G2_TYPE type = m_g2Handler->read(remoteAddress, remotePort); switch (type) { case GT_HEADER: { - CHeaderData* header = m_g2Handler->readHeader(incomingAddress, incomingPort); + CHeaderData* header = m_g2Handler->readHeader(remoteAddress, remotePort); + if (header != NULL) { // wxLogMessage(wxT("G2 header - My: %s/%s Your: %s Rpt1: %s Rpt2: %s Flags: %02X %02X %02X"), header->getMyCall1().c_str(), header->getMyCall2().c_str(), header->getYourCall().c_str(), header->getRptCall1().c_str(), header->getRptCall2().c_str(), header->getFlag1(), header->getFlag2(), header->getFlag3()); CG2Handler::process(*header); - m_cache.updateGatewayG2(header-> getRptCall1(), incomingAddress, incomingPort); + m_cache.updateGatewayG2(header-> getRptCall1(), remoteAddress, remotePort); + delete header; } } break; case GT_AMBE: { - CAMBEData* data = m_g2Handler->readAMBE(incomingAddress, incomingPort); + CAMBEData* data = m_g2Handler->readAMBE(remoteAddress, remotePort); + if (data != NULL) { CG2Handler::process(*data); delete data; @@ -1056,9 +1059,12 @@ void CIRCDDBGatewayThread::processG2() default: //Probably someone punching a UDP hole to us, keep track of that - if(incomingAddress.s_addr != INADDR_NONE && incomingPort > 0 && incomingPort < 65536) { - wxLogMessage(wxT("Incoming G2 UDP punch from %s:%i"), ::inet_ntoa(incomingAddress), incomingPort); - m_cache.updateGatewayG2(wxT(""), incomingAddress, incomingPort); + if(remoteAddress.s_addr != INADDR_NONE && remotePort > 0 && remotePort < 65536) { + + wxLogMessage(wxT("Incoming G2 UDP punch from %s:%i"), ::inet_ntoa(remoteAddress), remotePort); + + m_cache.updateGatewayG2(wxT(""), remoteAddress, remotePort); + } return; From 0e9c1bb2f254e8dded48053f18391e3de68954ff Mon Sep 17 00:00:00 2001 From: Geoffrey Merck F4FXL - KC3FRA Date: Wed, 21 Nov 2018 20:42:52 +0100 Subject: [PATCH 082/166] More meaningful variaable names ans recognize incoming UDP punch --- Common/G2ProtocolHandler.cpp | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/Common/G2ProtocolHandler.cpp b/Common/G2ProtocolHandler.cpp index 3320b5d..84040eb 100644 --- a/Common/G2ProtocolHandler.cpp +++ b/Common/G2ProtocolHandler.cpp @@ -74,31 +74,36 @@ bool CG2ProtocolHandler::writeAMBE(const CAMBEData& data) return m_socket.write(buffer, length, data.getYourAddress(), data.getYourPort()); } -G2_TYPE CG2ProtocolHandler::read(in_addr& incomingAddress, unsigned int& incomingPort) +G2_TYPE CG2ProtocolHandler::read(in_addr& remoteAddress, unsigned int& remotePort) { bool res = true; // Loop until we have no more data from the socket or we have data for the higher layers while (res) - res = readPackets(incomingAddress, incomingPort); + res = readPackets(remoteAddress, remotePort); return m_type; } -bool CG2ProtocolHandler::readPackets(in_addr& incomingAddress, unsigned int& incomingPort) +bool CG2ProtocolHandler::readPackets(in_addr& remoteAddress, unsigned int& remotePort) { m_type = GT_NONE; - - incomingPort = 0; + remotePort = 0; // No more data? - int length = m_socket.read(m_buffer, BUFFER_LENGTH, incomingAddress, incomingPort); + int length = m_socket.read(m_buffer, BUFFER_LENGTH, remoteAddress, remotePort); if (length <= 0) return false; + if(length >= 1) + wxLogMessage(wxT("bla %i"), length); + m_length = length; if (m_buffer[0] != 'D' || m_buffer[1] != 'S' || m_buffer[2] != 'V' || m_buffer[3] != 'T') { + if(length == 1 && m_buffer[0] == 0) + return false;//we have been udp punched + return true; } else { // Header or data packet type? @@ -111,7 +116,7 @@ bool CG2ProtocolHandler::readPackets(in_addr& incomingAddress, unsigned int& inc } } -CHeaderData* CG2ProtocolHandler::readHeader(in_addr incomingAddress, unsigned int incomingPort) +CHeaderData* CG2ProtocolHandler::readHeader(in_addr remoteAddress, unsigned int remotePort) { if (m_type != GT_HEADER) return NULL; @@ -119,7 +124,7 @@ CHeaderData* CG2ProtocolHandler::readHeader(in_addr incomingAddress, unsigned in CHeaderData* header = new CHeaderData; // G2 checksums are unreliable - bool res = header->setG2Data(m_buffer, m_length, false, incomingAddress, incomingPort); + bool res = header->setG2Data(m_buffer, m_length, false, remoteAddress, remotePort); if (!res) { delete header; return NULL; @@ -128,14 +133,15 @@ CHeaderData* CG2ProtocolHandler::readHeader(in_addr incomingAddress, unsigned in return header; } -CAMBEData* CG2ProtocolHandler::readAMBE(in_addr incomingAddress, unsigned int incomingPort) +CAMBEData* CG2ProtocolHandler::readAMBE(in_addr remoteAddress, unsigned int remotePort) { if (m_type != GT_AMBE) return NULL; CAMBEData* data = new CAMBEData; - bool res = data->setG2Data(m_buffer, m_length, incomingAddress, incomingPort); + bool res = data->setG2Data(m_buffer, m_length, remoteAddress, remotePort +); if (!res) { delete data; return NULL; From 1ac7375ba4b5453516ec7870fd375cb97fb88359 Mon Sep 17 00:00:00 2001 From: Geoffrey Merck F4FXL - KC3FRA Date: Wed, 21 Nov 2018 20:44:14 +0100 Subject: [PATCH 083/166] Beautify code formating --- ircDDBGateway/IRCDDBGatewayThread.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/ircDDBGateway/IRCDDBGatewayThread.cpp b/ircDDBGateway/IRCDDBGatewayThread.cpp index 620924e..0ab6978 100644 --- a/ircDDBGateway/IRCDDBGatewayThread.cpp +++ b/ircDDBGateway/IRCDDBGatewayThread.cpp @@ -1060,11 +1060,8 @@ void CIRCDDBGatewayThread::processG2() default: //Probably someone punching a UDP hole to us, keep track of that if(remoteAddress.s_addr != INADDR_NONE && remotePort > 0 && remotePort < 65536) { - wxLogMessage(wxT("Incoming G2 UDP punch from %s:%i"), ::inet_ntoa(remoteAddress), remotePort); - m_cache.updateGatewayG2(wxT(""), remoteAddress, remotePort); - } return; From d6cfc2552f109dbf427c9e1f924d039095d1cd1e Mon Sep 17 00:00:00 2001 From: Geoffrey Merck F4FXL - KC3FRA Date: Wed, 21 Nov 2018 20:58:08 +0100 Subject: [PATCH 084/166] Remove test/debug code --- Common/G2ProtocolHandler.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/Common/G2ProtocolHandler.cpp b/Common/G2ProtocolHandler.cpp index 84040eb..50735c9 100644 --- a/Common/G2ProtocolHandler.cpp +++ b/Common/G2ProtocolHandler.cpp @@ -95,9 +95,6 @@ bool CG2ProtocolHandler::readPackets(in_addr& remoteAddress, unsigned int& remot if (length <= 0) return false; - if(length >= 1) - wxLogMessage(wxT("bla %i"), length); - m_length = length; if (m_buffer[0] != 'D' || m_buffer[1] != 'S' || m_buffer[2] != 'V' || m_buffer[3] != 'T') { From 51c734faa712f6b6c85367b4e7262dad89a94f59 Mon Sep 17 00:00:00 2001 From: Geoffrey Merck F4FXL - KC3FRA Date: Sat, 24 Nov 2018 15:22:34 +0100 Subject: [PATCH 085/166] Off loaded G2 Nat Traversal to specific handler class G2 Nat traversal handling in its own class This might serve as a starting point for upcoming DExtra/DCS/DPlus traversal --- Common/Common.vcxproj | 2 + Common/G2ProtocolHandler.cpp | 2 +- Common/G2ProtocolHandler.h | 2 +- Common/Makefile | 2 +- Common/NatTraversalHandler.cpp | 57 ++++++++++++++++++++ Common/NatTraversalHandler.h | 77 +++++++++++++++++++++++++++ ircDDBGateway/IRCDDBGatewayThread.cpp | 12 +++-- ircDDBGateway/IRCDDBGatewayThread.h | 2 + 8 files changed, 150 insertions(+), 6 deletions(-) create mode 100644 Common/NatTraversalHandler.cpp create mode 100644 Common/NatTraversalHandler.h diff --git a/Common/Common.vcxproj b/Common/Common.vcxproj index bdbcfc3..abf30b4 100644 --- a/Common/Common.vcxproj +++ b/Common/Common.vcxproj @@ -189,6 +189,7 @@ + @@ -260,6 +261,7 @@ + diff --git a/Common/G2ProtocolHandler.cpp b/Common/G2ProtocolHandler.cpp index 50735c9..fe9d5f6 100644 --- a/Common/G2ProtocolHandler.cpp +++ b/Common/G2ProtocolHandler.cpp @@ -147,7 +147,7 @@ CAMBEData* CG2ProtocolHandler::readAMBE(in_addr remoteAddress, unsigned int remo return data; } -void CG2ProtocolHandler::punchUDPHole(const wxString& address) +void CG2ProtocolHandler::traverseNat(const wxString& address) { unsigned char buffer[1]; ::memset(buffer, 0, 1); diff --git a/Common/G2ProtocolHandler.h b/Common/G2ProtocolHandler.h index b9ff1fa..088af25 100644 --- a/Common/G2ProtocolHandler.h +++ b/Common/G2ProtocolHandler.h @@ -52,7 +52,7 @@ public: CHeaderData* readHeader(in_addr incomingAddress, unsigned int incomingPort); CAMBEData* readAMBE(in_addr incomingAddress, unsigned int incomingPort); - void punchUDPHole(const wxString& addr); + void traverseNat(const wxString& addr); void close(); diff --git a/Common/Makefile b/Common/Makefile index 0243a4b..e215ea2 100644 --- a/Common/Makefile +++ b/Common/Makefile @@ -4,7 +4,7 @@ OBJECTS = AMBEData.o AnnouncementUnit.o APRSCollector.o APRSWriter.o APRSWriterT DPlusAuthenticator.o DPlusHandler.o DPlusProtocolHandler.o DPlusProtocolHandlerPool.o DRATSServer.o DTMF.o \ DummyRepeaterProtocolHandler.o DVTOOLFileReader.o EchoUnit.o G2Handler.o G2ProtocolHandler.o GatewayCache.o \ HBRepeaterProtocolHandler.o HeaderData.o HeaderLogger.o HeardData.o HostFile.o IcomRepeaterProtocolHandler.o IRCDDBGatewayConfig.o \ - LogEvent.o Logger.o PollData.o RemoteHandler.o RemoteLinkData.o RemoteProtocolHandler.o RemoteRepeaterData.o RemoteStarNetGroup.o \ + LogEvent.o Logger.o NatTraversalHandler.o PollData.o RemoteHandler.o RemoteLinkData.o RemoteProtocolHandler.o RemoteRepeaterData.o RemoteStarNetGroup.o \ RemoteStarNetUser.o RepeaterCache.o RepeaterHandler.o SHA256.o SlowDataEncoder.o StarNetHandler.o StatusData.o \ TCPReaderWriterClient.o TCPReaderWriterServer.o TextCollector.o TextData.o Timer.o UDPReaderWriter.o UserCache.o Utils.o \ VersionUnit.o XLXHostsFileDownloader.o diff --git a/Common/NatTraversalHandler.cpp b/Common/NatTraversalHandler.cpp new file mode 100644 index 0000000..052c5d9 --- /dev/null +++ b/Common/NatTraversalHandler.cpp @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2010,2011,2012,2013,2014,2015,2016,2017,2018 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 + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include "NatTraversalHandler.h" + +const unsigned int CACHE_SIZE = 500U; + +CNatTraversalHandler::CNatTraversalHandler() : +m_g2cache(CACHE_SIZE), +m_g2Handler(NULL) +{ + +} + +CNatTraversalHandler::~CNatTraversalHandler() +{ + for (CNatTraversalCache_t::iterator it = m_g2cache.begin(); it != m_g2cache.end(); ++it) + delete it->second; +} + +void CNatTraversalHandler::setG2Handler(CG2ProtocolHandler * handler) +{ + m_g2Handler = handler; +} + +void CNatTraversalHandler::traverseNatG2(const wxString& address) +{ + if(m_g2Handler != NULL){ + CNatTraversalRecord* record = m_g2cache[address]; + + if(record == NULL) { + record = new CNatTraversalRecord(address); + m_g2cache[address] = record; + } + + std::time_t currentTime = std::time(NULL); + if(currentTime - record->getTimestamp() > G2_TRAVERSAL_TIMEOUT) { + record->setTimestamp(currentTime); + m_g2Handler->traverseNat(address); + } + } +} \ No newline at end of file diff --git a/Common/NatTraversalHandler.h b/Common/NatTraversalHandler.h new file mode 100644 index 0000000..b494dff --- /dev/null +++ b/Common/NatTraversalHandler.h @@ -0,0 +1,77 @@ +/* + * Copyright (C) 2010,2011,2012,2013,2014,2015,2016,2017,2018 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 + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef NatTraversalHandler_H +#define NatTraversalHandler_H + +#define G2_TRAVERSAL_TIMEOUT 120 //seconds + +#include "G2ProtocolHandler.h" + +#include +#include + +enum NAT_TRAVERSAL_TYPE { + NTT_G2, + //NTT_DEXTRA + //NTT_DCS + //NTT_DPLUS +}; + +class CNatTraversalRecord { +public: + CNatTraversalRecord(const wxString& address) : + m_address(address), + m_timestamp(0) + { + } + + std::time_t getTimestamp() const + { + return m_timestamp; + } + + void setTimestamp(std::time_t timestamp) + { + m_timestamp = timestamp; + } + +private: + wxString m_address; + std::time_t m_timestamp; +}; + +WX_DECLARE_STRING_HASH_MAP(CNatTraversalRecord*, CNatTraversalCache_t); + +/* +* This keeps track of when we UDP punched to one destination so to avoid unnecessary traffic on each ircddb reporting +*/ +class CNatTraversalHandler { +public: + CNatTraversalHandler(); + ~CNatTraversalHandler(); + + void setG2Handler(CG2ProtocolHandler* handler); + void traverseNatG2(const wxString& address); + +private: + CNatTraversalCache_t m_g2cache; + CG2ProtocolHandler* m_g2Handler; +}; + +#endif \ No newline at end of file diff --git a/ircDDBGateway/IRCDDBGatewayThread.cpp b/ircDDBGateway/IRCDDBGatewayThread.cpp index 0ab6978..fc2aa91 100644 --- a/ircDDBGateway/IRCDDBGatewayThread.cpp +++ b/ircDDBGateway/IRCDDBGatewayThread.cpp @@ -72,6 +72,7 @@ m_dextraPool(NULL), m_dplusPool(NULL), m_dcsPool(NULL), m_g2Handler(NULL), +m_natTraversal(NULL), m_aprsWriter(NULL), m_irc(NULL), m_cache(), @@ -217,6 +218,11 @@ void CIRCDDBGatewayThread::run() m_g2Handler = NULL; } + if(m_g2Handler != NULL) { + m_natTraversal = new CNatTraversalHandler(); + m_natTraversal->setG2Handler(m_g2Handler); + } + // Wait here until we have the essentials to run while (!m_killed && (m_dextraPool == NULL || m_dplusPool == NULL || m_dcsPool == NULL || m_g2Handler == NULL || (m_icomRepeaterHandler == NULL && m_hbRepeaterHandler == NULL && m_dummyRepeaterHandler == NULL) || m_gatewayCallsign.IsEmpty())) ::wxMilliSleep(500UL); // 1/2 sec @@ -719,7 +725,7 @@ void CIRCDDBGatewayThread::processIrcDDB() if (!address.IsEmpty()) { wxLogMessage(wxT("USER: %s %s %s %s"), user.c_str(), repeater.c_str(), gateway.c_str(), address.c_str()); m_cache.updateUser(user, repeater, gateway, address, timestamp, DP_DEXTRA, false, false); - m_g2Handler->punchUDPHole(address); + m_natTraversal->traverseNatG2(address); } else { wxLogMessage(wxT("USER: %s NOT FOUND"), user.c_str()); } @@ -735,7 +741,7 @@ void CIRCDDBGatewayThread::processIrcDDB() if (!address.IsEmpty()) { wxLogMessage(wxT("REPEATER: %s %s %s"), repeater.c_str(), gateway.c_str(), address.c_str()); m_cache.updateRepeater(repeater, gateway, address, DP_DEXTRA, false, false); - m_g2Handler->punchUDPHole(address); + m_natTraversal->traverseNatG2(address); } else { wxLogMessage(wxT("REPEATER: %s NOT FOUND"), repeater.c_str()); } @@ -756,7 +762,7 @@ void CIRCDDBGatewayThread::processIrcDDB() if (!address.IsEmpty()) { wxLogMessage(wxT("GATEWAY: %s %s"), gateway.c_str(), address.c_str()); m_cache.updateGateway(gateway, address, DP_DEXTRA, false, false); - m_g2Handler->punchUDPHole(address); + m_natTraversal->traverseNatG2(address); } else { wxLogMessage(wxT("GATEWAY: %s NOT FOUND"), gateway.c_str()); } diff --git a/ircDDBGateway/IRCDDBGatewayThread.h b/ircDDBGateway/IRCDDBGatewayThread.h index e3cc863..6862b63 100644 --- a/ircDDBGateway/IRCDDBGatewayThread.h +++ b/ircDDBGateway/IRCDDBGatewayThread.h @@ -28,6 +28,7 @@ #include "IRCDDBGatewayStatusData.h" #include "DCSProtocolHandlerPool.h" #include "G2ProtocolHandler.h" +#include "NatTraversalHandler.h" #include "RemoteHandler.h" #include "CacheManager.h" #include "CallsignList.h" @@ -92,6 +93,7 @@ private: CDPlusProtocolHandlerPool* m_dplusPool; CDCSProtocolHandlerPool* m_dcsPool; CG2ProtocolHandler* m_g2Handler; + CNatTraversalHandler* m_natTraversal; CAPRSWriter* m_aprsWriter; CIRCDDB* m_irc; CCacheManager m_cache; From 584dd7e228ced66e97032f039daf4cf5ef0be68e Mon Sep 17 00:00:00 2001 From: Geoffrey Merck F4FXL - KC3FRA Date: Sat, 24 Nov 2018 17:57:27 +0100 Subject: [PATCH 086/166] Change log message --- ircDDBGateway/IRCDDBGatewayThread.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ircDDBGateway/IRCDDBGatewayThread.cpp b/ircDDBGateway/IRCDDBGatewayThread.cpp index fc2aa91..a15819a 100644 --- a/ircDDBGateway/IRCDDBGatewayThread.cpp +++ b/ircDDBGateway/IRCDDBGatewayThread.cpp @@ -1066,7 +1066,7 @@ void CIRCDDBGatewayThread::processG2() default: //Probably someone punching a UDP hole to us, keep track of that if(remoteAddress.s_addr != INADDR_NONE && remotePort > 0 && remotePort < 65536) { - wxLogMessage(wxT("Incoming G2 UDP punch from %s:%i"), ::inet_ntoa(remoteAddress), remotePort); + wxLogMessage(wxT("Incoming G2 UDP traversal from %s:%i"), ::inet_ntoa(remoteAddress), remotePort); m_cache.updateGatewayG2(wxT(""), remoteAddress, remotePort); } From b5d51f4d267382b1bbd1c1d7cba3e2bc46a341d1 Mon Sep 17 00:00:00 2001 From: Geoffrey Merck F4FXL - KC3FRA Date: Sat, 1 Dec 2018 07:12:23 +0100 Subject: [PATCH 087/166] Reduc timeout to 60s --- Common/NatTraversalHandler.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Common/NatTraversalHandler.h b/Common/NatTraversalHandler.h index b494dff..e90334a 100644 --- a/Common/NatTraversalHandler.h +++ b/Common/NatTraversalHandler.h @@ -19,7 +19,7 @@ #ifndef NatTraversalHandler_H #define NatTraversalHandler_H -#define G2_TRAVERSAL_TIMEOUT 120 //seconds +#define G2_TRAVERSAL_TIMEOUT 60 //seconds #include "G2ProtocolHandler.h" From 8ac0709d9a555cff71c8298faefd66402320ff4c Mon Sep 17 00:00:00 2001 From: Geoffrey Merck F4FXL - KC3FRA Date: Sat, 1 Dec 2018 08:00:34 +0100 Subject: [PATCH 088/166] Update visual studio project --- Common/Common.vcxproj.filters | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Common/Common.vcxproj.filters b/Common/Common.vcxproj.filters index 8365240..82574fb 100644 --- a/Common/Common.vcxproj.filters +++ b/Common/Common.vcxproj.filters @@ -209,6 +209,9 @@ Source Files + + Source Files + @@ -433,5 +436,8 @@ Header Files + + Header Files + \ No newline at end of file From fc84772fb955bd4344c6cc9d7e7ec3f2c03ed195 Mon Sep 17 00:00:00 2001 From: Geoffrey Merck F4FXL - KC3FRA Date: Sat, 1 Dec 2018 08:05:13 +0100 Subject: [PATCH 089/166] Reduce timeout to 29 seconds because of some strict NAT devices --- Common/NatTraversalHandler.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Common/NatTraversalHandler.h b/Common/NatTraversalHandler.h index e90334a..c5c424d 100644 --- a/Common/NatTraversalHandler.h +++ b/Common/NatTraversalHandler.h @@ -19,7 +19,7 @@ #ifndef NatTraversalHandler_H #define NatTraversalHandler_H -#define G2_TRAVERSAL_TIMEOUT 60 //seconds +#define G2_TRAVERSAL_TIMEOUT 29 //seconds #include "G2ProtocolHandler.h" From 51a867439f30b5c1cbace6d6a9cfc238581b1fe2 Mon Sep 17 00:00:00 2001 From: Christoph kottke Date: Mon, 7 Jan 2019 13:10:35 +0100 Subject: [PATCH 090/166] fix DD-Mode after commit baeee75 no packet transmit from repater on DD-mode --- Common/DDHandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Common/DDHandler.cpp b/Common/DDHandler.cpp index f1f6f28..faa9a40 100644 --- a/Common/DDHandler.cpp +++ b/Common/DDHandler.cpp @@ -252,7 +252,7 @@ CDDData* CDDHandler::read() if (m_maxRoutes == 0U) return NULL; -#if !defined(WIN32) +#if defined(__WINDOWS__) return NULL; #else // Check that the read() won't block From fd679a5daad1eedce8c2a319a9fdbb76b08404a3 Mon Sep 17 00:00:00 2001 From: EA3HKB Date: Tue, 8 Jan 2019 20:09:11 +0100 Subject: [PATCH 091/166] Update DCS_Hosts.txt Update from pi-star.uk New ip's for DCS017 and DCS714 and others --- Data/DCS_Hosts.txt | 267 +++++++++++++++++++++++++-------------------- 1 file changed, 148 insertions(+), 119 deletions(-) diff --git a/Data/DCS_Hosts.txt b/Data/DCS_Hosts.txt index 6937b10..63945af 100644 --- a/Data/DCS_Hosts.txt +++ b/Data/DCS_Hosts.txt @@ -3,313 +3,342 @@ # sourced from http://xlxapi.rlx.lu/api.php?do=GetReflectorHostname # Please report issues at https://www.facebook.com/groups/pistar/ # File created at Tuesday 10th of July 2018 08:13:04 PM BST +# DCS000 23.111.174.198 -DCS001 176.10.105.252 -DCS002 195.225.116.201 -DCS003 176.10.105.254 -DCS004 77.243.52.148 -DCS005 87.117.229.174 L -DCS006 24.233.213.165 L -DCS007 80.69.86.234 -DCS008 87.106.84.53 -DCS009 89.185.97.35 -DCS010 85.197.129.86 L +#DCS001 77.57.24.143 +#DCS002 140.82.62.162 +#DCS003 173.199.124.183 +#DCS004 44.103.34.3 +DCS005 87.117.229.174 +#DCS006 34.213.176.201 +DCS007 212.227.203.37 +#DCS008 45.77.153.132 +DCS010 85.197.129.86 DCS011 81.95.126.168 -DCS012 194.38.140.205 L -DCS013 195.159.104.200 -DCS014 52.63.223.130 +DCS012 194.38.140.205 +DCS014 110.232.113.108 DCS015 213.202.228.119 -DCS016 75.99.228.34 -DCS017 81.169.228.115 L -DCS018 212.237.50.28 +DCS017 85.214.78.198 DCS019 31.7.247.58 -DCS020 75.76.90.90 -DCS021 183.177.205.142 -DCS022 157.7.142.179 -DCS023 77.85.192.94 -DCS024 75.151.47.163 -DCS025 87.229.30.227 +#DCS022 83.137.45.98 +#DCS024 94.199.173.123 +#DCS025 89.38.150.252 DCS026 65.175.188.230 -DCS027 128.199.57.19 -DCS028 172.104.63.79 L -DCS029 74.210.135.144 +#DCS029 80.123.238.76 DCS030 194.59.177.44 DCS032 158.64.26.140 -DCS033 51.255.35.215 +DCS033 46.226.178.81 DCS035 45.79.94.184 -DCS036 151.12.36.112 +DCS038 5.249.151.111 DCS039 31.14.142.119 DCS040 109.71.45.29 -DCS044 77.243.52.148 DCS046 176.10.140.161 -DCS047 121.94.194.251 +DCS047 202.171.147.58 DCS049 212.71.234.224 +DCS050 80.211.155.206 DCS051 93.186.254.219 DCS052 121.119.96.205 -DCS053 91.214.62.136 +DCS053 185.97.120.120 DCS054 52.86.180.251 DCS055 52.80.4.154 -DCS057 173.216.181.178 -DCS058 115.162.207.228 +DCS057 74.193.217.15 +DCS058 118.110.251.54 DCS059 18.219.32.21 DCS060 212.237.36.181 -DCS061 68.115.205.110 -DCS062 70.88.145.163 DCS064 122.222.1.50 -DCS066 80.116.203.88 +DCS067 77.229.104.173 DCS068 92.222.145.202 DCS071 211.60.41.185 +DCS072 75.60.237.17 DCS074 212.237.211.82 -DCS075 5.135.162.136 DCS076 203.137.116.117 -DCS077 5.249.151.111 -DCS078 109.10.128.221 -DCS079 184.23.183.98 -DCS080 121.85.175.69 -DCS081 121.84.13.151 -DCS085 27.92.11.123 -DCS086 220.133.89.28 +DCS077 216.21.9.156 +DCS078 109.15.57.11 +DCS080 121.81.128.207 +DCS081 121.82.151.243 +DCS083 185.205.210.217 +DCS085 113.150.26.8 +DCS087 44.137.36.209 DCS088 194.109.192.235 DCS089 194.109.192.236 DCS090 91.92.136.252 -DCS092 212.237.30.36 +DCS093 82.51.162.200 DCS095 203.137.76.53 -DCS098 111.169.16.250 +DCS097 80.211.154.173 +DCS098 203.136.233.165 DCS099 80.211.27.75 -DCS101 45.62.213.101 +DCS100 45.62.233.223 +DCS101 64.137.236.164 DCS102 23.111.174.196 DCS103 64.137.224.126 DCS104 23.111.174.197 DCS105 51.254.99.78 -DCS109 182.168.101.180 +DCS109 182.168.128.138 DCS110 150.7.164.10 DCS111 61.195.96.160 +DCS112 94.177.235.81 DCS113 151.12.36.103 DCS114 5.135.188.16 DCS115 217.182.128.3 -DCS116 31.185.101.211 DCS118 5.249.148.252 DCS119 125.129.207.86 DCS120 81.150.10.63 DCS121 174.37.249.156 -DCS122 83.137.45.100 DCS124 211.14.169.234 DCS125 213.181.208.52 -DCS129 219.116.28.227 +DCS129 220.209.106.220 DCS130 194.59.177.45 DCS131 80.127.118.226 DCS132 91.203.55.87 -DCS134 159.89.176.86 +DCS135 74.208.214.69 +DCS140 95.211.211.145 DCS145 178.59.23.138 DCS147 46.41.1.127 DCS150 80.211.10.212 +DCS158 150.66.16.176 +DCS160 61.195.109.179 DCS170 210.178.113.173 -DCS171 121.162.91.45 +DCS171 210.178.113.123 +DCS175 162.248.92.25 DCS180 192.241.240.7 +DCS185 89.106.108.151 DCS199 153.126.179.214 -DCS202 148.251.122.251 -DCS204 185.85.18.162 +DCS204 85.214.126.111 DCS206 193.190.240.227 DCS208 151.80.155.39 DCS210 64.137.224.107 DCS212 52.38.90.188 DCS214 185.47.129.230 -DCS215 185.87.96.172 DCS216 74.214.25.135 DCS220 124.41.83.11 DCS222 212.43.96.84 DCS224 203.137.99.97 -DCS226 94.176.6.37 -DCS228 188.60.43.206 +DCS226 2.226.183.226 +DCS227 89.33.44.100 +DCS228 83.77.104.52 DCS229 194.191.4.54 DCS230 80.250.3.114 DCS232 89.185.97.35 -DCS235 5.150.254.97 -DCS238 172.104.239.219 DCS241 151.80.158.227 DCS242 73.14.84.43 DCS246 172.93.48.159 +DCS255 142.91.158.199 +DCS258 75.60.237.19 +DCS262 92.192.107.54 DCS263 85.214.193.146 DCS264 52.2.131.118 DCS266 212.237.51.82 DCS268 194.38.140.204 DCS270 158.64.26.132 -DCS282 210.188.25.17 +DCS272 200.231.36.188 DCS284 95.158.165.32 -DCS290 94.176.6.45 +DCS287 43.245.172.2 +DCS290 44.182.7.20 DCS291 101.143.242.189 -DCS295 64.137.160.185 -DCS298 119.238.135.207 -DCS299 125.236.227.43 +DCS298 220.144.59.222 +DCS299 203.86.194.92 DCS300 45.62.244.43 DCS302 144.217.241.23 +DCS303 75.70.52.143 +DCS305 145.239.116.57 DCS307 72.21.76.154 DCS310 52.11.207.121 +DCS311 78.47.206.12 +DCS312 192.241.160.183 DCS313 34.213.108.164 DCS315 65.101.7.50 DCS317 44.48.8.15 DCS321 31.207.110.45 DCS328 212.237.33.114 +DCS329 114.181.139.32 +DCS330 18.222.199.205 DCS332 188.213.168.99 DCS333 194.116.29.73 DCS334 96.47.95.121 -DCS335 185.206.145.2 DCS336 23.226.233.133 -DCS339 198.98.53.247 DCS345 45.62.237.34 -DCS357 52.39.82.54 +DCS352 35.230.162.146 +DCS358 93.152.167.4 DCS359 94.156.172.213 DCS360 222.229.25.105 +DCS364 159.65.231.53 DCS365 59.139.141.204 DCS370 188.213.168.24 DCS371 212.237.8.77 -DCS373 101.143.25.116 +DCS373 58.189.49.139 DCS374 61.195.108.146 DCS376 75.145.119.225 +DCS379 104.218.36.162 DCS380 160.16.65.39 -DCS382 211.131.185.61 +DCS382 211.131.19.200 DCS388 138.197.67.52 -DCS389 106.70.187.224 +DCS389 106.71.198.27 DCS390 149.7.214.253 +DCS393 139.91.200.186 +DCS399 185.227.110.247 DCS400 13.58.192.185 DCS404 91.229.143.187 -DCS410 166.78.156.246 +DCS410 166.78.145.146 +DCS411 82.171.119.45 DCS412 61.195.107.113 +DCS420 174.138.113.116 +DCS421 118.189.181.236 DCS431 61.195.98.225 DCS433 217.160.22.17 DCS434 51.254.128.134 -DCS440 114.161.161.90 +DCS440 153.133.72.142 DCS441 203.137.99.110 DCS444 188.68.37.51 DCS449 159.89.183.117 DCS450 64.137.224.233 -DCS454 221.125.255.216 +DCS454 168.70.74.137 +DCS455 208.71.169.83 DCS456 54.37.204.187 DCS464 52.192.129.174 DCS470 104.49.29.243 DCS477 139.162.213.89 +DCS479 198.58.106.10 DCS486 51.255.172.249 DCS499 203.137.76.22 -DCS500 172.104.32.192 -DCS502 190.148.222.28 -DCS505 110.141.219.161 +DCS500 58.96.21.253 +DCS501 198.211.98.63 +DCS502 104.143.94.48 +DCS505 45.248.50.37 +DCS506 121.200.19.211 DCS508 185.188.4.15 -DCS511 84.52.159.10 -DCS515 133.130.114.45 +DCS511 213.172.232.13 +DCS515 203.137.78.35 DCS518 176.9.1.168 DCS519 167.114.104.65 DCS520 119.59.125.192 DCS521 150.129.184.54 DCS522 14.102.146.160 -DCS525 176.65.95.90 -DCS538 133.218.172.211 +DCS525 80.211.68.38 +DCS530 116.251.193.99 +DCS538 124.41.76.58 DCS544 210.131.32.240 -DCS550 94.177.240.69 +DCS550 89.36.222.146 +DCS551 182.167.49.77 DCS554 52.35.183.178 -DCS555 64.137.186.11 -DCS567 212.91.156.69 +DCS555 210.86.135.13 DCS569 203.137.111.98 -DCS583 116.70.242.224 -DCS595 175.179.56.111 +DCS583 183.76.149.208 +DCS587 68.32.126.21 +DCS595 220.146.23.42 +DCS599 203.137.118.190 DCS600 13.69.14.204 DCS601 51.141.52.193 DCS602 212.56.100.200 -DCS603 216.10.169.35 +DCS603 216.246.155.99 +DCS604 139.162.241.24 +DCS605 183.76.179.238 DCS608 219.122.253.83 DCS610 89.186.80.81 -DCS626 202.137.244.157 -DCS634 61.199.25.130 +DCS613 198.50.202.39 +DCS619 167.99.168.82 +DCS626 45.77.234.162 +DCS627 121.75.75.200 +DCS634 180.46.54.237 DCS655 146.64.235.19 -DCS666 54.144.216.63 +DCS666 86.188.14.232 DCS673 180.147.243.178 DCS684 212.237.17.83 DCS689 97.107.128.47 -DCS698 85.197.129.86 DCS699 82.102.5.239 -DCS700 78.47.222.93 DCS701 61.195.107.77 DCS703 61.195.98.254 +DCS704 150.66.34.110 DCS706 93.186.255.126 DCS707 90.145.156.196 DCS708 202.218.37.62 DCS709 212.237.34.32 -DCS711 212.237.18.27 -DCS712 180.11.74.19 -DCS714 85.214.119.76 +DCS712 124.86.129.12 +DCS713 218.251.63.99 +DCS714 81.169.140.163 DCS717 44.137.70.100 -DCS722 80.211.2.161 -DCS724 66.55.64.14 -DCS730 186.64.123.59 +DCS724 189.20.209.70 +DCS725 172.245.9.180 DCS732 190.159.68.105 DCS733 45.56.117.158 -DCS735 104.131.81.32 DCS737 195.130.75.246 DCS740 173.208.200.180 +DCS741 203.137.78.41 DCS746 178.254.34.44 -DCS747 87.147.133.4 -DCS748 64.137.197.36 +DCS747 93.209.36.152 +DCS749 45.77.102.203 +DCS750 203.86.206.49 +DCS751 203.118.145.79 DCS752 66.154.105.195 DCS755 178.22.148.229 +DCS757 43.229.63.42 +DCS762 129.21.36.65 DCS766 201.62.48.61 +DCS768 80.211.199.231 +DCS770 153.126.173.9 DCS773 94.177.175.230 -DCS775 149.202.61.17 -DCS776 218.221.163.75 +DCS776 218.221.181.241 DCS777 194.182.66.76 DCS781 101.143.242.199 DCS787 46.41.1.96 DCS789 45.33.119.142 DCS794 101.143.242.95 +DCS800 87.252.188.119 DCS801 213.47.71.17 -DCS803 77.117.38.125 -DCS806 92.105.198.59 +DCS803 77.116.56.123 +DCS806 178.198.23.201 DCS808 18.220.252.27 +DCS809 78.46.11.69 DCS810 64.137.238.189 DCS812 203.145.233.141 DCS813 97.76.81.165 +DCS817 18.235.96.93 DCS828 195.225.116.244 DCS844 137.226.79.122 DCS850 88.198.94.77 -DCS860 80.81.9.242 -DCS870 103.3.234.95 +DCS860 24.134.86.93 +DCS866 46.93.204.84 DCS878 203.137.123.113 -DCS883 153.185.38.99 +DCS883 153.179.226.85 DCS886 118.163.103.178 DCS887 118.163.103.177 -DCS888 95.239.164.147 -DCS893 103.235.127.147 +DCS888 46.18.142.169 +DCS893 104.223.59.212 DCS900 94.177.237.192 DCS903 80.211.29.226 +DCS904 211.14.169.215 DCS906 212.237.11.53 -DCS907 88.11.249.48 +DCS907 176.84.168.11 DCS908 92.222.23.124 DCS909 216.86.147.198 -DCS910 94.177.207.26 -DCS911 5.196.73.89 +DCS911 178.128.118.127 DCS912 80.211.1.143 +DCS915 72.28.30.93 DCS919 80.211.232.174 DCS921 44.143.184.83 DCS922 81.150.10.62 DCS925 90.255.232.101 DCS929 158.69.166.132 DCS930 94.177.160.5 -DCS931 71.120.181.98 +DCS931 68.131.30.206 DCS933 164.132.104.167 -DCS935 188.213.166.199 DCS940 202.218.37.121 DCS944 202.218.34.210 -DCS945 155.94.147.186 +DCS945 213.202.229.40 DCS950 158.64.26.134 +DCS951 18.188.166.109 DCS964 52.173.142.244 -DCS972 46.121.158.50 +DCS966 203.150.19.24 +DCS969 142.93.46.36 +DCS970 157.7.221.186 DCS973 211.14.169.43 DCS974 94.177.217.52 -DCS975 176.31.161.9 DCS986 81.89.102.160 DCS987 185.32.183.148 +DCS988 80.211.236.189 DCS989 50.27.131.75 DCS990 35.164.237.63 -DCS991 2.237.27.66 -DCS995 158.69.201.255 +DCS991 80.211.19.121 +DCS994 35.177.233.106 DCS996 47.104.177.248 DCS997 94.177.187.40 DCS998 44.140.236.20 From e0812c165b13b6ac9c6c11027b48ff125ff3e9bf Mon Sep 17 00:00:00 2001 From: EA3HKB Date: Tue, 8 Jan 2019 20:13:24 +0100 Subject: [PATCH 092/166] Update DExtra_Hosts.txt Update from pi-star.uk Change ip's for XRF017 and XRF14 and others --- Data/DExtra_Hosts.txt | 593 ++++++++++++++++++++---------------------- 1 file changed, 279 insertions(+), 314 deletions(-) diff --git a/Data/DExtra_Hosts.txt b/Data/DExtra_Hosts.txt index 95bd1bd..6b03a3d 100644 --- a/Data/DExtra_Hosts.txt +++ b/Data/DExtra_Hosts.txt @@ -1,374 +1,339 @@ -XRF000 000.xreflector.org -XRF001 xlx001.homepc.it -XRF002 xrf002.dstar.club -XRF003 xlx003.xrefl.net -XRF004 xrf004.kb8zgl.net -XRF005 216.16.240.236 -XRF006 xrf006.xrefl.net -XRF007 82.223.18.138 -XRF008 xrf008.kingsofdigital.net -XRF009 www.hamtalk.net +XRF000 23.111.174.198 +XRF001 77.57.24.143 +XRF002 140.82.62.162 +XRF003 173.199.124.183 +XRF004 44.103.34.3 +XRF005 87.117.229.174 +XRF006 34.213.176.201 +XRF007 212.227.203.37 +XRF008 45.77.153.132 XRF010 85.197.129.86 XRF011 81.95.126.168 -XRF012 xrf012.papasys.com -XRF013 34.213.176.201 -XRF014 xrf014.iz0rin.it +XRF012 194.38.140.205 +XRF014 110.232.113.108 XRF015 213.202.228.119 -XRF016 xrf016.ampr.at -XRF017 92.177.212.64 -XRF018 99.167.129.166 -XRF019 46.28.108.233 -XRF020 xlx020.iz7auh.net -XRF021 44.103.32.250 -XRF022 xrf022.tms-it.net -XRF023 xlx023.dtdns.net -XRF024 xrf024.dstar.at +XRF017 85.214.78.198 +XRF019 31.7.247.58 +XRF022 83.137.45.98 +XRF024 94.199.173.123 XRF025 89.38.150.252 XRF026 65.175.188.230 -XRF027 194.116.29.78 -XRF028 stn028.dstar.be XRF029 80.123.238.76 -XRF030 xrf030.oe3xht.at -XRF032 xlx032.epf.lu -XRF033 46.226.178.81 -XRF035 xrf035.wa7dre.org -XRF036 xlx036.macasoft.it -XRF037 185.58.193.163 -XRF038 66.6.171.228 +XRF030 194.59.177.44 +XRF032 158.64.26.140 +XRF033 46.226.178.81 +XRF035 45.79.94.184 +XRF038 5.249.151.111 XRF039 31.14.142.119 -XRF040 xrf040.dyndns.org -XRF041 167.88.37.80 -XRF042 xrf042.luthienstar.fr -XRF044 82.1.185.173 -XRF045 45.62.233.223 -XRF046 xlx.c4fm.se -XRF047 xlx047.ddns.net -XRF048 xrf048.n5uxt.org -XRF049 212.71.234.224 -XRF050 dstar.emcomspain.xreflector.es +XRF040 109.71.45.29 +XRF046 176.10.140.161 +XRF047 202.171.147.58 +XRF049 212.71.234.224 +XRF050 80.211.155.206 XRF051 93.186.254.219 -XRF052 xrf052.dip.jp -XRF053 xlx.grvdc.eu +XRF052 121.119.96.205 +XRF053 185.97.120.120 XRF054 52.86.180.251 -XRF055 dstar.zzux.com -XRF056 xrf056.homepc.it -XRF057 xlx057.ddns.net -XRF058 xrf058.dip.jp +XRF055 52.80.4.154 +XRF057 74.193.217.15 +XRF058 118.110.251.54 XRF059 18.219.32.21 -XRF060 212.237.36.181 -XRF061 68.115.205.110 -XRF062 xlx.maryland-dstar.net -XRF063 162.248.141.148 -XRF064 xrf064.owari.biz -XRF065 212.237.53.67 -XRF066 xlx066.homepc.it -XRF068 xrf068.ircddb.it -XRF070 xrf070.iptime.org -XRF071 xrf.elechomebrew.com -XRF073 147.102.7.34 -XRF074 xrf074.dyndns.org -XRF075 5.135.162.136 -XRF076 xrf076.xreflector-jp.org -XRF077 xrf077.duckdns.org -XRF078 xlx.grvdc.eu -XRF079 xlx079.dvham.com -XRF080 jr3vh.dip.jp -XRF081 jr3vh.dip.jp -XRF085 jr1ofp.dip.jp -XRF086 52.80.139.252 -XRF088 xrf088.pa4tw.nl +XRF060 212.237.36.181 +XRF064 122.222.1.50 +XRF067 77.229.104.173 +XRF068 92.222.145.202 +XRF071 211.60.41.185 +XRF072 75.60.237.17 +XRF074 212.237.211.82 +XRF076 203.137.116.117 +XRF077 216.21.9.156 +XRF078 109.15.57.11 +XRF080 121.81.128.207 +XRF081 121.82.151.243 +XRF083 185.205.210.217 +XRF085 113.150.26.8 +XRF087 44.137.36.209 +XRF088 194.109.192.235 XRF089 194.109.192.236 XRF090 91.92.136.252 -XRF092 212.237.30.36 -XRF095 xrf095.xreflector-jp.org -XRF098 xrf098.dip.jp -XRF099 xlx099.iz7auh.net -XRF100 xlx100.xlxreflector.org -XRF101 xlx101.xlxreflector.org -XRF102 xlx102.xlxreflector.org -XRF103 xlx103.xlxreflector.org -XRF104 xlx104.xlxreflector.org -XRF105 51.254.99.78 -XRF109 xrf109.tokyo -XRF110 xrf110.xreflector-jp.org -XRF111 xrf111.xreflector-jp.org -XRF112 112.xreflector.es -XRF113 212.227.202.198 +XRF093 82.51.162.200 +XRF095 203.137.76.53 +XRF097 80.211.154.173 +XRF098 203.136.233.165 +XRF099 80.211.27.75 +XRF100 45.62.233.223 +XRF101 64.137.236.164 +XRF102 23.111.174.196 +XRF103 64.137.224.126 +XRF104 23.111.174.197 +XRF105 51.254.99.78 +XRF109 182.168.128.138 +XRF110 150.7.164.10 +XRF111 61.195.96.160 +XRF112 94.177.235.81 +XRF113 151.12.36.103 XRF114 5.135.188.16 -XRF115 reflector-xlx.hb9vd.ch -XRF116 31.185.101.211 -XRF118 xlx118.ns0.it -XRF119 xlx119.dvham.com +XRF115 217.182.128.3 +XRF118 5.249.148.252 +XRF119 125.129.207.86 XRF120 81.150.10.63 XRF121 174.37.249.156 -XRF123 213.126.90.100 -XRF124 xrf124.xreflector-jp.org -XRF125 xlx125.dyndns.hu -XRF129 guwgw.cir-ins.com +XRF124 211.14.169.234 +XRF125 213.181.208.52 +XRF129 220.209.106.220 XRF130 194.59.177.45 -XRF131 xlx131.pe1er.nl -XRF132 xrf132.dstar.radom.pl -XRF133 xrf133.gb7de.co.uk -XRF134 159.89.176.86 +XRF131 80.127.118.226 +XRF132 91.203.55.87 +XRF135 74.208.214.69 +XRF140 95.211.211.145 XRF145 178.59.23.138 -XRF146 xlx146.ddns.net XRF147 46.41.1.127 XRF150 80.211.10.212 -XRF170 dvham.mooo.com -XRF171 xrf171.dvham.com -XRF180 xlx180.warn.org +XRF158 150.66.16.176 +XRF160 61.195.109.179 +XRF170 210.178.113.173 +XRF171 210.178.113.123 +XRF175 162.248.92.25 +XRF180 192.241.240.7 +XRF185 89.106.108.151 XRF199 153.126.179.214 -XRF200 185.203.119.158 -XRF202 148.251.122.251 -XRF204 xlx204.ph0dv.nl +XRF204 85.214.126.111 XRF206 193.190.240.227 -XRF208 xlx208.f5kav.org -XRF210 210.xreflector.org -XRF212 xlx212.dstar.club -XRF214 xlx214.sustrai.org -XRF215 185.87.96.172 +XRF208 151.80.155.39 +XRF210 64.137.224.107 +XRF212 52.38.90.188 +XRF214 185.47.129.230 XRF216 74.214.25.135 -XRF220 xlx220.sapotech.com +XRF220 124.41.83.11 XRF222 212.43.96.84 -XRF223 208.73.201.157 -XRF224 xrf224.xreflector-jp.org -XRF226 xrf226.hamnet.ro -XRF228 212.237.33.114 -XRF229 194.191.4.54 -XRF230 ref.dstar.cz -XRF232 xrf232.tms-it.net -XRF233 xlx233.f1smf.com -XRF235 5.150.254.97 -XRF238 172.104.239.219 -XRF241 151.80.158.227 -XRF242 xrf242.k7edw.com -XRF246 xlx.mkagawa.com -XRF248 xrf248.dyndns.org -XRF250 xrf250.dstar.su -XRF252 je7zbu.jpn.ph -XRF255 xrf255.reflector.up4dar.de -XRF262 xrf262.reflector.up4dar.de +XRF224 203.137.99.97 +XRF226 2.226.183.226 +XRF227 89.33.44.100 +XRF228 83.77.104.52 +XRF229 194.191.4.54 +XRF230 80.250.3.114 +XRF232 89.185.97.35 +XRF241 151.80.158.227 +XRF242 73.14.84.43 +XRF246 172.93.48.159 +XRF255 142.91.158.199 +XRF258 75.60.237.19 +XRF262 92.192.107.54 XRF263 85.214.193.146 XRF264 52.2.131.118 -XRF265 51.255.43.60 -XRF266 212.237.51.82 +XRF266 212.237.51.82 XRF268 194.38.140.204 -XRF270 xrf270.reflector.up4dar.de -XRF275 xrf275.dyndns.org -XRF277 xlx277.dyndns.org -XRF282 xrf282.dip.jp -XRF284 95.158.165.32 -XRF288 99.108.210.100 -XRF290 94.176.6.45 -XRF291 xrf291.xreflector-jp.org -XRF295 xrf295.dyndns.org -XRF298 xrf298.dip.jp -XRF299 xlx299.zl2ro.nz -XRF300 300.xreflector.org -XRF302 xlx302.hopto.org -XRF307 xlx307.ddns.net -XRF310 xrf310.xrefl.net -XRF311 xrf311.ernix.de -XRF313 xlx313.openstd.net -XRF315 65.101.7.50 +XRF270 158.64.26.132 +XRF272 200.231.36.188 +XRF284 95.158.165.32 +XRF287 43.245.172.2 +XRF290 44.182.7.20 +XRF291 101.143.242.189 +XRF298 220.144.59.222 +XRF299 203.86.194.92 +XRF300 45.62.244.43 +XRF302 144.217.241.23 +XRF303 75.70.52.143 +XRF305 145.239.116.57 +XRF307 72.21.76.154 +XRF310 52.11.207.121 +XRF311 78.47.206.12 +XRF312 192.241.160.183 +XRF313 34.213.108.164 +XRF315 65.101.7.50 XRF317 44.48.8.15 -XRF321 vps.makeitrad.com -XRF328 cisarbasel.ddns.net +XRF321 31.207.110.45 +XRF328 212.237.33.114 +XRF329 114.181.139.32 +XRF330 18.222.199.205 XRF332 188.213.168.99 -XRF333 xrf333.f1smf.com +XRF333 194.116.29.73 XRF334 96.47.95.121 -XRF335 185.206.145.2 XRF336 23.226.233.133 -XRF339 xlx339.avarc.ca -XRF345 xrf345.dyndns.org -XRF353 94.173.206.53 -XRF357 xlx357.w6kd.com +XRF345 45.62.237.34 +XRF352 35.230.162.146 +XRF358 93.152.167.4 XRF359 94.156.172.213 -XRF360 xrf360.dip.jp -XRF365 xrf365.dip.jp -XRF370 xrf370.selfip.com -XRF371 xlx371.selfip.com -XRF373 101.143.25.116 -XRF374 xrf374.xreflector-jp.org +XRF360 222.229.25.105 +XRF364 159.65.231.53 +XRF365 59.139.141.204 +XRF370 188.213.168.24 +XRF371 212.237.8.77 +XRF373 58.189.49.139 +XRF374 61.195.108.146 XRF376 75.145.119.225 -XRF379 184.23.183.98 -XRF380 kdk.ddns.net -XRF382 xrf382.pgw.jp -XRF387 195.130.59.77 +XRF379 104.218.36.162 +XRF380 160.16.65.39 +XRF382 211.131.19.200 XRF388 138.197.67.52 -XRF389 106.71.83.168 +XRF389 106.71.198.27 XRF390 149.7.214.253 -XRF398 104.167.117.71 -XRF400 xlx400.iz7auh.net -XRF404 xlx.bendiksverden.net -XRF410 166.78.156.246 -XRF412 xrf412.dip.jp -XRF420 kc9qen.com -XRF423 4ix.hacktic.de -XRF431 xrf431.xreflector-jp.org -XRF433 xrf433.de -XRF434 51.254.128.134 -XRF438 80.211.189.236 -XRF440 xrf440.e-kyushu.net -XRF441 xrf441.xreflector-jp.org -XRF443 xrf443.arisondrio.it -XRF444 xlx444.pa3dfn.nl -XRF449 159.89.183.117 -XRF450 450.xreflector.org -XRF454 42.2.222.178 -XRF456 xrf456.de +XRF393 139.91.200.186 +XRF399 185.227.110.247 +XRF400 13.58.192.185 +XRF404 91.229.143.187 +XRF410 166.78.145.146 +XRF411 82.171.119.45 +XRF412 61.195.107.113 +XRF420 174.138.113.116 +XRF421 118.189.181.236 +XRF431 61.195.98.225 +XRF433 217.160.22.17 +XRF434 51.254.128.134 +XRF440 153.133.72.142 +XRF441 203.137.99.110 +XRF444 188.68.37.51 +XRF449 159.89.183.117 +XRF450 64.137.224.233 +XRF454 168.70.74.137 +XRF455 208.71.169.83 +XRF456 54.37.204.187 XRF464 52.192.129.174 XRF470 104.49.29.243 XRF477 139.162.213.89 -XRF486 xlx486.iz8gur.it -XRF499 xrf499.xreflector-jp.org -XRF500 125.63.57.138 -XRF501 104.130.72.187 -XRF502 74.208.88.137 -XRF505 110.141.219.161 +XRF479 198.58.106.10 +XRF486 51.255.172.249 +XRF499 203.137.76.22 +XRF500 58.96.21.253 +XRF501 198.211.98.63 +XRF502 104.143.94.48 +XRF505 45.248.50.37 +XRF506 121.200.19.211 XRF508 185.188.4.15 -XRF510 xrf510.s56g.net -XRF511 xlx511.ddns.net -XRF515 133.130.114.45 -XRF518 xrf518.n18.de -XRF519 24.55.196.105 +XRF511 213.172.232.13 +XRF515 203.137.78.35 +XRF518 176.9.1.168 +XRF519 167.114.104.65 XRF520 119.59.125.192 XRF521 150.129.184.54 -XRF523 175.141.51.82 -XRF525 176.65.95.90 -XRF538 xrf538.dip.jp -XRF544 xlx544.ddns.net -XRF550 550.xreflector.es +XRF522 14.102.146.160 +XRF525 80.211.68.38 +XRF530 116.251.193.99 +XRF538 124.41.76.58 +XRF544 210.131.32.240 +XRF550 89.36.222.146 +XRF551 182.167.49.77 XRF554 52.35.183.178 -XRF555 xrf555.w6kd.com -XRF556 xrf556.w6kd.com -XRF567 212.91.156.69 -XRF569 xlxreflector.jpn.ph -XRF570 104.128.230.153 -XRF573 216.189.148.204 -XRF580 67.20.31.79 -XRF583 183.76.149.117 +XRF555 210.86.135.13 +XRF569 203.137.111.98 +XRF583 183.76.149.208 XRF587 68.32.126.21 -XRF595 hamradio.dip.jp +XRF595 220.146.23.42 XRF599 203.137.118.190 -XRF600 xrf600.gb7de.co.uk +XRF600 13.69.14.204 XRF601 51.141.52.193 XRF602 212.56.100.200 -XRF603 xlx603.cnharc.org -XRF608 xrf608.dip.jp -XRF610 xrf610.vkradio.com -XRF626 626.nz -XRF634 xrf634.dip.jp -XRF655 146.64.235.19 -XRF666 vpngrf.webandcloud.net -XRF673 xrf673.xreflector-jp.org -XRF684 212.237.17.83 +XRF603 216.246.155.99 +XRF604 139.162.241.24 +XRF605 183.76.179.238 +XRF608 219.122.253.83 +XRF610 89.186.80.81 +XRF613 198.50.202.39 +XRF619 167.99.168.82 +XRF626 45.77.234.162 +XRF627 121.75.75.200 +XRF634 180.46.54.237 +XRF655 146.64.235.19 +XRF666 86.188.14.232 +XRF673 180.147.243.178 +XRF684 212.237.17.83 XRF689 97.107.128.47 -XRF699 xlx.tekniksnack.se -XRF700 xrf700.d-star.se -XRF701 xrf701.xreflector-jp.org +XRF699 82.102.5.239 +XRF701 61.195.107.77 XRF703 61.195.98.254 -XRF706 xlx706.iz0rin.it -XRF707 xrf707.openquad.net -XRF708 xrf708.xreflector-jp.org +XRF704 150.66.34.110 +XRF706 93.186.255.126 +XRF707 90.145.156.196 +XRF708 202.218.37.62 XRF709 212.237.34.32 -XRF710 oe7mfi.ddns.net -XRF711 212.237.18.27 -XRF712 180.11.74.19 -XRF714 85.214.119.76 -XRF715 xlx715.ea3hkb.net -XRF716 xlx716.duckdns.org -XRF717 44.137.70.100 -XRF719 199.227.117.121 -XRF720 xrf720.freestar.us -XRF722 722.xreflector.es -XRF724 xlx.dvbrazil.com.br -XRF727 w4icy.inerrantenergy.com -XRF730 186.64.123.59 -XRF732 xlx.hk4km.co -XRF733 45.56.117.158 -XRF735 104.131.81.32 +XRF712 124.86.129.12 +XRF713 218.251.63.99 +XRF714 81.169.140.163 +XRF717 44.137.70.100 +XRF724 189.20.209.70 +XRF725 172.245.9.180 +XRF732 190.159.68.105 +XRF733 45.56.117.158 XRF737 195.130.75.246 -XRF740 104.167.114.230 +XRF740 173.208.200.180 +XRF741 203.137.78.41 XRF746 178.254.34.44 -XRF747 xrf747.de -XRF748 xrf748.dyndns.org -XRF752 xlx752.zl2wl.nz -XRF755 xlx.radioamateur.tk -XRF757 xrf757.openquad.net -XRF766 xlx.amrase.org.br -XRF767 xrf767.de -XRF773 xrf773.iz0rin.it -XRF775 149.202.61.17 -XRF776 xlx776.tokyo -XRF777 112.218.40.91 -XRF781 xrf781.xreflector-jp.org -XRF787 xrf787.de +XRF747 93.209.36.152 +XRF749 45.77.102.203 +XRF750 203.86.206.49 +XRF751 203.118.145.79 +XRF752 66.154.105.195 +XRF755 178.22.148.229 +XRF757 43.229.63.42 +XRF762 129.21.36.65 +XRF766 201.62.48.61 +XRF768 80.211.199.231 +XRF770 153.126.173.9 +XRF773 94.177.175.230 +XRF776 218.221.181.241 +XRF777 194.182.66.76 +XRF781 101.143.242.199 +XRF787 46.41.1.96 XRF789 45.33.119.142 -XRF794 xrf794.xreflector-jp.org -XRF801 f4hin.fr -XRF803 77.117.77.117 -XRF806 92.105.198.59 -XRF807 hajikko.iobb.net -XRF808 xrf808.n5wls.net -XRF810 810.xreflector.org -XRF812 xrf812.xreflector-jp.org -XRF813 xlx.inerrantenergy.com -XRF828 xlx828.ddnss.de +XRF794 101.143.242.95 +XRF800 87.252.188.119 +XRF801 213.47.71.17 +XRF803 77.116.56.123 +XRF806 178.198.23.201 +XRF808 18.220.252.27 +XRF809 78.46.11.69 +XRF810 64.137.238.189 +XRF812 203.145.233.141 +XRF813 97.76.81.165 +XRF817 18.235.96.93 +XRF828 195.225.116.244 XRF844 137.226.79.122 -XRF850 xrf850.xrfmaster.net -XRF851 xrf851.rsdt.de -XRF858 xrf858.ke0lmx.net -XRF860 xrf.njpaasterisk.org -XRF870 xrf870.ddns.net -XRF878 xrf878.xreflector-jp.org -XRF880 176.10.105.211 -XRF883 xrf883.dip.jp -XRF886 xrf886.metropit.net +XRF850 88.198.94.77 +XRF860 24.134.86.93 +XRF866 46.93.204.84 +XRF878 203.137.123.113 +XRF883 153.179.226.85 +XRF886 118.163.103.178 XRF887 118.163.103.177 -XRF888 xlx888.ns0.it -XRF893 103.235.127.147 -XRF900 94.177.237.192 -XRF901 xrf901.dyndns.org -XRF902 xrf902.dyndns.org -XRF903 80.211.29.226 -XRF905 199.212.121.20 -XRF906 xrf906.radioclubveleta.es -XRF907 xlx907.ddns.net -XRF908 92.222.23.124 -XRF909 www.ealink.es -XRF910 92.177.212.64 -XRF911 5.196.73.89 +XRF888 46.18.142.169 +XRF893 104.223.59.212 +XRF900 94.177.237.192 +XRF903 80.211.29.226 +XRF904 211.14.169.215 +XRF906 212.237.11.53 +XRF907 176.84.168.11 +XRF908 92.222.23.124 +XRF909 216.86.147.198 +XRF911 178.128.118.127 XRF912 80.211.1.143 +XRF915 72.28.30.93 XRF919 80.211.232.174 -XRF920 xrf920.oe7xxr.ampr.at -XRF921 xlx921.oe7xxr.ampr.at -XRF922 xrf922.mb6er.com +XRF921 44.143.184.83 +XRF922 81.150.10.62 XRF925 90.255.232.101 -XRF929 xrf929.ddns.net -XRF930 xreflector.ddns.net -XRF931 xref.kw4yb.com +XRF929 158.69.166.132 +XRF930 94.177.160.5 +XRF931 68.131.30.206 XRF933 164.132.104.167 -XRF935 xlx935.ddns.net -XRF940 xrf940.xreflector-jp.org -XRF944 xrf944.xreflector-jp.org -XRF945 xlx945.xreflector.es -XRF950 xlx950.epf.lu -XRF960 80.211.226.89 +XRF940 202.218.37.121 +XRF944 202.218.34.210 +XRF945 213.202.229.40 +XRF950 158.64.26.134 +XRF951 18.188.166.109 XRF964 52.173.142.244 -XRF972 46.121.158.50 -XRF973 xrf973.xreflector-jp.org -XRF974 xlx974.dynu.net -XRF975 176.31.161.9 -XRF976 212.237.36.71 +XRF966 203.150.19.24 +XRF969 142.93.46.36 +XRF970 157.7.221.186 +XRF973 211.14.169.43 +XRF974 94.177.217.52 XRF986 81.89.102.160 -XRF987 xrf987.metro-uhf.org -XRF988 988.xreflector.es -XRF989 xrf989.bbhill.net +XRF987 185.32.183.148 +XRF988 80.211.236.189 +XRF989 50.27.131.75 XRF990 35.164.237.63 -XRF991 91.92.136.118 -XRF995 xlx995.ddns.net -XRF996 47.104.177.248 -XRF997 xrf997.iw2gob.it -XRF998 xlx.sm7.hamnet.nu -XRF999 xrf999.no-ip.org +XRF991 80.211.19.121 +XRF994 35.177.233.106 +XRF996 47.104.177.248 +XRF997 94.177.187.40 +XRF998 44.140.236.20 +XRF999 94.177.173.53 From 5d5a26a3019701cab087a6de704fbe313279a9eb Mon Sep 17 00:00:00 2001 From: EA3HKB Date: Tue, 8 Jan 2019 20:19:49 +0100 Subject: [PATCH 093/166] Update DPlus_Hosts.txt Update from pi-star.uk Change ip's for REF017 and REF714 and others. --- Data/DPlus_Hosts.txt | 329 ++++++++++++++++++++++--------------------- 1 file changed, 168 insertions(+), 161 deletions(-) diff --git a/Data/DPlus_Hosts.txt b/Data/DPlus_Hosts.txt index d1bb121..476a60d 100644 --- a/Data/DPlus_Hosts.txt +++ b/Data/DPlus_Hosts.txt @@ -4,333 +4,340 @@ # Please report issues at https://www.facebook.com/groups/pistar/ # File created at Tuesday 10th of July 2018 08:12:16 PM BST REF000 23.111.174.198 -REF001 104.237.157.7 -REF002 129.93.2.132 -REF003 203.194.18.195 -REF004 74.204.50.19 -REF005 192.3.202.53 -REF006 78.158.56.61 -REF007 208.111.3.180 -REF008 58.12.161.10 -REF009 204.89.198.18 -REF010 12.178.74.6 -REF011 195.78.217.101 -REF012 209.112.244.26 -REF013 109.69.104.195 -REF014 64.250.229.185 -REF015 109.69.104.196 -REF016 67.210.212.136 -REF017 80.69.86.233 -REF018 187.50.254.20 -REF019 209.242.228.27 -REF020 50.199.88.20 -REF021 192.3.202.54 -REF022 52.32.64.78 -REF023 103.1.213.18 -REF024 69.41.0.15 -REF025 107.161.29.191 -REF026 206.12.104.8 -REF027 194.116.29.72 -REF028 193.190.240.229 -REF029 129.123.3.6 -REF030 18.221.55.237 -REF031 79.136.93.241 -REF032 95.160.56.46 -REF033 208.67.255.202 -REF034 74.81.71.218 -REF035 146.129.247.243 -REF036 195.194.238.109 -REF037 208.111.3.181 -REF038 66.6.171.227 -REF039 208.93.191.20 -REF040 94.46.216.197 -REF041 129.105.15.195 -REF042 151.249.104.38 -REF043 176.10.140.189 -REF044 208.43.162.89 -REF045 195.251.201.214 -REF046 208.111.3.182 -REF047 157.7.142.13 -REF048 208.88.66.244 -REF049 72.249.9.66 -REF050 75.147.26.195 -REF051 50.57.153.17 -REF052 12.5.239.46 -REF053 216.243.174.245 -REF054 52.86.120.0 -REF055 207.251.62.205 -REF056 45.56.113.164 -REF057 173.216.181.178 -REF058 131.204.255.253 -REF059 104.131.247.122 -REF060 50.194.6.1 -REF061 204.152.199.103 -REF062 70.88.145.165 -REF063 66.207.131.4 -REF064 61.195.99.81 -REF065 162.255.169.90 -REF066 173.255.196.45 -REF067 44.34.128.167 -REF068 92.222.145.197 -REF069 70.91.220.113 -REF070 44.10.10.20 -REF071 61.195.97.218 -REF072 96.92.65.12 -REF073 68.67.124.145 -REF074 68.67.124.146 -REF075 51.254.220.4 -REF076 203.137.112.200 -REF077 173.247.7.23 -REF078 204.15.204.154 -REF079 62.255.210.254 -REF080 82.223.13.53 -REF081 172.104.92.125 -REF082 106.240.237.114 -REF083 168.235.103.26 -REF084 51.254.120.143 -REF085 203.74.132.35 -REF086 216.126.220.245 +REF001 77.57.24.143 +REF002 140.82.62.162 +REF003 173.199.124.183 +REF004 44.103.34.3 +REF005 87.117.229.174 +REF006 34.213.176.201 +REF007 212.227.203.37 +REF008 45.77.153.132 +REF010 85.197.129.86 +REF011 81.95.126.168 +REF012 194.38.140.205 +REF014 110.232.113.108 +REF015 213.202.228.119 +REF017 85.214.78.198 +REF019 31.7.247.58 +REF022 83.137.45.98 +REF024 94.199.173.123 +REF025 89.38.150.252 +REF026 65.175.188.230 +REF029 80.123.238.76 +REF030 194.59.177.44 +REF032 158.64.26.140 +REF033 46.226.178.81 +REF035 45.79.94.184 +REF038 5.249.151.111 +REF039 31.14.142.119 +REF040 109.71.45.29 +REF046 176.10.140.161 +REF047 202.171.147.58 +REF049 212.71.234.224 +REF050 80.211.155.206 +REF051 93.186.254.219 +REF052 121.119.96.205 +REF053 185.97.120.120 +REF054 52.86.180.251 +REF055 52.80.4.154 +REF057 74.193.217.15 +REF058 118.110.251.54 +REF059 18.219.32.21 +REF060 212.237.36.181 +REF064 122.222.1.50 +REF067 77.229.104.173 +REF068 92.222.145.202 +REF071 211.60.41.185 +REF072 75.60.237.17 +REF074 212.237.211.82 +REF076 203.137.116.117 +REF077 216.21.9.156 +REF078 109.15.57.11 +REF080 121.81.128.207 +REF081 121.82.151.243 +REF083 185.205.210.217 +REF085 113.150.26.8 +REF087 44.137.36.209 REF088 194.109.192.235 REF089 194.109.192.236 REF090 91.92.136.252 -REF092 212.237.30.36 +REF093 82.51.162.200 REF095 203.137.76.53 -REF098 111.169.16.250 +REF097 80.211.154.173 +REF098 203.136.233.165 REF099 80.211.27.75 -REF101 45.62.213.101 +REF100 45.62.233.223 +REF101 64.137.236.164 REF102 23.111.174.196 REF103 64.137.224.126 REF104 23.111.174.197 REF105 51.254.99.78 -REF109 182.168.101.180 +REF109 182.168.128.138 REF110 150.7.164.10 REF111 61.195.96.160 +REF112 94.177.235.81 REF113 151.12.36.103 REF114 5.135.188.16 REF115 217.182.128.3 -REF116 31.185.101.211 REF118 5.249.148.252 REF119 125.129.207.86 REF120 81.150.10.63 REF121 174.37.249.156 -REF122 83.137.45.100 REF124 211.14.169.234 REF125 213.181.208.52 -REF129 219.116.28.227 +REF129 220.209.106.220 REF130 194.59.177.45 REF131 80.127.118.226 REF132 91.203.55.87 -REF134 159.89.176.86 +REF135 74.208.214.69 +REF140 95.211.211.145 REF145 178.59.23.138 REF147 46.41.1.127 REF150 80.211.10.212 +REF158 150.66.16.176 +REF160 61.195.109.179 REF170 210.178.113.173 -REF171 121.162.91.45 +REF171 210.178.113.123 +REF175 162.248.92.25 REF180 192.241.240.7 +REF185 89.106.108.151 REF199 153.126.179.214 -REF202 148.251.122.251 -REF204 185.85.18.162 +REF204 85.214.126.111 REF206 193.190.240.227 REF208 151.80.155.39 REF210 64.137.224.107 REF212 52.38.90.188 REF214 185.47.129.230 -REF215 185.87.96.172 REF216 74.214.25.135 REF220 124.41.83.11 REF222 212.43.96.84 REF224 203.137.99.97 -REF226 94.176.6.37 -REF228 188.60.43.206 +REF226 2.226.183.226 +REF227 89.33.44.100 +REF228 83.77.104.52 REF229 194.191.4.54 REF230 80.250.3.114 REF232 89.185.97.35 -REF235 5.150.254.97 -REF238 172.104.239.219 REF241 151.80.158.227 REF242 73.14.84.43 REF246 172.93.48.159 +REF255 142.91.158.199 +REF258 75.60.237.19 +REF262 92.192.107.54 REF263 85.214.193.146 REF264 52.2.131.118 REF266 212.237.51.82 REF268 194.38.140.204 REF270 158.64.26.132 -REF282 210.188.25.17 +REF272 200.231.36.188 REF284 95.158.165.32 -REF290 94.176.6.45 +REF287 43.245.172.2 +REF290 44.182.7.20 REF291 101.143.242.189 -REF295 64.137.160.185 -REF298 119.238.135.207 -REF299 125.236.227.43 +REF298 220.144.59.222 +REF299 203.86.194.92 REF300 45.62.244.43 REF302 144.217.241.23 +REF303 75.70.52.143 +REF305 145.239.116.57 REF307 72.21.76.154 REF310 52.11.207.121 +REF311 78.47.206.12 +REF312 192.241.160.183 REF313 34.213.108.164 REF315 65.101.7.50 REF317 44.48.8.15 REF321 31.207.110.45 REF328 212.237.33.114 +REF329 114.181.139.32 +REF330 18.222.199.205 REF332 188.213.168.99 REF333 194.116.29.73 REF334 96.47.95.121 -REF335 185.206.145.2 REF336 23.226.233.133 -REF339 198.98.53.247 REF345 45.62.237.34 -REF357 52.39.82.54 +REF352 35.230.162.146 +REF358 93.152.167.4 REF359 94.156.172.213 REF360 222.229.25.105 +REF364 159.65.231.53 REF365 59.139.141.204 REF370 188.213.168.24 REF371 212.237.8.77 -REF373 101.143.25.116 +REF373 58.189.49.139 REF374 61.195.108.146 REF376 75.145.119.225 +REF379 104.218.36.162 REF380 160.16.65.39 -REF382 211.131.185.61 +REF382 211.131.19.200 REF388 138.197.67.52 -REF389 106.70.187.224 +REF389 106.71.198.27 REF390 149.7.214.253 +REF393 139.91.200.186 +REF399 185.227.110.247 REF400 13.58.192.185 REF404 91.229.143.187 -REF410 166.78.156.246 +REF410 166.78.145.146 +REF411 82.171.119.45 REF412 61.195.107.113 +REF420 174.138.113.116 +REF421 118.189.181.236 REF431 61.195.98.225 REF433 217.160.22.17 REF434 51.254.128.134 -REF440 114.161.161.90 +REF440 153.133.72.142 REF441 203.137.99.110 REF444 188.68.37.51 REF449 159.89.183.117 REF450 64.137.224.233 -REF454 221.125.255.216 +REF454 168.70.74.137 +REF455 208.71.169.83 REF456 54.37.204.187 REF464 52.192.129.174 REF470 104.49.29.243 REF477 139.162.213.89 +REF479 198.58.106.10 REF486 51.255.172.249 REF499 203.137.76.22 -REF500 172.104.32.192 -REF502 190.148.222.28 +REF500 58.96.21.253 +REF501 198.211.98.63 +REF502 104.143.94.48 REF505 45.248.50.37 +REF506 121.200.19.211 REF508 185.188.4.15 -REF511 84.52.159.10 -REF515 133.130.114.45 +REF511 213.172.232.13 +REF515 203.137.78.35 REF518 176.9.1.168 REF519 167.114.104.65 REF520 119.59.125.192 REF521 150.129.184.54 REF522 14.102.146.160 -REF525 176.65.95.90 -REF538 133.218.172.211 +REF525 80.211.68.38 +REF530 116.251.193.99 +REF538 124.41.76.58 REF544 210.131.32.240 -REF550 94.177.240.69 +REF550 89.36.222.146 +REF551 182.167.49.77 REF554 52.35.183.178 -REF555 64.137.186.11 -REF567 212.91.156.69 +REF555 210.86.135.13 REF569 203.137.111.98 -REF583 116.70.242.224 -REF595 175.179.56.111 +REF583 183.76.149.208 +REF587 68.32.126.21 +REF595 220.146.23.42 +REF599 203.137.118.190 REF600 13.69.14.204 REF601 51.141.52.193 REF602 212.56.100.200 -REF603 216.10.169.35 +REF603 216.246.155.99 +REF604 139.162.241.24 +REF605 183.76.179.238 REF608 219.122.253.83 REF610 89.186.80.81 -REF626 202.137.244.157 -REF634 61.199.25.130 +REF613 198.50.202.39 +REF619 167.99.168.82 +REF626 45.77.234.162 +REF627 121.75.75.200 +REF634 180.46.54.237 REF655 146.64.235.19 -REF666 54.144.216.63 +REF666 86.188.14.232 REF673 180.147.243.178 REF684 212.237.17.83 REF689 97.107.128.47 -REF698 85.197.129.86 REF699 82.102.5.239 -REF700 78.47.222.93 REF701 61.195.107.77 REF703 61.195.98.254 +REF704 150.66.34.110 REF706 93.186.255.126 REF707 90.145.156.196 REF708 202.218.37.62 REF709 212.237.34.32 -REF711 212.237.18.27 -REF712 180.11.74.19 -REF714 85.214.119.76 +REF712 124.86.129.12 +REF713 218.251.63.99 +REF714 81.169.140.163 REF717 44.137.70.100 -REF722 80.211.2.161 -REF724 75.99.228.35 -REF730 186.64.123.59 +REF724 189.20.209.70 +REF725 172.245.9.180 REF732 190.159.68.105 REF733 45.56.117.158 -REF735 104.131.81.32 REF737 195.130.75.246 REF740 173.208.200.180 +REF741 203.137.78.41 REF746 178.254.34.44 -REF747 87.147.133.4 -REF748 64.137.197.36 +REF747 93.209.36.152 +REF749 45.77.102.203 +REF750 203.86.206.49 +REF751 203.118.145.79 REF752 66.154.105.195 REF755 178.22.148.229 +REF757 43.229.63.42 +REF762 129.21.36.65 REF766 201.62.48.61 +REF768 80.211.199.231 +REF770 153.126.173.9 REF773 94.177.175.230 -REF775 149.202.61.17 -REF776 218.221.163.75 +REF776 218.221.181.241 REF777 194.182.66.76 REF781 101.143.242.199 REF787 46.41.1.96 REF789 45.33.119.142 REF794 101.143.242.95 +REF800 87.252.188.119 REF801 213.47.71.17 -REF803 77.117.38.125 -REF806 92.105.198.59 +REF803 77.116.56.123 +REF806 178.198.23.201 REF808 18.220.252.27 +REF809 78.46.11.69 REF810 64.137.238.189 REF812 203.145.233.141 REF813 97.76.81.165 +REF817 18.235.96.93 REF828 195.225.116.244 REF844 137.226.79.122 REF850 88.198.94.77 -REF860 80.81.9.242 -REF870 103.3.234.95 +REF860 24.134.86.93 +REF866 46.93.204.84 REF878 203.137.123.113 -REF883 153.185.38.99 +REF883 153.179.226.85 REF886 118.163.103.178 REF887 118.163.103.177 -REF888 95.239.164.147 -REF893 103.235.127.147 +REF888 46.18.142.169 +REF893 104.223.59.212 REF900 94.177.237.192 REF903 80.211.29.226 +REF904 211.14.169.215 REF906 212.237.11.53 -REF907 88.11.249.48 +REF907 176.84.168.11 REF908 92.222.23.124 REF909 216.86.147.198 -REF910 94.177.207.26 -REF911 5.196.73.89 +REF911 178.128.118.127 REF912 80.211.1.143 +REF915 72.28.30.93 REF919 80.211.232.174 REF921 44.143.184.83 REF922 81.150.10.62 REF925 90.255.232.101 REF929 158.69.166.132 REF930 94.177.160.5 -REF931 71.120.181.98 +REF931 68.131.30.206 REF933 164.132.104.167 -REF935 188.213.166.199 REF940 202.218.37.121 REF944 202.218.34.210 -REF945 155.94.147.186 +REF945 213.202.229.40 REF950 158.64.26.134 +REF951 18.188.166.109 REF964 52.173.142.244 -REF972 46.121.158.50 +REF966 203.150.19.24 +REF969 142.93.46.36 +REF970 157.7.221.186 REF973 211.14.169.43 REF974 94.177.217.52 -REF975 176.31.161.9 REF986 81.89.102.160 REF987 185.32.183.148 +REF988 80.211.236.189 REF989 50.27.131.75 REF990 35.164.237.63 -REF991 2.237.27.66 -REF995 158.69.201.255 +REF991 80.211.19.121 +REF994 35.177.233.106 REF996 47.104.177.248 REF997 94.177.187.40 REF998 44.140.236.20 From fe42c30df04e755f12e74217bf45a34638e9c055 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Tue, 15 Jan 2019 08:02:57 +0000 Subject: [PATCH 094/166] Correct DCS014's IP address. --- Data/DCS_Hosts.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Data/DCS_Hosts.txt b/Data/DCS_Hosts.txt index 63945af..02894d3 100644 --- a/Data/DCS_Hosts.txt +++ b/Data/DCS_Hosts.txt @@ -16,7 +16,7 @@ DCS007 212.227.203.37 DCS010 85.197.129.86 DCS011 81.95.126.168 DCS012 194.38.140.205 -DCS014 110.232.113.108 +DCS014 52.63.223.130 DCS015 213.202.228.119 DCS017 85.214.78.198 DCS019 31.7.247.58 From d87d121c8df2f7e7b5c9b75ffd04a0fc3e83a3b5 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Tue, 15 Jan 2019 20:50:58 +0000 Subject: [PATCH 095/166] Revert "Merge pull request #16 from F4FXL/UDPHolePunching" This reverts commit cc2c68aff9116ffd3ccdb4698c8ed67550b692e2, reversing changes made to 05e66c15d190e547294b127bde31af6e9a915bd1. --- Common/CacheManager.cpp | 11 ++-- Common/CacheManager.h | 36 +++---------- Common/Common.vcxproj | 2 - Common/Common.vcxproj.filters | 6 --- Common/G2ProtocolHandler.cpp | 27 +++++----- Common/G2ProtocolHandler.h | 12 +++-- Common/GatewayCache.cpp | 43 ++------------- Common/GatewayCache.h | 29 +--------- Common/Makefile | 2 +- Common/NatTraversalHandler.cpp | 57 -------------------- Common/NatTraversalHandler.h | 77 --------------------------- Common/RepeaterHandler.cpp | 21 ++------ Common/RepeaterHandler.h | 1 - StarNetServer/StarNetServerThread.cpp | 16 +++--- ircDDBGateway/IRCDDBGatewayThread.cpp | 35 +++--------- ircDDBGateway/IRCDDBGatewayThread.h | 2 - 16 files changed, 53 insertions(+), 324 deletions(-) delete mode 100644 Common/NatTraversalHandler.cpp delete mode 100644 Common/NatTraversalHandler.h diff --git a/Common/CacheManager.cpp b/Common/CacheManager.cpp index 682ad58..7915d1b 100644 --- a/Common/CacheManager.cpp +++ b/Common/CacheManager.cpp @@ -54,7 +54,7 @@ CUserData* CCacheManager::findUser(const wxString& user) if (gr == NULL) return NULL; - return new CUserData(user, ur->getRepeater(), gr->getGateway(), gr->getAddress(), gr->getG2Port()); + return new CUserData(user, ur->getRepeater(), gr->getGateway(), gr->getAddress()); } CGatewayData* CCacheManager::findGateway(const wxString& gateway) @@ -65,7 +65,7 @@ CGatewayData* CCacheManager::findGateway(const wxString& gateway) if (gr == NULL) return NULL; - return new CGatewayData(gateway, gr->getAddress(), gr->getProtocol(), gr->getG2Port()); + return new CGatewayData(gateway, gr->getAddress(), gr->getProtocol()); } CRepeaterData* CCacheManager::findRepeater(const wxString& repeater) @@ -87,7 +87,7 @@ CRepeaterData* CCacheManager::findRepeater(const wxString& repeater) if (gr == NULL) return NULL; - return new CRepeaterData(repeater, gr->getGateway(), gr->getAddress(), gr->getProtocol(), gr->getG2Port()); + return new CRepeaterData(repeater, gr->getGateway(), gr->getAddress(), gr->getProtocol()); } void CCacheManager::updateUser(const wxString& user, const wxString& repeater, const wxString& gateway, const wxString& address, const wxString& timestamp, DSTAR_PROTOCOL protocol, bool addrLock, bool protoLock) @@ -126,8 +126,3 @@ void CCacheManager::updateGateway(const wxString& gateway, const wxString& addre m_gatewayCache.update(gateway, address, protocol, addrLock, protoLock); } - -void CCacheManager::updateGatewayG2(const wxString& gateway, const in_addr& address, unsigned int g2Port) -{ - m_gatewayCache.updateG2(gateway, address, g2Port); -} diff --git a/Common/CacheManager.h b/Common/CacheManager.h index dc38392..e8d669b 100644 --- a/Common/CacheManager.h +++ b/Common/CacheManager.h @@ -33,12 +33,11 @@ class CUserData { public: - CUserData(const wxString& user, const wxString& repeater, const wxString& gateway, in_addr address, unsigned int g2Port) : + CUserData(const wxString& user, const wxString& repeater, const wxString& gateway, in_addr address) : m_user(user), m_repeater(repeater), m_gateway(gateway), - m_address(address), - m_g2Port(g2Port) + m_address(address) { } @@ -62,27 +61,20 @@ public: return m_address; } - unsigned int getG2Port() const - { - return m_g2Port; - } - private: wxString m_user; wxString m_repeater; wxString m_gateway; in_addr m_address; - unsigned int m_g2Port; }; class CRepeaterData { public: - CRepeaterData(const wxString& repeater, const wxString& gateway, in_addr address, DSTAR_PROTOCOL protocol, unsigned int g2Port) : + CRepeaterData(const wxString& repeater, const wxString& gateway, in_addr address, DSTAR_PROTOCOL protocol) : m_repeater(repeater), m_gateway(gateway), m_address(address), - m_protocol(protocol), - m_g2Port(g2Port) + m_protocol(protocol) { } @@ -106,26 +98,19 @@ public: return m_protocol; } - unsigned int getG2Port() const - { - return m_g2Port; - } - private: wxString m_repeater; wxString m_gateway; in_addr m_address; DSTAR_PROTOCOL m_protocol; - unsigned int m_g2Port; }; class CGatewayData { public: - CGatewayData(const wxString& gateway, in_addr address, DSTAR_PROTOCOL protocol, unsigned int g2Port) : + CGatewayData(const wxString& gateway, in_addr address, DSTAR_PROTOCOL protocol) : m_gateway(gateway), m_address(address), - m_protocol(protocol), - m_g2Port(g2Port) + m_protocol(protocol) { } @@ -144,16 +129,10 @@ public: return m_protocol; } - unsigned int getG2Port() const - { - return m_g2Port; - } - private: wxString m_gateway; in_addr m_address; DSTAR_PROTOCOL m_protocol; - unsigned int m_g2Port; }; class CCacheManager { @@ -167,8 +146,7 @@ public: void updateUser(const wxString& user, const wxString& repeater, const wxString& gateway, const wxString& address, const wxString& timeStamp, DSTAR_PROTOCOL protocol, bool addrLock, bool protoLock); void updateRepeater(const wxString& repeater, const wxString& gateway, const wxString& address, DSTAR_PROTOCOL protocol, bool addrLock, bool protoLock); - void updateGateway(const wxString& gateway, const wxString& address, DSTAR_PROTOCOL protocol,bool addrLock, bool protoLock); - void updateGatewayG2(const wxString& gateway, const in_addr& address, unsigned int g2Port); + void updateGateway(const wxString& gateway, const wxString& address, DSTAR_PROTOCOL protocol, bool addrLock, bool protoLock); private: wxMutex m_mutex; diff --git a/Common/Common.vcxproj b/Common/Common.vcxproj index abf30b4..bdbcfc3 100644 --- a/Common/Common.vcxproj +++ b/Common/Common.vcxproj @@ -189,7 +189,6 @@ - @@ -261,7 +260,6 @@ - diff --git a/Common/Common.vcxproj.filters b/Common/Common.vcxproj.filters index 82574fb..8365240 100644 --- a/Common/Common.vcxproj.filters +++ b/Common/Common.vcxproj.filters @@ -209,9 +209,6 @@ Source Files - - Source Files - @@ -436,8 +433,5 @@ Header Files - - Header Files - \ No newline at end of file diff --git a/Common/G2ProtocolHandler.cpp b/Common/G2ProtocolHandler.cpp index fe9d5f6..7d1fc7e 100644 --- a/Common/G2ProtocolHandler.cpp +++ b/Common/G2ProtocolHandler.cpp @@ -29,7 +29,9 @@ CG2ProtocolHandler::CG2ProtocolHandler(unsigned int port, const wxString& addr) m_socket(addr, port), m_type(GT_NONE), m_buffer(NULL), -m_length(0U) +m_length(0U), +m_address(), +m_port(0U) { m_buffer = new unsigned char[BUFFER_LENGTH]; } @@ -74,33 +76,29 @@ bool CG2ProtocolHandler::writeAMBE(const CAMBEData& data) return m_socket.write(buffer, length, data.getYourAddress(), data.getYourPort()); } -G2_TYPE CG2ProtocolHandler::read(in_addr& remoteAddress, unsigned int& remotePort) +G2_TYPE CG2ProtocolHandler::read() { bool res = true; // Loop until we have no more data from the socket or we have data for the higher layers while (res) - res = readPackets(remoteAddress, remotePort); + res = readPackets(); return m_type; } -bool CG2ProtocolHandler::readPackets(in_addr& remoteAddress, unsigned int& remotePort) +bool CG2ProtocolHandler::readPackets() { m_type = GT_NONE; - remotePort = 0; // No more data? - int length = m_socket.read(m_buffer, BUFFER_LENGTH, remoteAddress, remotePort); + int length = m_socket.read(m_buffer, BUFFER_LENGTH, m_address, m_port); if (length <= 0) return false; m_length = length; if (m_buffer[0] != 'D' || m_buffer[1] != 'S' || m_buffer[2] != 'V' || m_buffer[3] != 'T') { - if(length == 1 && m_buffer[0] == 0) - return false;//we have been udp punched - return true; } else { // Header or data packet type? @@ -113,7 +111,7 @@ bool CG2ProtocolHandler::readPackets(in_addr& remoteAddress, unsigned int& remot } } -CHeaderData* CG2ProtocolHandler::readHeader(in_addr remoteAddress, unsigned int remotePort) +CHeaderData* CG2ProtocolHandler::readHeader() { if (m_type != GT_HEADER) return NULL; @@ -121,7 +119,7 @@ CHeaderData* CG2ProtocolHandler::readHeader(in_addr remoteAddress, unsigned int CHeaderData* header = new CHeaderData; // G2 checksums are unreliable - bool res = header->setG2Data(m_buffer, m_length, false, remoteAddress, remotePort); + bool res = header->setG2Data(m_buffer, m_length, false, m_address, m_port); if (!res) { delete header; return NULL; @@ -130,15 +128,14 @@ CHeaderData* CG2ProtocolHandler::readHeader(in_addr remoteAddress, unsigned int return header; } -CAMBEData* CG2ProtocolHandler::readAMBE(in_addr remoteAddress, unsigned int remotePort) +CAMBEData* CG2ProtocolHandler::readAMBE() { if (m_type != GT_AMBE) return NULL; CAMBEData* data = new CAMBEData; - bool res = data->setG2Data(m_buffer, m_length, remoteAddress, remotePort -); + bool res = data->setG2Data(m_buffer, m_length, m_address, m_port); if (!res) { delete data; return NULL; @@ -147,7 +144,7 @@ CAMBEData* CG2ProtocolHandler::readAMBE(in_addr remoteAddress, unsigned int remo return data; } -void CG2ProtocolHandler::traverseNat(const wxString& address) +void CG2ProtocolHandler::punchUDPHole(const wxString& address) { unsigned char buffer[1]; ::memset(buffer, 0, 1); diff --git a/Common/G2ProtocolHandler.h b/Common/G2ProtocolHandler.h index 088af25..8b74bd5 100644 --- a/Common/G2ProtocolHandler.h +++ b/Common/G2ProtocolHandler.h @@ -48,11 +48,11 @@ public: bool writeHeader(const CHeaderData& header); bool writeAMBE(const CAMBEData& data); - G2_TYPE read(in_addr& incomingAddress, unsigned int& incomingPort); - CHeaderData* readHeader(in_addr incomingAddress, unsigned int incomingPort); - CAMBEData* readAMBE(in_addr incomingAddress, unsigned int incomingPort); + G2_TYPE read(); + CHeaderData* readHeader(); + CAMBEData* readAMBE(); - void traverseNat(const wxString& addr); + void punchUDPHole(const wxString& addr); void close(); @@ -61,8 +61,10 @@ private: G2_TYPE m_type; unsigned char* m_buffer; unsigned int m_length; + in_addr m_address; + unsigned int m_port; - bool readPackets(in_addr& incomingAddress, unsigned int& incomingPort); + bool readPackets(); }; #endif diff --git a/Common/GatewayCache.cpp b/Common/GatewayCache.cpp index e97984e..b029d7c 100644 --- a/Common/GatewayCache.cpp +++ b/Common/GatewayCache.cpp @@ -38,56 +38,19 @@ CGatewayRecord* CGatewayCache::find(const wxString& gateway) void CGatewayCache::update(const wxString& gateway, const wxString& address, DSTAR_PROTOCOL protocol, bool addrLock, bool protoLock) { + CGatewayRecord* rec = m_cache[gateway]; + in_addr addr_in; addr_in.s_addr = ::inet_addr(address.mb_str()); - CGatewayRecord* rec = m_cache[gateway]; - - if(rec == NULL) { - rec = findByAddress(addr_in);//did this gateway punch to us and we do not have a gateway set for it ? - if(rec != NULL && rec->getGateway().empty() && rec->getProtocol() == protocol) - rec->setGateway(gateway); - else - rec = NULL; - } - if (rec == NULL) // A brand new record is needed - m_cache[gateway] = new CGatewayRecord(gateway, addr_in, G2_DV_PORT, protocol, addrLock, protoLock); + m_cache[gateway] = new CGatewayRecord(gateway, addr_in, protocol, addrLock, protoLock); else // Update an existing record rec->setData(addr_in, protocol, addrLock, protoLock); } -void CGatewayCache::updateG2(const wxString& gateway, in_addr address, unsigned int g2Port) -{ - //empty gateway means we are coming from udp hole punching, let see if we have an gateway with matching address - CGatewayRecord* rec = gateway.empty()? findByAddress(address) : m_cache[gateway]; - - if (rec == NULL) { - // A brand new record is needed - m_cache[gateway] = new CGatewayRecord(gateway, address, g2Port, DP_UNKNOWN, false, false); - } - else { - // Update an existing record - if(rec->getGateway().empty())//if this is a record created from a punch call, set its gateway - rec->setGateway(gateway); - - rec->setG2Data(address, g2Port); - } -} - -CGatewayRecord* CGatewayCache::findByAddress(in_addr address) -{ - for (CGatewayCache_t::iterator it = m_cache.begin(); it != m_cache.end(); ++it) { - if(it-> second != NULL - && it->second->getAddress().s_addr == address.s_addr) - return it->second; - } - - return NULL; -} - unsigned int CGatewayCache::getCount() const { return m_cache.size(); diff --git a/Common/GatewayCache.h b/Common/GatewayCache.h index dc963b9..561743c 100644 --- a/Common/GatewayCache.h +++ b/Common/GatewayCache.h @@ -35,10 +35,9 @@ class CGatewayRecord { public: - CGatewayRecord(const wxString& gateway, in_addr address, unsigned int g2Port, DSTAR_PROTOCOL protocol, bool addrLock, bool protoLock) : + CGatewayRecord(const wxString& gateway, in_addr address, DSTAR_PROTOCOL protocol, bool addrLock, bool protoLock) : m_gateway(gateway), m_address(address), - m_g2Port(g2Port), m_protocol(DP_UNKNOWN), m_addrLock(addrLock), m_protoLock(false) @@ -54,11 +53,6 @@ public: return m_gateway; } - void setGateway(const wxString& gateway) - { - m_gateway = gateway; - } - in_addr getAddress() const { return m_address; @@ -69,11 +63,6 @@ public: return m_protocol; } - unsigned int getG2Port() const - { - return m_g2Port; - } - void setData(in_addr address, DSTAR_PROTOCOL protocol, bool addrLock, bool protoLock) { if (!m_addrLock) { @@ -89,20 +78,9 @@ public: } } - void setG2Data(in_addr address, unsigned int g2Port) - { - if (!m_addrLock) { - m_address = address; - } - - m_g2Port = g2Port; - } - private: wxString m_gateway; - in_addr m_address; - //the incoming G2 port, keep track of it and use it to answer back instead of the default one. This helps us defeat NAT with no port forwarding to G2_DVPORT - unsigned int m_g2Port; + in_addr m_address; DSTAR_PROTOCOL m_protocol; bool m_addrLock; bool m_protoLock; @@ -118,13 +96,10 @@ public: CGatewayRecord* find(const wxString& gateway); void update(const wxString& gateway, const wxString& address, DSTAR_PROTOCOL protocol, bool addrLock, bool protoLock); - void updateG2(const wxString& gateway, in_addr address, unsigned int g2Port); unsigned int getCount() const; private: - CGatewayRecord* findByAddress(in_addr address); - CGatewayCache_t m_cache; }; diff --git a/Common/Makefile b/Common/Makefile index e215ea2..0243a4b 100644 --- a/Common/Makefile +++ b/Common/Makefile @@ -4,7 +4,7 @@ OBJECTS = AMBEData.o AnnouncementUnit.o APRSCollector.o APRSWriter.o APRSWriterT DPlusAuthenticator.o DPlusHandler.o DPlusProtocolHandler.o DPlusProtocolHandlerPool.o DRATSServer.o DTMF.o \ DummyRepeaterProtocolHandler.o DVTOOLFileReader.o EchoUnit.o G2Handler.o G2ProtocolHandler.o GatewayCache.o \ HBRepeaterProtocolHandler.o HeaderData.o HeaderLogger.o HeardData.o HostFile.o IcomRepeaterProtocolHandler.o IRCDDBGatewayConfig.o \ - LogEvent.o Logger.o NatTraversalHandler.o PollData.o RemoteHandler.o RemoteLinkData.o RemoteProtocolHandler.o RemoteRepeaterData.o RemoteStarNetGroup.o \ + LogEvent.o Logger.o PollData.o RemoteHandler.o RemoteLinkData.o RemoteProtocolHandler.o RemoteRepeaterData.o RemoteStarNetGroup.o \ RemoteStarNetUser.o RepeaterCache.o RepeaterHandler.o SHA256.o SlowDataEncoder.o StarNetHandler.o StatusData.o \ TCPReaderWriterClient.o TCPReaderWriterServer.o TextCollector.o TextData.o Timer.o UDPReaderWriter.o UserCache.o Utils.o \ VersionUnit.o XLXHostsFileDownloader.o diff --git a/Common/NatTraversalHandler.cpp b/Common/NatTraversalHandler.cpp deleted file mode 100644 index 052c5d9..0000000 --- a/Common/NatTraversalHandler.cpp +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (C) 2010,2011,2012,2013,2014,2015,2016,2017,2018 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 - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include "NatTraversalHandler.h" - -const unsigned int CACHE_SIZE = 500U; - -CNatTraversalHandler::CNatTraversalHandler() : -m_g2cache(CACHE_SIZE), -m_g2Handler(NULL) -{ - -} - -CNatTraversalHandler::~CNatTraversalHandler() -{ - for (CNatTraversalCache_t::iterator it = m_g2cache.begin(); it != m_g2cache.end(); ++it) - delete it->second; -} - -void CNatTraversalHandler::setG2Handler(CG2ProtocolHandler * handler) -{ - m_g2Handler = handler; -} - -void CNatTraversalHandler::traverseNatG2(const wxString& address) -{ - if(m_g2Handler != NULL){ - CNatTraversalRecord* record = m_g2cache[address]; - - if(record == NULL) { - record = new CNatTraversalRecord(address); - m_g2cache[address] = record; - } - - std::time_t currentTime = std::time(NULL); - if(currentTime - record->getTimestamp() > G2_TRAVERSAL_TIMEOUT) { - record->setTimestamp(currentTime); - m_g2Handler->traverseNat(address); - } - } -} \ No newline at end of file diff --git a/Common/NatTraversalHandler.h b/Common/NatTraversalHandler.h deleted file mode 100644 index c5c424d..0000000 --- a/Common/NatTraversalHandler.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (C) 2010,2011,2012,2013,2014,2015,2016,2017,2018 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 - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef NatTraversalHandler_H -#define NatTraversalHandler_H - -#define G2_TRAVERSAL_TIMEOUT 29 //seconds - -#include "G2ProtocolHandler.h" - -#include -#include - -enum NAT_TRAVERSAL_TYPE { - NTT_G2, - //NTT_DEXTRA - //NTT_DCS - //NTT_DPLUS -}; - -class CNatTraversalRecord { -public: - CNatTraversalRecord(const wxString& address) : - m_address(address), - m_timestamp(0) - { - } - - std::time_t getTimestamp() const - { - return m_timestamp; - } - - void setTimestamp(std::time_t timestamp) - { - m_timestamp = timestamp; - } - -private: - wxString m_address; - std::time_t m_timestamp; -}; - -WX_DECLARE_STRING_HASH_MAP(CNatTraversalRecord*, CNatTraversalCache_t); - -/* -* This keeps track of when we UDP punched to one destination so to avoid unnecessary traffic on each ircddb reporting -*/ -class CNatTraversalHandler { -public: - CNatTraversalHandler(); - ~CNatTraversalHandler(); - - void setG2Handler(CG2ProtocolHandler* handler); - void traverseNatG2(const wxString& address); - -private: - CNatTraversalCache_t m_g2cache; - CG2ProtocolHandler* m_g2Handler; -}; - -#endif \ No newline at end of file diff --git a/Common/RepeaterHandler.cpp b/Common/RepeaterHandler.cpp index c1f32a9..1a25db0 100644 --- a/Common/RepeaterHandler.cpp +++ b/Common/RepeaterHandler.cpp @@ -109,7 +109,6 @@ m_g2Repeater(), m_g2Gateway(), m_g2Header(NULL), m_g2Address(), -m_g2Port(G2_DV_PORT), m_linkStatus(LS_NONE), m_linkRepeater(), m_linkGateway(), @@ -633,7 +632,6 @@ void CRepeaterHandler::processRepeater(CHeaderData& header) m_g2User.Clear(); m_g2Repeater.Clear(); m_g2Gateway.Clear(); - m_g2Port = G2_DV_PORT; // Check if this user is restricted m_restricted = false; @@ -831,7 +829,7 @@ void CRepeaterHandler::processRepeater(CAMBEData& data) break; case G2_OK: - data.setDestination(m_g2Address, m_g2Port); + data.setDestination(m_g2Address, G2_DV_PORT); m_g2Handler->writeAMBE(data); if (data.isEnd()) { @@ -1215,7 +1213,7 @@ void CRepeaterHandler::resolveUserInt(const wxString& user, const wxString& repe m_g2Repeater = repeater; m_g2Gateway = gateway; - m_g2Header->setDestination(m_g2Address, m_g2Port); + m_g2Header->setDestination(m_g2Address, G2_DV_PORT); m_g2Header->setRepeaters(m_g2Gateway, m_g2Repeater); m_g2Handler->writeHeader(*m_g2Header); @@ -1228,7 +1226,6 @@ void CRepeaterHandler::resolveUserInt(const wxString& user, const wxString& repe m_g2User.Clear(); m_g2Repeater.Clear(); m_g2Gateway.Clear(); - m_g2Port = G2_DV_PORT; delete m_g2Header; m_g2Header = NULL; @@ -1248,10 +1245,7 @@ void CRepeaterHandler::resolveRepeaterInt(const wxString& repeater, const wxStri m_g2Repeater = repeater; m_g2Gateway = gateway; - CRepeaterData* rpt = m_cache->findRepeater(repeater); - m_g2Port = rpt != NULL ? rpt->getG2Port() : G2_DV_PORT; - - m_g2Header->setDestination(m_g2Address, m_g2Port); + m_g2Header->setDestination(m_g2Address, G2_DV_PORT); m_g2Header->setRepeaters(m_g2Gateway, m_g2Repeater); m_g2Handler->writeHeader(*m_g2Header); @@ -1264,7 +1258,6 @@ void CRepeaterHandler::resolveRepeaterInt(const wxString& repeater, const wxStri m_g2User.Clear(); m_g2Repeater.Clear(); m_g2Gateway.Clear(); - m_g2Port = G2_DV_PORT; delete m_g2Header; m_g2Header = NULL; @@ -1466,7 +1459,6 @@ void CRepeaterHandler::clockInt(unsigned int ms) m_g2User.Clear(); m_g2Repeater.Clear(); m_g2Gateway.Clear(); - m_g2Port = G2_DV_PORT; delete m_g2Header; m_g2Header = NULL; @@ -1991,8 +1983,7 @@ void CRepeaterHandler::g2CommandHandler(const wxString& callsign, const wxString m_g2Status = G2_OK; m_g2Address = data->getAddress(); m_g2Gateway = data->getGateway(); - m_g2Port = data->getG2Port(); - header.setDestination(m_g2Address, m_g2Port); + header.setDestination(m_g2Address, G2_DV_PORT); header.setRepeaters(m_g2Gateway, m_g2Repeater); m_g2Handler->writeHeader(header); delete data; @@ -2034,9 +2025,7 @@ void CRepeaterHandler::g2CommandHandler(const wxString& callsign, const wxString m_g2Address = data->getAddress(); m_g2Repeater = data->getRepeater(); m_g2Gateway = data->getGateway(); - m_g2Port = data->getG2Port(); - wxLogMessage(wxT("%s is trying to G2 route to gateway %s on port %d"), user.c_str(), m_g2Gateway.c_str(), m_g2Port); - header.setDestination(m_g2Address, m_g2Port); + header.setDestination(m_g2Address, G2_DV_PORT); header.setRepeaters(m_g2Gateway, m_g2Repeater); m_g2Handler->writeHeader(header); diff --git a/Common/RepeaterHandler.h b/Common/RepeaterHandler.h index df16c5a..05baca2 100644 --- a/Common/RepeaterHandler.h +++ b/Common/RepeaterHandler.h @@ -232,7 +232,6 @@ private: wxString m_g2Gateway; CHeaderData* m_g2Header; in_addr m_g2Address; - unsigned int m_g2Port; // Link info LINK_STATUS m_linkStatus; diff --git a/StarNetServer/StarNetServerThread.cpp b/StarNetServer/StarNetServerThread.cpp index 7b31214..2b86002 100644 --- a/StarNetServer/StarNetServerThread.cpp +++ b/StarNetServer/StarNetServerThread.cpp @@ -505,15 +505,15 @@ void CStarNetServerThread::processDCS() void CStarNetServerThread::processG2() { - in_addr incomingAddress; - unsigned int incomingPort; - for (;;) { - G2_TYPE type = m_g2Handler->read(incomingAddress, incomingPort); + G2_TYPE type = m_g2Handler->read(); switch (type) { + case GT_NONE: + return; + case GT_HEADER: { - CHeaderData* header = m_g2Handler->readHeader(incomingAddress, incomingPort); + CHeaderData* header = m_g2Handler->readHeader(); if (header != NULL) { // wxLogMessage(wxT("G2 header - My: %s/%s Your: %s Rpt1: %s Rpt2: %s Flags: %02X %02X %02X"), header->getMyCall1().c_str(), header->getMyCall2().c_str(), header->getYourCall().c_str(), header->getRptCall1().c_str(), header->getRptCall2().c_str(), header->getFlag1(), header->getFlag2(), header->getFlag3()); CG2Handler::process(*header); @@ -523,17 +523,13 @@ void CStarNetServerThread::processG2() break; case GT_AMBE: { - CAMBEData* data = m_g2Handler->readAMBE(incomingAddress, incomingPort); + CAMBEData* data = m_g2Handler->readAMBE(); if (data != NULL) { CG2Handler::process(*data); delete data; } } break; - - default: - //Probably someone punching a UDP hole to us - return; } } } diff --git a/ircDDBGateway/IRCDDBGatewayThread.cpp b/ircDDBGateway/IRCDDBGatewayThread.cpp index a15819a..9da5110 100644 --- a/ircDDBGateway/IRCDDBGatewayThread.cpp +++ b/ircDDBGateway/IRCDDBGatewayThread.cpp @@ -72,7 +72,6 @@ m_dextraPool(NULL), m_dplusPool(NULL), m_dcsPool(NULL), m_g2Handler(NULL), -m_natTraversal(NULL), m_aprsWriter(NULL), m_irc(NULL), m_cache(), @@ -218,11 +217,6 @@ void CIRCDDBGatewayThread::run() m_g2Handler = NULL; } - if(m_g2Handler != NULL) { - m_natTraversal = new CNatTraversalHandler(); - m_natTraversal->setG2Handler(m_g2Handler); - } - // Wait here until we have the essentials to run while (!m_killed && (m_dextraPool == NULL || m_dplusPool == NULL || m_dcsPool == NULL || m_g2Handler == NULL || (m_icomRepeaterHandler == NULL && m_hbRepeaterHandler == NULL && m_dummyRepeaterHandler == NULL) || m_gatewayCallsign.IsEmpty())) ::wxMilliSleep(500UL); // 1/2 sec @@ -725,7 +719,7 @@ void CIRCDDBGatewayThread::processIrcDDB() if (!address.IsEmpty()) { wxLogMessage(wxT("USER: %s %s %s %s"), user.c_str(), repeater.c_str(), gateway.c_str(), address.c_str()); m_cache.updateUser(user, repeater, gateway, address, timestamp, DP_DEXTRA, false, false); - m_natTraversal->traverseNatG2(address); + m_g2Handler->punchUDPHole(address); } else { wxLogMessage(wxT("USER: %s NOT FOUND"), user.c_str()); } @@ -738,16 +732,14 @@ void CIRCDDBGatewayThread::processIrcDDB() if (!res) break; + CRepeaterHandler::resolveRepeater(repeater, gateway, address, DP_DEXTRA); if (!address.IsEmpty()) { wxLogMessage(wxT("REPEATER: %s %s %s"), repeater.c_str(), gateway.c_str(), address.c_str()); m_cache.updateRepeater(repeater, gateway, address, DP_DEXTRA, false, false); - m_natTraversal->traverseNatG2(address); + m_g2Handler->punchUDPHole(address); } else { wxLogMessage(wxT("REPEATER: %s NOT FOUND"), repeater.c_str()); } - - //resolve after updating cache so CRepeaterHandler gets latest g2 port from cache - CRepeaterHandler::resolveRepeater(repeater, gateway, address, DP_DEXTRA); } break; @@ -762,7 +754,7 @@ void CIRCDDBGatewayThread::processIrcDDB() if (!address.IsEmpty()) { wxLogMessage(wxT("GATEWAY: %s %s"), gateway.c_str(), address.c_str()); m_cache.updateGateway(gateway, address, DP_DEXTRA, false, false); - m_natTraversal->traverseNatG2(address); + m_g2Handler->punchUDPHole(address); } else { wxLogMessage(wxT("GATEWAY: %s NOT FOUND"), gateway.c_str()); } @@ -1033,29 +1025,22 @@ void CIRCDDBGatewayThread::processDCS() void CIRCDDBGatewayThread::processG2() { - in_addr remoteAddress; - unsigned int remotePort; - for (;;) { - G2_TYPE type = m_g2Handler->read(remoteAddress, remotePort); + G2_TYPE type = m_g2Handler->read(); switch (type) { case GT_HEADER: { - CHeaderData* header = m_g2Handler->readHeader(remoteAddress, remotePort); - + CHeaderData* header = m_g2Handler->readHeader(); if (header != NULL) { // wxLogMessage(wxT("G2 header - My: %s/%s Your: %s Rpt1: %s Rpt2: %s Flags: %02X %02X %02X"), header->getMyCall1().c_str(), header->getMyCall2().c_str(), header->getYourCall().c_str(), header->getRptCall1().c_str(), header->getRptCall2().c_str(), header->getFlag1(), header->getFlag2(), header->getFlag3()); CG2Handler::process(*header); - m_cache.updateGatewayG2(header-> getRptCall1(), remoteAddress, remotePort); - delete header; } } break; case GT_AMBE: { - CAMBEData* data = m_g2Handler->readAMBE(remoteAddress, remotePort); - + CAMBEData* data = m_g2Handler->readAMBE(); if (data != NULL) { CG2Handler::process(*data); delete data; @@ -1064,12 +1049,6 @@ void CIRCDDBGatewayThread::processG2() break; default: - //Probably someone punching a UDP hole to us, keep track of that - if(remoteAddress.s_addr != INADDR_NONE && remotePort > 0 && remotePort < 65536) { - wxLogMessage(wxT("Incoming G2 UDP traversal from %s:%i"), ::inet_ntoa(remoteAddress), remotePort); - m_cache.updateGatewayG2(wxT(""), remoteAddress, remotePort); - } - return; } } diff --git a/ircDDBGateway/IRCDDBGatewayThread.h b/ircDDBGateway/IRCDDBGatewayThread.h index 6862b63..e3cc863 100644 --- a/ircDDBGateway/IRCDDBGatewayThread.h +++ b/ircDDBGateway/IRCDDBGatewayThread.h @@ -28,7 +28,6 @@ #include "IRCDDBGatewayStatusData.h" #include "DCSProtocolHandlerPool.h" #include "G2ProtocolHandler.h" -#include "NatTraversalHandler.h" #include "RemoteHandler.h" #include "CacheManager.h" #include "CallsignList.h" @@ -93,7 +92,6 @@ private: CDPlusProtocolHandlerPool* m_dplusPool; CDCSProtocolHandlerPool* m_dcsPool; CG2ProtocolHandler* m_g2Handler; - CNatTraversalHandler* m_natTraversal; CAPRSWriter* m_aprsWriter; CIRCDDB* m_irc; CCacheManager m_cache; From 1e48be71dd52509398b2f55f34259071c93284f4 Mon Sep 17 00:00:00 2001 From: Geoffrey Merck F4FXL - KC3FRA Date: Wed, 16 Jan 2019 20:41:57 +0100 Subject: [PATCH 096/166] Allow to compile without NAT traversal, disabled by default --- Common/G2ProtocolHandler.cpp | 2 ++ Common/G2ProtocolHandler.h | 2 ++ Common/NatTraversalHandler.cpp | 6 +++++- Common/NatTraversalHandler.h | 3 +++ ircDDBGateway/IRCDDBGatewayThread.cpp | 10 ++++++++++ ircDDBGateway/IRCDDBGatewayThread.h | 2 ++ 6 files changed, 24 insertions(+), 1 deletion(-) diff --git a/Common/G2ProtocolHandler.cpp b/Common/G2ProtocolHandler.cpp index fe9d5f6..bc7da4b 100644 --- a/Common/G2ProtocolHandler.cpp +++ b/Common/G2ProtocolHandler.cpp @@ -147,6 +147,7 @@ CAMBEData* CG2ProtocolHandler::readAMBE(in_addr remoteAddress, unsigned int remo return data; } +#if defined(ENABLE_NAT_TRAVERSAL) void CG2ProtocolHandler::traverseNat(const wxString& address) { unsigned char buffer[1]; @@ -158,6 +159,7 @@ void CG2ProtocolHandler::traverseNat(const wxString& address) m_socket.write(buffer, 1, addr, G2_DV_PORT); } +#endif void CG2ProtocolHandler::close() { diff --git a/Common/G2ProtocolHandler.h b/Common/G2ProtocolHandler.h index 088af25..38357e2 100644 --- a/Common/G2ProtocolHandler.h +++ b/Common/G2ProtocolHandler.h @@ -52,7 +52,9 @@ public: CHeaderData* readHeader(in_addr incomingAddress, unsigned int incomingPort); CAMBEData* readAMBE(in_addr incomingAddress, unsigned int incomingPort); +#if defined(ENABLE_NAT_TRAVERSAL) void traverseNat(const wxString& addr); +#endif void close(); diff --git a/Common/NatTraversalHandler.cpp b/Common/NatTraversalHandler.cpp index 052c5d9..8ee9ac0 100644 --- a/Common/NatTraversalHandler.cpp +++ b/Common/NatTraversalHandler.cpp @@ -16,6 +16,8 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#if defined(ENABLE_NAT_TRAVERSAL) + #include "NatTraversalHandler.h" const unsigned int CACHE_SIZE = 500U; @@ -54,4 +56,6 @@ void CNatTraversalHandler::traverseNatG2(const wxString& address) m_g2Handler->traverseNat(address); } } -} \ No newline at end of file +} + +#endif \ No newline at end of file diff --git a/Common/NatTraversalHandler.h b/Common/NatTraversalHandler.h index c5c424d..0069fea 100644 --- a/Common/NatTraversalHandler.h +++ b/Common/NatTraversalHandler.h @@ -16,6 +16,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#if defined(ENABLE_NAT_TRAVERSAL) #ifndef NatTraversalHandler_H #define NatTraversalHandler_H @@ -74,4 +75,6 @@ private: CG2ProtocolHandler* m_g2Handler; }; +#endif + #endif \ No newline at end of file diff --git a/ircDDBGateway/IRCDDBGatewayThread.cpp b/ircDDBGateway/IRCDDBGatewayThread.cpp index a15819a..1b4c0e8 100644 --- a/ircDDBGateway/IRCDDBGatewayThread.cpp +++ b/ircDDBGateway/IRCDDBGatewayThread.cpp @@ -72,7 +72,9 @@ m_dextraPool(NULL), m_dplusPool(NULL), m_dcsPool(NULL), m_g2Handler(NULL), +#if defined(ENABLE_NAT_TRAVERSAL) m_natTraversal(NULL), +#endif m_aprsWriter(NULL), m_irc(NULL), m_cache(), @@ -218,10 +220,12 @@ void CIRCDDBGatewayThread::run() m_g2Handler = NULL; } +#if defined(ENABLE_NAT_TRAVERSAL) if(m_g2Handler != NULL) { m_natTraversal = new CNatTraversalHandler(); m_natTraversal->setG2Handler(m_g2Handler); } +#endif // Wait here until we have the essentials to run while (!m_killed && (m_dextraPool == NULL || m_dplusPool == NULL || m_dcsPool == NULL || m_g2Handler == NULL || (m_icomRepeaterHandler == NULL && m_hbRepeaterHandler == NULL && m_dummyRepeaterHandler == NULL) || m_gatewayCallsign.IsEmpty())) @@ -725,7 +729,9 @@ void CIRCDDBGatewayThread::processIrcDDB() if (!address.IsEmpty()) { wxLogMessage(wxT("USER: %s %s %s %s"), user.c_str(), repeater.c_str(), gateway.c_str(), address.c_str()); m_cache.updateUser(user, repeater, gateway, address, timestamp, DP_DEXTRA, false, false); +#if defined(ENABLE_NAT_TRAVERSAL) m_natTraversal->traverseNatG2(address); +#endif } else { wxLogMessage(wxT("USER: %s NOT FOUND"), user.c_str()); } @@ -741,7 +747,9 @@ void CIRCDDBGatewayThread::processIrcDDB() if (!address.IsEmpty()) { wxLogMessage(wxT("REPEATER: %s %s %s"), repeater.c_str(), gateway.c_str(), address.c_str()); m_cache.updateRepeater(repeater, gateway, address, DP_DEXTRA, false, false); +#if defined(ENABLE_NAT_TRAVERSAL) m_natTraversal->traverseNatG2(address); +#endif } else { wxLogMessage(wxT("REPEATER: %s NOT FOUND"), repeater.c_str()); } @@ -762,7 +770,9 @@ void CIRCDDBGatewayThread::processIrcDDB() if (!address.IsEmpty()) { wxLogMessage(wxT("GATEWAY: %s %s"), gateway.c_str(), address.c_str()); m_cache.updateGateway(gateway, address, DP_DEXTRA, false, false); +#if defined(ENABLE_NAT_TRAVERSAL) m_natTraversal->traverseNatG2(address); +#endif } else { wxLogMessage(wxT("GATEWAY: %s NOT FOUND"), gateway.c_str()); } diff --git a/ircDDBGateway/IRCDDBGatewayThread.h b/ircDDBGateway/IRCDDBGatewayThread.h index 6862b63..11ee4ec 100644 --- a/ircDDBGateway/IRCDDBGatewayThread.h +++ b/ircDDBGateway/IRCDDBGatewayThread.h @@ -93,7 +93,9 @@ private: CDPlusProtocolHandlerPool* m_dplusPool; CDCSProtocolHandlerPool* m_dcsPool; CG2ProtocolHandler* m_g2Handler; +#if defined(ENABLE_NAT_TRAVERSAL) CNatTraversalHandler* m_natTraversal; +#endif CAPRSWriter* m_aprsWriter; CIRCDDB* m_irc; CCacheManager m_cache; From c2e26c508efe2349303b520473e62d7f6b607d1f Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Wed, 16 Jan 2019 20:50:59 +0000 Subject: [PATCH 097/166] Remove UDP hole puncher. --- Common/G2ProtocolHandler.cpp | 12 ------------ Common/G2ProtocolHandler.h | 2 -- ircDDBGateway/IRCDDBGatewayThread.cpp | 3 --- 3 files changed, 17 deletions(-) diff --git a/Common/G2ProtocolHandler.cpp b/Common/G2ProtocolHandler.cpp index 7d1fc7e..8f68b98 100644 --- a/Common/G2ProtocolHandler.cpp +++ b/Common/G2ProtocolHandler.cpp @@ -144,18 +144,6 @@ CAMBEData* CG2ProtocolHandler::readAMBE() return data; } -void CG2ProtocolHandler::punchUDPHole(const wxString& address) -{ - unsigned char buffer[1]; - ::memset(buffer, 0, 1); - - in_addr addr = CUDPReaderWriter::lookup(address); - - //wxLogError(wxT("Punching hole to %s"), address.mb_str()); - - m_socket.write(buffer, 1, addr, G2_DV_PORT); -} - void CG2ProtocolHandler::close() { m_socket.close(); diff --git a/Common/G2ProtocolHandler.h b/Common/G2ProtocolHandler.h index 8b74bd5..3a87834 100644 --- a/Common/G2ProtocolHandler.h +++ b/Common/G2ProtocolHandler.h @@ -52,8 +52,6 @@ public: CHeaderData* readHeader(); CAMBEData* readAMBE(); - void punchUDPHole(const wxString& addr); - void close(); private: diff --git a/ircDDBGateway/IRCDDBGatewayThread.cpp b/ircDDBGateway/IRCDDBGatewayThread.cpp index 9da5110..268a04d 100644 --- a/ircDDBGateway/IRCDDBGatewayThread.cpp +++ b/ircDDBGateway/IRCDDBGatewayThread.cpp @@ -719,7 +719,6 @@ void CIRCDDBGatewayThread::processIrcDDB() if (!address.IsEmpty()) { wxLogMessage(wxT("USER: %s %s %s %s"), user.c_str(), repeater.c_str(), gateway.c_str(), address.c_str()); m_cache.updateUser(user, repeater, gateway, address, timestamp, DP_DEXTRA, false, false); - m_g2Handler->punchUDPHole(address); } else { wxLogMessage(wxT("USER: %s NOT FOUND"), user.c_str()); } @@ -736,7 +735,6 @@ void CIRCDDBGatewayThread::processIrcDDB() if (!address.IsEmpty()) { wxLogMessage(wxT("REPEATER: %s %s %s"), repeater.c_str(), gateway.c_str(), address.c_str()); m_cache.updateRepeater(repeater, gateway, address, DP_DEXTRA, false, false); - m_g2Handler->punchUDPHole(address); } else { wxLogMessage(wxT("REPEATER: %s NOT FOUND"), repeater.c_str()); } @@ -754,7 +752,6 @@ void CIRCDDBGatewayThread::processIrcDDB() if (!address.IsEmpty()) { wxLogMessage(wxT("GATEWAY: %s %s"), gateway.c_str(), address.c_str()); m_cache.updateGateway(gateway, address, DP_DEXTRA, false, false); - m_g2Handler->punchUDPHole(address); } else { wxLogMessage(wxT("GATEWAY: %s NOT FOUND"), gateway.c_str()); } From 875bba83c1237f9a5b788de00a131dbd1ee14ddf Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Wed, 16 Jan 2019 20:51:23 +0000 Subject: [PATCH 098/166] Update logger to the latest wxWidgets API. --- Common/Logger.cpp | 13 ++++++------- Common/Logger.h | 7 ++++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Common/Logger.cpp b/Common/Logger.cpp index 1771c2e..6aa789b 100644 --- a/Common/Logger.cpp +++ b/Common/Logger.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002,2003,2009,2011,2012 by Jonathan Naylor G4KLX + * Copyright (C) 2002,2003,2009,2011,2012,2019 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 @@ -55,11 +55,10 @@ CLogger::~CLogger() delete m_file; } -void CLogger::DoLog(wxLogLevel level, const wxChar* msg, time_t timestamp) +void CLogger::DoLogRecord(wxLogLevel level, const wxString& msg, const wxLogRecordInfo& info) { wxASSERT(m_file != NULL); wxASSERT(m_file->IsOpened()); - wxASSERT(msg != NULL); wxString letter; @@ -75,18 +74,18 @@ void CLogger::DoLog(wxLogLevel level, const wxChar* msg, time_t timestamp) default: letter = wxT("U"); break; } - struct tm* tm = ::gmtime(×tamp); + struct tm* tm = ::gmtime(&info.timestamp); wxString message; - message.Printf(wxT("%s: %04d-%02d-%02d %02d:%02d:%02d: %s\n"), letter.c_str(), tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec, msg); + message.Printf(wxT("%s: %04d-%02d-%02d %02d:%02d:%02d: %s\n"), letter.c_str(), tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec, msg.c_str()); - DoLogString(message.c_str(), timestamp); + writeLog(message.c_str(), info.timestamp); if (level == wxLOG_FatalError) ::abort(); } -void CLogger::DoLogString(const wxChar* msg, time_t timestamp) +void CLogger::writeLog(const wxChar* msg, time_t timestamp) { wxASSERT(m_file != NULL); wxASSERT(m_file->IsOpened()); diff --git a/Common/Logger.h b/Common/Logger.h index 29523df..b9ca2c2 100644 --- a/Common/Logger.h +++ b/Common/Logger.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002,2003,2009,2011,2012 by Jonathan Naylor G4KLX + * Copyright (C) 2002,2003,2009,2011,2012,2019 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 @@ -28,14 +28,15 @@ public: CLogger(const wxString& directory, const wxString& name); virtual ~CLogger(); - virtual void DoLog(wxLogLevel level, const wxChar* msg, time_t timestamp); - virtual void DoLogString(const wxChar* msg, time_t timestamp); + virtual void DoLogRecord(wxLogLevel level, const wxString& msg, const wxLogRecordInfo& info); private: wxString m_name; wxFFile* m_file; wxFileName m_fileName; int m_day; + + void writeLog(const wxChar* msg, time_t timestamp); }; #endif From 58e0caed9726032ebc76f40480b6df52396d34a1 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Fri, 18 Jan 2019 16:40:08 +0000 Subject: [PATCH 099/166] Add the Nat Traversal class to VS. --- Common/Common.vcxproj | 2 ++ Common/Common.vcxproj.filters | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/Common/Common.vcxproj b/Common/Common.vcxproj index bdbcfc3..abf30b4 100644 --- a/Common/Common.vcxproj +++ b/Common/Common.vcxproj @@ -189,6 +189,7 @@ + @@ -260,6 +261,7 @@ + diff --git a/Common/Common.vcxproj.filters b/Common/Common.vcxproj.filters index 8365240..82574fb 100644 --- a/Common/Common.vcxproj.filters +++ b/Common/Common.vcxproj.filters @@ -209,6 +209,9 @@ Source Files + + Source Files + @@ -433,5 +436,8 @@ Header Files + + Header Files + \ No newline at end of file From 852889e0ee39e41b5bf9823c80731e7c4b08958b Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Fri, 25 Jan 2019 11:21:36 +0000 Subject: [PATCH 100/166] New way to detect fast data mode. --- Common/DStarDefines.h | 16 ++++++++-------- Common/RepeaterHandler.cpp | 11 ++++------- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/Common/DStarDefines.h b/Common/DStarDefines.h index 6fbae59..cf5d356 100644 --- a/Common/DStarDefines.h +++ b/Common/DStarDefines.h @@ -58,10 +58,6 @@ const bool NULL_SLOW_DATA_BITS[] = {false, true, true, false, true, false, fa true, false, false, true, false, true, false, false, true, false, true, false, true, true, true, true}; -const unsigned char KENWOOD_DATA_MODE_BYTES[] = {0xEEU, 0xC2U, 0xA1U, 0xC8U, 0x42U, 0x6EU, 0x52U, 0x51U, 0xC3U}; -const unsigned char ICOM_DATA_MODE_BYTES1[] = {0xB2U, 0x4DU, 0x22U, 0x48U, 0xC0U, 0x16U, 0x28U, 0x26U, 0xC8U}; -const unsigned char ICOM_DATA_MODE_BYTES2[] = {0x70U, 0x4FU, 0x93U, 0x40U, 0x64U, 0x74U, 0x6DU, 0x30U, 0x2BU}; - const unsigned int VOICE_FRAME_LENGTH_BITS = 72U; const unsigned int VOICE_FRAME_LENGTH_BYTES = VOICE_FRAME_LENGTH_BITS / 8U; @@ -86,10 +82,14 @@ const unsigned int DATA_BLOCK_SIZE_BYTES = 21U * DV_FRAME_LENGTH_BYTES; const unsigned int LONG_CALLSIGN_LENGTH = 8U; const unsigned int SHORT_CALLSIGN_LENGTH = 4U; -const unsigned char SLOW_DATA_TYPE_MASK = 0xF0U; -const unsigned char SLOW_DATA_TYPE_GPS = 0x30U; -const unsigned char SLOW_DATA_TYPE_TEXT = 0x40U; -const unsigned char SLOW_DATA_TYPE_HEADER = 0x50U; +const unsigned char SLOW_DATA_TYPE_MASK = 0xF0U; +const unsigned char SLOW_DATA_TYPE_GPS = 0x30U; +const unsigned char SLOW_DATA_TYPE_TEXT = 0x40U; +const unsigned char SLOW_DATA_TYPE_HEADER = 0x50U; +const unsigned char SLOW_DATA_TYPE_FAST_DATA1 = 0x80U; +const unsigned char SLOW_DATA_TYPE_FAST_DATA2 = 0x90U; +const unsigned char SLOW_DATA_TYPE_SQUELCH = 0xC0U; +const unsigned char SLOW_DATA_LENGTH_MASK = 0x0FU; const unsigned char DATA_MASK = 0x80U; const unsigned char REPEATER_MASK = 0x40U; diff --git a/Common/RepeaterHandler.cpp b/Common/RepeaterHandler.cpp index 1a25db0..86d3cb2 100644 --- a/Common/RepeaterHandler.cpp +++ b/Common/RepeaterHandler.cpp @@ -740,13 +740,10 @@ void CRepeaterHandler::processRepeater(CAMBEData& data) unsigned char buffer[DV_FRAME_MAX_LENGTH_BYTES]; data.getData(buffer, DV_FRAME_MAX_LENGTH_BYTES); - // Data signatures only appear at the beginning of the frame - if (!m_fastData && m_frames < 21U) { - if (::memcmp(buffer, KENWOOD_DATA_MODE_BYTES, VOICE_FRAME_LENGTH_BYTES) == 0) - m_fastData = true; - else if (::memcmp(buffer, ICOM_DATA_MODE_BYTES1, VOICE_FRAME_LENGTH_BYTES) == 0) - m_fastData = true; - else if (::memcmp(buffer, ICOM_DATA_MODE_BYTES2, VOICE_FRAME_LENGTH_BYTES) == 0) + // Check for the fast data signature + if (!m_fastData) { + unsigned char slowDataType = buffer[VOICE_FRAME_LENGTH_BYTES] & SLOW_DATA_TYPE_MASK; + if (slowDataType == SLOW_DATA_TYPE_FAST_DATA1 || slowDataType == SLOW_DATA_TYPE_FAST_DATA2) m_fastData = true; } From f7fe4d66838be62d9a00014cdcdfd786e5f66449 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Fri, 25 Jan 2019 11:38:49 +0000 Subject: [PATCH 101/166] Don't forget to descramble the type byte first. --- Common/RepeaterHandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Common/RepeaterHandler.cpp b/Common/RepeaterHandler.cpp index 86d3cb2..0736723 100644 --- a/Common/RepeaterHandler.cpp +++ b/Common/RepeaterHandler.cpp @@ -742,7 +742,7 @@ void CRepeaterHandler::processRepeater(CAMBEData& data) // Check for the fast data signature if (!m_fastData) { - unsigned char slowDataType = buffer[VOICE_FRAME_LENGTH_BYTES] & SLOW_DATA_TYPE_MASK; + unsigned char slowDataType = (buffer[VOICE_FRAME_LENGTH_BYTES] ^ SCRAMBLER_BYTE1) & SLOW_DATA_TYPE_MASK; if (slowDataType == SLOW_DATA_TYPE_FAST_DATA1 || slowDataType == SLOW_DATA_TYPE_FAST_DATA2) m_fastData = true; } From a1bea49c882b3e731c5244772739014f315a5d49 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Wed, 30 Jan 2019 07:55:40 +0000 Subject: [PATCH 102/166] Check the guard byte on the fast data. --- Common/DStarDefines.h | 6 +++++- Common/RepeaterHandler.cpp | 5 +++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Common/DStarDefines.h b/Common/DStarDefines.h index cf5d356..6d1319e 100644 --- a/Common/DStarDefines.h +++ b/Common/DStarDefines.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009-2015,2018 by Jonathan Naylor, G4KLX + * Copyright (C) 2009-2015,2018,2019 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 @@ -111,6 +111,10 @@ const unsigned int DSTAR_FRAMES_PER_SEC = 50U; const unsigned char SCRAMBLER_BYTE1 = 0x70U; const unsigned char SCRAMBLER_BYTE2 = 0x4FU; const unsigned char SCRAMBLER_BYTE3 = 0x93U; +const unsigned char SCRAMBLER_BYTE4 = 0x40U; +const unsigned char SCRAMBLER_BYTE5 = 0x64U; + +const unsigned char FAST_DATA_GUARD_BYTE = 0x02U; const unsigned int DPLUS_PORT = 20001U; const unsigned int DEXTRA_PORT = 30001U; diff --git a/Common/RepeaterHandler.cpp b/Common/RepeaterHandler.cpp index 0736723..bcb958f 100644 --- a/Common/RepeaterHandler.cpp +++ b/Common/RepeaterHandler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2015,2018 by Jonathan Naylor G4KLX + * Copyright (C) 2010-2015,2018,2019 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 @@ -743,7 +743,8 @@ void CRepeaterHandler::processRepeater(CAMBEData& data) // Check for the fast data signature if (!m_fastData) { unsigned char slowDataType = (buffer[VOICE_FRAME_LENGTH_BYTES] ^ SCRAMBLER_BYTE1) & SLOW_DATA_TYPE_MASK; - if (slowDataType == SLOW_DATA_TYPE_FAST_DATA1 || slowDataType == SLOW_DATA_TYPE_FAST_DATA2) + unsigned char guard = data[4U] ^ SCRAMBLER_BYTE5; + if ((slowDataType == SLOW_DATA_TYPE_FAST_DATA1 || slowDataType == SLOW_DATA_TYPE_FAST_DATA2) && guard == FAST_DATA_GUARD_BYTE) { m_fastData = true; } From dd892052451824887e4a4aae095b4cc6784ecbe1 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Wed, 30 Jan 2019 11:07:36 +0000 Subject: [PATCH 103/166] Fix compile issue. --- Common/RepeaterHandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Common/RepeaterHandler.cpp b/Common/RepeaterHandler.cpp index bcb958f..f687e6f 100644 --- a/Common/RepeaterHandler.cpp +++ b/Common/RepeaterHandler.cpp @@ -744,7 +744,7 @@ void CRepeaterHandler::processRepeater(CAMBEData& data) if (!m_fastData) { unsigned char slowDataType = (buffer[VOICE_FRAME_LENGTH_BYTES] ^ SCRAMBLER_BYTE1) & SLOW_DATA_TYPE_MASK; unsigned char guard = data[4U] ^ SCRAMBLER_BYTE5; - if ((slowDataType == SLOW_DATA_TYPE_FAST_DATA1 || slowDataType == SLOW_DATA_TYPE_FAST_DATA2) && guard == FAST_DATA_GUARD_BYTE) { + if ((slowDataType == SLOW_DATA_TYPE_FAST_DATA1 || slowDataType == SLOW_DATA_TYPE_FAST_DATA2) && guard == FAST_DATA_GUARD_BYTE) m_fastData = true; } From 7ea8ac95d04d1c2e5259ae5d06db2756e9bc8c05 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Wed, 30 Jan 2019 11:43:46 +0000 Subject: [PATCH 104/166] Fix compile issue. --- Common/RepeaterHandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Common/RepeaterHandler.cpp b/Common/RepeaterHandler.cpp index f687e6f..64257a0 100644 --- a/Common/RepeaterHandler.cpp +++ b/Common/RepeaterHandler.cpp @@ -743,7 +743,7 @@ void CRepeaterHandler::processRepeater(CAMBEData& data) // Check for the fast data signature if (!m_fastData) { unsigned char slowDataType = (buffer[VOICE_FRAME_LENGTH_BYTES] ^ SCRAMBLER_BYTE1) & SLOW_DATA_TYPE_MASK; - unsigned char guard = data[4U] ^ SCRAMBLER_BYTE5; + unsigned char guard = buffer[4U] ^ SCRAMBLER_BYTE5; if ((slowDataType == SLOW_DATA_TYPE_FAST_DATA1 || slowDataType == SLOW_DATA_TYPE_FAST_DATA2) && guard == FAST_DATA_GUARD_BYTE) m_fastData = true; } From df4a4fb12210933f4960bad493a7fdf8c8c1aae9 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Wed, 30 Jan 2019 20:13:53 +0000 Subject: [PATCH 105/166] Loosen fast data admission criteria. --- Common/RepeaterHandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Common/RepeaterHandler.cpp b/Common/RepeaterHandler.cpp index 64257a0..e2953a6 100644 --- a/Common/RepeaterHandler.cpp +++ b/Common/RepeaterHandler.cpp @@ -744,7 +744,7 @@ void CRepeaterHandler::processRepeater(CAMBEData& data) if (!m_fastData) { unsigned char slowDataType = (buffer[VOICE_FRAME_LENGTH_BYTES] ^ SCRAMBLER_BYTE1) & SLOW_DATA_TYPE_MASK; unsigned char guard = buffer[4U] ^ SCRAMBLER_BYTE5; - if ((slowDataType == SLOW_DATA_TYPE_FAST_DATA1 || slowDataType == SLOW_DATA_TYPE_FAST_DATA2) && guard == FAST_DATA_GUARD_BYTE) + if ((slowDataType == SLOW_DATA_TYPE_FAST_DATA1 || slowDataType == SLOW_DATA_TYPE_FAST_DATA2) /* && guard == FAST_DATA_GUARD_BYTE */) m_fastData = true; } From 9df5e078ff7d0824b3810c46cb5d156e3a703fa0 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Thu, 31 Jan 2019 08:28:22 +0000 Subject: [PATCH 106/166] Remove redundant code. --- Common/DStarDefines.h | 4 ---- Common/RepeaterHandler.cpp | 3 +-- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/Common/DStarDefines.h b/Common/DStarDefines.h index 6d1319e..b0c3972 100644 --- a/Common/DStarDefines.h +++ b/Common/DStarDefines.h @@ -111,10 +111,6 @@ const unsigned int DSTAR_FRAMES_PER_SEC = 50U; const unsigned char SCRAMBLER_BYTE1 = 0x70U; const unsigned char SCRAMBLER_BYTE2 = 0x4FU; const unsigned char SCRAMBLER_BYTE3 = 0x93U; -const unsigned char SCRAMBLER_BYTE4 = 0x40U; -const unsigned char SCRAMBLER_BYTE5 = 0x64U; - -const unsigned char FAST_DATA_GUARD_BYTE = 0x02U; const unsigned int DPLUS_PORT = 20001U; const unsigned int DEXTRA_PORT = 30001U; diff --git a/Common/RepeaterHandler.cpp b/Common/RepeaterHandler.cpp index e2953a6..6f883fb 100644 --- a/Common/RepeaterHandler.cpp +++ b/Common/RepeaterHandler.cpp @@ -743,8 +743,7 @@ void CRepeaterHandler::processRepeater(CAMBEData& data) // Check for the fast data signature if (!m_fastData) { unsigned char slowDataType = (buffer[VOICE_FRAME_LENGTH_BYTES] ^ SCRAMBLER_BYTE1) & SLOW_DATA_TYPE_MASK; - unsigned char guard = buffer[4U] ^ SCRAMBLER_BYTE5; - if ((slowDataType == SLOW_DATA_TYPE_FAST_DATA1 || slowDataType == SLOW_DATA_TYPE_FAST_DATA2) /* && guard == FAST_DATA_GUARD_BYTE */) + if (slowDataType == SLOW_DATA_TYPE_FAST_DATA1 || slowDataType == SLOW_DATA_TYPE_FAST_DATA2) m_fastData = true; } From b8ee3948ed09b4f1f6941e1d918e797b98387068 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Thu, 31 Jan 2019 08:28:36 +0000 Subject: [PATCH 107/166] Bump the version date. --- Common/Version.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Common/Version.h b/Common/Version.h index a65d9b2..dec4f32 100644 --- a/Common/Version.h +++ b/Common/Version.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2015,2018 by Jonathan Naylor G4KLX + * Copyright (C) 2010-2015,2018,2019 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 @@ -24,9 +24,9 @@ const wxString VENDOR_NAME = wxT("G4KLX"); #if defined(__WXDEBUG__) -const wxString VERSION = wxT("20180719 - DEBUG"); +const wxString VERSION = wxT("20190131 - DEBUG"); #else -const wxString VERSION = wxT("20180719"); +const wxString VERSION = wxT("20190131"); #endif #endif From 075fa42d0cada1eca6f4817dcdcb53df7ce44a7e Mon Sep 17 00:00:00 2001 From: Geoffrey Merck F4FXL - KC3FRA Date: Sat, 23 Mar 2019 08:17:42 +0100 Subject: [PATCH 108/166] Allow direct connection using XLX instead of DCS --- Common/DCSHandler.cpp | 33 +++++++++++-------- Common/DCSHandler.h | 4 +++ Common/IRCDDBGatewayConfig.cpp | 21 +++--------- Common/IRCDDBGatewayConfig.h | 4 +-- GUICommon/XLXSet.cpp | 24 +------------- GUICommon/XLXSet.h | 4 +-- ircDDBGateway/IRCDDBGatewayApp.cpp | 6 ++-- ircDDBGateway/IRCDDBGatewayAppD.cpp | 7 ++-- ircDDBGateway/IRCDDBGatewayThread.cpp | 17 +++------- ircDDBGateway/IRCDDBGatewayThread.h | 3 +- .../IRCDDBGatewayConfigFrame.cpp | 8 ++--- 11 files changed, 47 insertions(+), 84 deletions(-) diff --git a/Common/DCSHandler.cpp b/Common/DCSHandler.cpp index 85888d2..ad5281d 100644 --- a/Common/DCSHandler.cpp +++ b/Common/DCSHandler.cpp @@ -39,6 +39,8 @@ CCallsignList* CDCSHandler::m_blackList = NULL; CDCSHandler::CDCSHandler(IReflectorCallback* handler, const wxString& reflector, const wxString& repeater, CDCSProtocolHandler* protoHandler, const in_addr& address, unsigned int port, DIRECTION direction) : m_reflector(reflector.Clone()), +m_xlxReflector(_T("")), +m_isXlx(false), m_repeater(repeater.Clone()), m_handler(protoHandler), m_yourAddress(address), @@ -78,6 +80,11 @@ m_rptCall2() m_linkState = DCS_LINKED; } else { m_linkState = DCS_LINKING; + m_isXlx = m_reflector.StartsWith(_T("XLX")); + if(m_isXlx) { + m_xlxReflector = m_reflector.Clone(); + m_reflector = _T("DCS") + m_reflector.Right(m_reflector.length() - 3); + } m_tryTimer.start(); } } @@ -634,10 +641,10 @@ bool CDCSHandler::processInt(CConnectData& connect, CD_TYPE type) return false; if (m_linkState == DCS_LINKING) { - wxLogMessage(wxT("DCS ACK message received from %s"), m_reflector.c_str()); + wxLogMessage(wxT("DCS ACK message received from %s"), GET_DISP_REFLECTOR(this).c_str()); if (m_direction == DIR_OUTGOING && m_destination != NULL) - m_destination->linkUp(DP_DCS, m_reflector); + m_destination->linkUp(DP_DCS, GET_DISP_REFLECTOR(this)); m_tryTimer.stop(); m_stateChange = true; @@ -651,16 +658,16 @@ bool CDCSHandler::processInt(CConnectData& connect, CD_TYPE type) return false; if (m_linkState == DCS_LINKING) { - wxLogMessage(wxT("DCS NAK message received from %s"), m_reflector.c_str()); + wxLogMessage(wxT("DCS NAK message received from %s"), GET_DISP_REFLECTOR(this).c_str()); if (m_direction == DIR_OUTGOING && m_destination != NULL) - m_destination->linkRefused(DP_DCS, m_reflector); + m_destination->linkRefused(DP_DCS, GET_DISP_REFLECTOR(this)); return true; } if (m_linkState == DCS_UNLINKING) { - wxLogMessage(wxT("DCS NAK message received from %s"), m_reflector.c_str()); + wxLogMessage(wxT("DCS NAK message received from %s"), GET_DISP_REFLECTOR(this).c_str()); if (m_direction == DIR_OUTGOING && m_destination != NULL) m_destination->linkFailed(DP_DCS, m_reflector, false); @@ -675,10 +682,10 @@ bool CDCSHandler::processInt(CConnectData& connect, CD_TYPE type) return false; if (m_linkState == DCS_LINKED) { - wxLogMessage(wxT("DCS disconnect message received from %s"), m_reflector.c_str()); + wxLogMessage(wxT("DCS disconnect message received from %s"), GET_DISP_REFLECTOR(this).c_str()); if (m_direction == DIR_OUTGOING && m_destination != NULL) - m_destination->linkFailed(DP_DCS, m_reflector, false); + m_destination->linkFailed(DP_DCS, GET_DISP_REFLECTOR(this), false); m_stateChange = true; } @@ -706,20 +713,20 @@ bool CDCSHandler::clockInt(unsigned int ms) switch (m_linkState) { case DCS_LINKING: - wxLogMessage(wxT("DCS link to %s has failed to connect"), m_reflector.c_str()); + wxLogMessage(wxT("DCS link to %s has failed to connect"), GET_DISP_REFLECTOR(this).c_str()); break; case DCS_LINKED: - wxLogMessage(wxT("DCS link to %s has failed (poll inactivity)"), m_reflector.c_str()); + wxLogMessage(wxT("DCS link to %s has failed (poll inactivity)"), GET_DISP_REFLECTOR(this).c_str()); break; case DCS_UNLINKING: - wxLogMessage(wxT("DCS link to %s has failed to disconnect cleanly"), m_reflector.c_str()); + wxLogMessage(wxT("DCS link to %s has failed to disconnect cleanly"), GET_DISP_REFLECTOR(this).c_str()); break; default: break; } if (m_direction == DIR_OUTGOING) { - bool reconnect = m_destination->linkFailed(DP_DCS, m_reflector, true); + bool reconnect = m_destination->linkFailed(DP_DCS, GET_DISP_REFLECTOR(this), true); if (reconnect) { CConnectData reply(m_gatewayType, m_repeater, m_reflector, CT_LINK1, m_yourAddress, m_yourPort); m_handler->writeConnect(reply); @@ -844,7 +851,7 @@ void CDCSHandler::writeStatus(wxFFile& file) wxString text; text.Printf(wxT("%04d-%02d-%02d %02d:%02d:%02d: DCS link - Type: Repeater Rptr: %s Refl: %s Dir: Outgoing\n"), tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec, - reflector->m_repeater.c_str(), reflector->m_reflector.c_str()); + reflector->m_repeater.c_str(), GET_DISP_REFLECTOR(reflector).c_str()); file.Write(text); } break; @@ -854,7 +861,7 @@ void CDCSHandler::writeStatus(wxFFile& file) wxString text; text.Printf(wxT("%04d-%02d-%02d %02d:%02d:%02d: DCS link - Type: Repeater Rptr: %s Refl: %s Dir: Incoming\n"), tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec, - reflector->m_repeater.c_str(), reflector->m_reflector.c_str()); + reflector->m_repeater.c_str(), GET_DISP_REFLECTOR(reflector).c_str()); file.Write(text); } break; diff --git a/Common/DCSHandler.h b/Common/DCSHandler.h index d54334a..8cd1caa 100644 --- a/Common/DCSHandler.h +++ b/Common/DCSHandler.h @@ -39,6 +39,8 @@ #include #include +#define GET_DISP_REFLECTOR(refl) (refl->m_isXlx ? refl->m_xlxReflector : refl->m_reflector) + enum DCS_STATE { DCS_LINKING, DCS_LINKED, @@ -109,6 +111,8 @@ private: static CCallsignList* m_blackList; wxString m_reflector; + wxString m_xlxReflector; + bool m_isXlx; wxString m_repeater; CDCSProtocolHandler* m_handler; in_addr m_yourAddress; diff --git a/Common/IRCDDBGatewayConfig.cpp b/Common/IRCDDBGatewayConfig.cpp index 3748933..cbf98f4 100644 --- a/Common/IRCDDBGatewayConfig.cpp +++ b/Common/IRCDDBGatewayConfig.cpp @@ -141,7 +141,6 @@ const wxString KEY_DCS_ENABLED = wxT("dcsEnabled"); const wxString KEY_CCS_ENABLED = wxT("ccsEnabled"); const wxString KEY_CCS_HOST = wxT("ccsHost"); const wxString KEY_XLX_ENABLED = wxT("xlxEnabled"); -const wxString KEY_XLX_OVERRIDE_LOCAL = wxT("xlxOverrideLocal"); const wxString KEY_XLX_HOSTS_FILE_URL = wxT("xlxHostsFileUrl"); const wxString KEY_STARNET_BAND1 = wxT("starNetBand1"); const wxString KEY_STARNET_CALLSIGN1 = wxT("starNetCallsign1"); @@ -267,8 +266,7 @@ const bool DEFAULT_DCS_ENABLED = true; const bool DEFAULT_CCS_ENABLED = true; const wxString DEFAULT_CCS_HOST = wxT("CCS704 "); const bool DEFAULT_XLX_ENABLED = true; -const bool DEFAULT_XLX_OVERRIDE_LOCAL = true; -const wxString DEFAULT_XLX_HOSTS_FILE_URL = _T("http://xlxapi.rlx.lu/api.php?do=GetReflectorHostname"); +const wxString DEFAULT_XLX_HOSTS_FILE_URL = _T("http://xlxapi.rlx.lu/api.php?do=GetXLXDMRMaster");//we use the XLXDMRMaster list because it starts with XLX instead of DCS, XRF etc .... const wxString DEFAULT_STARNET_BAND = wxEmptyString; const wxString DEFAULT_STARNET_CALLSIGN = wxEmptyString; const wxString DEFAULT_STARNET_LOGOFF = wxEmptyString; @@ -422,7 +420,6 @@ m_dcsEnabled(DEFAULT_DCS_ENABLED), m_ccsEnabled(DEFAULT_CCS_ENABLED), m_ccsHost(DEFAULT_CCS_HOST), m_xlxEnabled(DEFAULT_XLX_ENABLED), -m_xlxOverrideLocal(DEFAULT_XLX_OVERRIDE_LOCAL), m_xlxHostsFileUrl(DEFAULT_XLX_HOSTS_FILE_URL), m_starNet1Band(DEFAULT_STARNET_BAND), m_starNet1Callsign(DEFAULT_STARNET_CALLSIGN), @@ -761,9 +758,7 @@ m_y(DEFAULT_WINDOW_Y) m_config->Read(m_name + KEY_CCS_HOST, &m_ccsHost, DEFAULT_CCS_HOST); m_config->Read(m_name + KEY_XLX_ENABLED, &m_xlxEnabled, DEFAULT_XLX_ENABLED); - - m_config->Read(m_name + KEY_XLX_OVERRIDE_LOCAL, &m_xlxOverrideLocal, DEFAULT_XLX_OVERRIDE_LOCAL); - + m_config->Read(m_name + KEY_XLX_HOSTS_FILE_URL, &m_xlxHostsFileUrl, DEFAULT_XLX_HOSTS_FILE_URL); m_config->Read(m_name + KEY_STARNET_BAND1, &m_starNet1Band, DEFAULT_STARNET_BAND); @@ -1045,7 +1040,6 @@ m_dcsEnabled(DEFAULT_DCS_ENABLED), m_ccsEnabled(DEFAULT_CCS_ENABLED), m_ccsHost(DEFAULT_CCS_HOST), m_xlxEnabled(DEFAULT_XLX_ENABLED), -m_xlxOverrideLocal(DEFAULT_XLX_OVERRIDE_LOCAL), m_xlxHostsFileUrl(DEFAULT_XLX_HOSTS_FILE_URL), m_starNet1Band(DEFAULT_STARNET_BAND), m_starNet1Callsign(DEFAULT_STARNET_CALLSIGN), @@ -1438,9 +1432,6 @@ m_y(DEFAULT_WINDOW_Y) } else if (key.IsSameAs(KEY_XLX_ENABLED)) { val.ToLong(&temp1); m_xlxEnabled = temp1 == 1L; - } else if (key.IsSameAs(KEY_XLX_OVERRIDE_LOCAL)) { - val.ToLong(&temp1); - m_xlxOverrideLocal = temp1 == 1L; } else if (key.IsSameAs(KEY_XLX_HOSTS_FILE_URL)) { m_xlxHostsFileUrl = val; } else if (key.IsSameAs(KEY_STARNET_BAND1)) { @@ -1968,17 +1959,15 @@ void CIRCDDBGatewayConfig::setDCS(bool dcsEnabled, bool ccsEnabled, const wxStri m_ccsHost = ccsHost; } -void CIRCDDBGatewayConfig::getXLX(bool& xlxEnabled, bool& xlxOverrideLocal, wxString& xlxHostsFileUrl) +void CIRCDDBGatewayConfig::getXLX(bool& xlxEnabled, wxString& xlxHostsFileUrl) { xlxEnabled = m_xlxEnabled; - xlxOverrideLocal = m_xlxOverrideLocal; xlxHostsFileUrl = m_xlxHostsFileUrl; } -void CIRCDDBGatewayConfig::setXLX(bool xlxEnabled, bool xlxOverrideLocal, wxString xlxHostsFileUrl) +void CIRCDDBGatewayConfig::setXLX(bool xlxEnabled, wxString xlxHostsFileUrl) { m_xlxEnabled = xlxEnabled; - m_xlxOverrideLocal = xlxOverrideLocal; m_xlxHostsFileUrl = xlxHostsFileUrl; } @@ -2419,7 +2408,6 @@ bool CIRCDDBGatewayConfig::write() m_config->Write(m_name + KEY_CCS_ENABLED, m_ccsEnabled); m_config->Write(m_name + KEY_CCS_HOST, m_ccsHost); m_config->Write(m_name + KEY_XLX_ENABLED, m_xlxEnabled); - m_config->Write(m_name + KEY_XLX_OVERRIDE_LOCAL, m_xlxOverrideLocal); m_config->Write(m_name + KEY_XLX_HOSTS_FILE_URL, m_xlxHostsFileUrl); m_config->Write(m_name + KEY_STARNET_BAND1, m_starNet1Band); m_config->Write(m_name + KEY_STARNET_CALLSIGN1, m_starNet1Callsign); @@ -2630,7 +2618,6 @@ bool CIRCDDBGatewayConfig::write() buffer.Printf(wxT("%s=%d"), KEY_CCS_ENABLED.c_str(), m_ccsEnabled ? 1 : 0); file.AddLine(buffer); buffer.Printf(wxT("%s=%s"), KEY_CCS_HOST.c_str(), m_ccsHost.c_str()); file.AddLine(buffer); buffer.Printf(wxT("%s=%d"), KEY_XLX_ENABLED.c_str(), m_xlxEnabled ? 1 : 0); file.AddLine(buffer); - buffer.Printf(wxT("%s=%d"), KEY_XLX_OVERRIDE_LOCAL.c_str(), m_xlxOverrideLocal ? 1 : 0); file.AddLine(buffer); buffer.Printf(wxT("%s=%s"), KEY_XLX_HOSTS_FILE_URL.c_str(), m_xlxHostsFileUrl.c_str()); file.AddLine(buffer); buffer.Printf(wxT("%s=%s"), KEY_STARNET_BAND1.c_str(), m_starNet1Band.c_str()); file.AddLine(buffer); buffer.Printf(wxT("%s=%s"), KEY_STARNET_CALLSIGN1.c_str(), m_starNet1Callsign.c_str()); file.AddLine(buffer); diff --git a/Common/IRCDDBGatewayConfig.h b/Common/IRCDDBGatewayConfig.h index b3a1dc9..962ae31 100644 --- a/Common/IRCDDBGatewayConfig.h +++ b/Common/IRCDDBGatewayConfig.h @@ -71,8 +71,8 @@ public: void getDCS(bool& dcsEnabled, bool& ccsEnabled, wxString& ccsHost) const; void setDCS(bool dcsEnabled, bool ccsEnabled, const wxString& ccsHost); - void getXLX(bool& xlxEnabled, bool& xlxOverrideLocal, wxString& xlxHostsFileUrl); - void setXLX(bool xlxEnabled, bool xlxOverrideLocal, wxString xlxHostsFileUrl); + void getXLX(bool& xlxEnabled, wxString& xlxHostsFileUrl); + void setXLX(bool xlxEnabled, wxString xlxHostsFileUrl); #if defined(DEXTRA_LINK) || defined(DCS_LINK) void getStarNet1(wxString& band, wxString& callsign, wxString& logoff, wxString& info, wxString& permanent, unsigned int& userTimeout, unsigned int& groupTimeout, STARNET_CALLSIGN_SWITCH& callsignSwitch, bool& txMsgSwitch, wxString& reflector) const; diff --git a/GUICommon/XLXSet.cpp b/GUICommon/XLXSet.cpp index 616e6c0..d1497e1 100644 --- a/GUICommon/XLXSet.cpp +++ b/GUICommon/XLXSet.cpp @@ -34,11 +34,10 @@ BEGIN_EVENT_TABLE(CXLXSet, wxPanel) END_EVENT_TABLE() -CXLXSet::CXLXSet(wxWindow* parent, int id, const wxString& title, bool xlxEnabled, bool xlxOverrideLocal, const wxString& xlxHostsFileUrl) : +CXLXSet::CXLXSet(wxWindow* parent, int id, const wxString& title, bool xlxEnabled, const wxString& xlxHostsFileUrl) : wxPanel(parent, id), m_title(title), m_xlxEnabled(NULL), -m_xlxOverrideLocal(NULL), m_xlxHostsFileUrl(NULL) { wxFlexGridSizer* sizer = new wxFlexGridSizer(2); @@ -51,15 +50,6 @@ m_xlxHostsFileUrl(NULL) m_xlxEnabled->Append(_("Enabled")); sizer->Add(m_xlxEnabled, 0, wxALL | wxALIGN_LEFT, BORDER_SIZE); m_xlxEnabled->SetSelection(xlxEnabled ? 1 : 0); - - wxStaticText* xlxOverrideLocalLabel = new wxStaticText(this, -1, _("Override local hosts files")); - sizer->Add(xlxOverrideLocalLabel, 0, wxALL | wxALIGN_RIGHT, BORDER_SIZE); - - m_xlxOverrideLocal = new wxChoice(this, CHOICE_ENABLED, wxDefaultPosition, wxSize(CONTROL_WIDTH, -1)); - m_xlxOverrideLocal->Append(_("No")); - m_xlxOverrideLocal->Append(_("Yes")); - sizer->Add(m_xlxOverrideLocal, 0, wxALL | wxALIGN_LEFT, BORDER_SIZE); - m_xlxOverrideLocal->SetSelection(xlxOverrideLocal ? 1 : 0); wxStaticText* xlxHostsFileUrlLabel = new wxStaticText(this, -1, _("Hosts file URL")); sizer->Add(xlxHostsFileUrlLabel, 0, wxALL | wxALIGN_RIGHT, BORDER_SIZE); @@ -88,10 +78,6 @@ bool CXLXSet::Validate() int n = m_xlxEnabled->GetCurrentSelection(); if (n == wxNOT_FOUND) return false; - - n = m_xlxOverrideLocal->GetCurrentSelection(); - if (n == wxNOT_FOUND) - return false; // TODO F4FXL try to figure out why below symbols are not found under ubuntu /*wxString value = m_xlxHostsFileUrl->GetValue(); @@ -102,14 +88,6 @@ bool CXLXSet::Validate() return true; } -bool CXLXSet::getXLXOverrideLocal() const -{ - int c = m_xlxEnabled->GetCurrentSelection(); - if (c == wxNOT_FOUND) - return false; - - return c == 1; -} bool CXLXSet::getXLXEnabled() const { diff --git a/GUICommon/XLXSet.h b/GUICommon/XLXSet.h index f765b55..fee249f 100644 --- a/GUICommon/XLXSet.h +++ b/GUICommon/XLXSet.h @@ -23,13 +23,12 @@ class CXLXSet : public wxPanel { public: - CXLXSet(wxWindow* parent, int id, const wxString& title, bool xlxEnabled, bool xlxOverrideLocal, const wxString& xlxHostsFileUrl); + CXLXSet(wxWindow* parent, int id, const wxString& title, bool xlxEnabled, const wxString& xlxHostsFileUrl); virtual ~CXLXSet(); virtual bool Validate(); virtual bool getXLXEnabled() const; - virtual bool getXLXOverrideLocal() const; virtual wxString getXLXHostsFileUrl() const; virtual void onEnabled(wxCommandEvent& event); @@ -37,7 +36,6 @@ public: private: wxString m_title; wxChoice* m_xlxEnabled; - wxChoice* m_xlxOverrideLocal; wxTextCtrl* m_xlxHostsFileUrl; DECLARE_EVENT_TABLE() diff --git a/ircDDBGateway/IRCDDBGatewayApp.cpp b/ircDDBGateway/IRCDDBGatewayApp.cpp index 7c50b4b..e135d48 100644 --- a/ircDDBGateway/IRCDDBGatewayApp.cpp +++ b/ircDDBGateway/IRCDDBGatewayApp.cpp @@ -889,8 +889,8 @@ void CIRCDDBGatewayApp::createThread() bool xlxEnabled; bool xlxOverrideLocal; wxString xlxHostsFileUrl; - m_config->getXLX(xlxEnabled, xlxOverrideLocal, xlxHostsFileUrl); - wxLogInfo(wxT("XLX enabled: %d, Override Local %d, Hosts file url: %s"), int(xlxEnabled), int(xlxOverrideLocal), xlxHostsFileUrl.c_str()); + m_config->getXLX(xlxEnabled, xlxHostsFileUrl); + wxLogInfo(wxT("XLX enabled: %d, Hosts file url: %s"), int(xlxEnabled), xlxHostsFileUrl.c_str()); if (repeaterBand1.Len() > 1U || repeaterBand2.Len() > 1U || repeaterBand3.Len() > 1U || repeaterBand4.Len() > 1U) { @@ -960,7 +960,7 @@ void CIRCDDBGatewayApp::createThread() thread->setDExtra(dextraEnabled, dextraMaxDongles); thread->setDCS(dcsEnabled); thread->setCCS(ccsEnabled, ccsHost); - thread->setXLX(xlxEnabled, xlxOverrideLocal, xlxEnabled ? CXLXHostsFileDownloader::Download(xlxHostsFileUrl) : wxString(wxEmptyString)); + thread->setXLX(xlxEnabled, xlxEnabled ? CXLXHostsFileDownloader::Download(xlxHostsFileUrl) : wxString(wxEmptyString)); thread->setInfoEnabled(infoEnabled); thread->setEchoEnabled(echoEnabled); thread->setDTMFEnabled(dtmfEnabled); diff --git a/ircDDBGateway/IRCDDBGatewayAppD.cpp b/ircDDBGateway/IRCDDBGatewayAppD.cpp index fa59b7f..4ea6d25 100644 --- a/ircDDBGateway/IRCDDBGatewayAppD.cpp +++ b/ircDDBGateway/IRCDDBGatewayAppD.cpp @@ -876,10 +876,9 @@ bool CIRCDDBGatewayAppD::createThread() wxLogInfo(wxT("DCS enabled: %d, CCS enabled: %d, server: %s"), int(dcsEnabled), int(ccsEnabled), ccsHost.c_str()); bool xlxEnabled; - bool xlxOverrideLocal; wxString xlxHostsFileUrl; - config.getXLX(xlxEnabled, xlxOverrideLocal, xlxHostsFileUrl); - wxLogInfo(wxT("XLX enabled: %d, Override Local %d, Hosts file url: %s"), int(xlxEnabled), int(xlxOverrideLocal), xlxHostsFileUrl.c_str()); + config.getXLX(xlxEnabled, xlxHostsFileUrl); + wxLogInfo(wxT("XLX enabled: %d, Override Local %d, Hosts file url: %s"), int(xlxEnabled), xlxHostsFileUrl.c_str()); if (repeaterBand1.Len() > 1U || repeaterBand2.Len() > 1U || repeaterBand3.Len() > 1U || repeaterBand4.Len() > 1U) { @@ -948,7 +947,7 @@ bool CIRCDDBGatewayAppD::createThread() m_thread->setDExtra(dextraEnabled, dextraMaxDongles); m_thread->setDCS(dcsEnabled); m_thread->setCCS(ccsEnabled, ccsHost); - m_thread->setXLX(xlxEnabled, xlxOverrideLocal, xlxEnabled ? CXLXHostsFileDownloader::Download(xlxHostsFileUrl): wxString(wxEmptyString)); + m_thread->setXLX(xlxEnabled, xlxEnabled ? CXLXHostsFileDownloader::Download(xlxHostsFileUrl): wxString(wxEmptyString)); m_thread->setInfoEnabled(infoEnabled); m_thread->setEchoEnabled(echoEnabled); m_thread->setDTMFEnabled(dtmfEnabled); diff --git a/ircDDBGateway/IRCDDBGatewayThread.cpp b/ircDDBGateway/IRCDDBGatewayThread.cpp index 6ac8fda..24419a2 100644 --- a/ircDDBGateway/IRCDDBGatewayThread.cpp +++ b/ircDDBGateway/IRCDDBGatewayThread.cpp @@ -583,11 +583,10 @@ void CIRCDDBGatewayThread::setDCS(bool enabled) m_dcsEnabled = enabled; } -void CIRCDDBGatewayThread::setXLX(bool enabled, bool overrideLocal, const wxString& xlxHostsFileName) +void CIRCDDBGatewayThread::setXLX(bool enabled, const wxString& xlxHostsFileName) { m_xlxEnabled = enabled; m_xlxHostsFileName = xlxHostsFileName; - m_xlxOverrideLocal = overrideLocal; } void CIRCDDBGatewayThread::setCCS(bool enabled, const wxString& host) @@ -1118,9 +1117,7 @@ void CIRCDDBGatewayThread::loadGateways() void CIRCDDBGatewayThread::loadReflectors() { - if(m_xlxEnabled && !m_xlxOverrideLocal) { - loadXLXReflectors(); - } + loadXLXReflectors(); if (m_dplusEnabled) { wxFileName fileName(wxFileName::GetHomeDir(), DPLUS_HOSTS_FILE_NAME); @@ -1163,10 +1160,6 @@ void CIRCDDBGatewayThread::loadReflectors() if (fileName.IsFileReadable()) loadDCSReflectors(fileName.GetFullPath()); } - - if(m_xlxEnabled && m_xlxOverrideLocal) { - loadXLXReflectors(); - } } void CIRCDDBGatewayThread::loadDExtraReflectors(const wxString& fileName) @@ -1284,10 +1277,10 @@ void CIRCDDBGatewayThread::loadXLXReflectors() reflector.Truncate(LONG_CALLSIGN_LENGTH - 1U); reflector.Append(wxT("G")); - if(m_dcsEnabled && reflector.StartsWith(wxT("DCS"))) + //if(m_dcsEnabled && reflector.StartsWith(wxT("DCS"))) m_cache.updateGateway(reflector, addrText, DP_DCS, lock, true); - else if(m_dextraEnabled && reflector.StartsWith(wxT("XRF"))) - m_cache.updateGateway(reflector, addrText, DP_DEXTRA, lock, true); + //else if(m_dextraEnabled && reflector.StartsWith(wxT("XRF"))) + // m_cache.updateGateway(reflector, addrText, DP_DEXTRA, lock, true); count++; } diff --git a/ircDDBGateway/IRCDDBGatewayThread.h b/ircDDBGateway/IRCDDBGatewayThread.h index a580a8e..f89361b 100644 --- a/ircDDBGateway/IRCDDBGatewayThread.h +++ b/ircDDBGateway/IRCDDBGatewayThread.h @@ -61,7 +61,7 @@ public: virtual void setDExtra(bool enabled, unsigned int maxDongles); virtual void setDPlus(bool enabled, unsigned int maxDongles, const wxString& login); virtual void setDCS(bool enabled); - virtual void setXLX(bool enabled, bool overrideLocal, const wxString& fileName); + virtual void setXLX(bool enabled, const wxString& fileName); virtual void setCCS(bool enabled, const wxString& host); virtual void setLog(bool enabled); virtual void setAPRSWriter(CAPRSWriter* writer); @@ -109,7 +109,6 @@ private: wxString m_dplusLogin; bool m_dcsEnabled; bool m_xlxEnabled; - bool m_xlxOverrideLocal; wxString m_xlxHostsFileName; bool m_ccsEnabled; wxString m_ccsHost; diff --git a/ircDDBGatewayConfig/IRCDDBGatewayConfigFrame.cpp b/ircDDBGatewayConfig/IRCDDBGatewayConfigFrame.cpp index 1f2765e..80907cd 100644 --- a/ircDDBGatewayConfig/IRCDDBGatewayConfigFrame.cpp +++ b/ircDDBGatewayConfig/IRCDDBGatewayConfigFrame.cpp @@ -104,9 +104,8 @@ m_miscellaneous(NULL) m_config->getDCS(dcsEnabled, ccsEnabled, ccsHost); bool xlxEnabled; - bool xlxOverrideLocal; wxString xlxHostsFileUrl; - m_config->getXLX(xlxEnabled, xlxOverrideLocal, xlxHostsFileUrl); + m_config->getXLX(xlxEnabled, xlxHostsFileUrl); GATEWAY_TYPE gatewayType; wxString gatewayCallsign, gatewayAddress, icomAddress, hbAddress, description1, description2, url; @@ -212,7 +211,7 @@ m_miscellaneous(NULL) m_dcs = new CDCSSet(noteBook, -1, APPLICATION_NAME, dcsEnabled, ccsEnabled, ccsHost); noteBook->AddPage(m_dcs, _("DCS and CCS"), false); - m_xlx = new CXLXSet(noteBook, -1, APPLICATION_NAME, xlxEnabled, xlxOverrideLocal, xlxHostsFileUrl); + m_xlx = new CXLXSet(noteBook, -1, APPLICATION_NAME, xlxEnabled, xlxHostsFileUrl); noteBook->AddPage(m_xlx, _("XLX Hosts File"), false); #if defined(DEXTRA_LINK) || defined(DCS_LINK) @@ -526,9 +525,8 @@ void CIRCDDBGatewayConfigFrame::onSave(wxCommandEvent&) m_config->setDCS(dcsEnabled, ccsEnabled, ccsHost); bool xlxEnabled = m_xlx->getXLXEnabled(); - bool xlxOverrideLocal = m_xlx->getXLXOverrideLocal(); wxString xlxHostsFileUrl = m_xlx->getXLXHostsFileUrl(); - m_config->setXLX(xlxEnabled, xlxOverrideLocal, xlxHostsFileUrl); + m_config->setXLX(xlxEnabled, xlxHostsFileUrl); wxString starNetBand1 = m_starNet1->getBand(); wxString starNetCallsign1 = m_starNet1->getCallsign(); From e19b61fcdb0bd2a53bccce822a4e9f0123a1d6d4 Mon Sep 17 00:00:00 2001 From: Geoffrey Merck F4FXL - KC3FRA Date: Sun, 24 Mar 2019 06:11:22 +0100 Subject: [PATCH 109/166] Add missing if for xlx loading --- ircDDBGateway/IRCDDBGatewayThread.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ircDDBGateway/IRCDDBGatewayThread.cpp b/ircDDBGateway/IRCDDBGatewayThread.cpp index 24419a2..394b3a7 100644 --- a/ircDDBGateway/IRCDDBGatewayThread.cpp +++ b/ircDDBGateway/IRCDDBGatewayThread.cpp @@ -1117,7 +1117,8 @@ void CIRCDDBGatewayThread::loadGateways() void CIRCDDBGatewayThread::loadReflectors() { - loadXLXReflectors(); + if(m_xlxEnabled) + loadXLXReflectors(); if (m_dplusEnabled) { wxFileName fileName(wxFileName::GetHomeDir(), DPLUS_HOSTS_FILE_NAME); From 59a9832e5d8f48f27ed2693ad930df42fd49a6c2 Mon Sep 17 00:00:00 2001 From: Geoffrey Merck F4FXL - KC3FRA Date: Sun, 24 Mar 2019 06:42:13 +0100 Subject: [PATCH 110/166] Undefined XLX_USE_WGET as it will not run under windows Updated Makefile to link with wx net --- Common/XLXHostsFileDownloader.h | 2 +- Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Common/XLXHostsFileDownloader.h b/Common/XLXHostsFileDownloader.h index 7fba376..1b51160 100644 --- a/Common/XLXHostsFileDownloader.h +++ b/Common/XLXHostsFileDownloader.h @@ -19,7 +19,7 @@ #ifndef XLXHostsFileDownloader_H #define XLXHostsFileDownloader_H -#define XLX_USE_WGET +//#define XLX_USE_WGET #include class CXLXHostsFileDownloader { diff --git a/Makefile b/Makefile index 1610fd0..8fe238c 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ export BINDIR := "/usr/bin" export CXX := $(shell wx-config --cxx) export CFLAGS := -O2 -Wall $(shell wx-config --cxxflags) -DLOG_DIR='$(LOGDIR)' -DCONF_DIR='$(CONFDIR)' -DDATA_DIR='$(DATADIR)' export GUILIBS := $(shell wx-config --libs adv,core,base) -export LIBS := $(shell wx-config --libs base) +export LIBS := $(shell wx-config --libs base,net) export LDFLAGS := .PHONY: all From bf83762e2c4da2e5f1ebf35181f6f60beacd8b47 Mon Sep 17 00:00:00 2001 From: Geoffrey Merck F4FXL - KC3FRA Date: Sun, 24 Mar 2019 06:55:31 +0100 Subject: [PATCH 111/166] Fix remote control reporting XLX as DCS --- Common/DCSHandler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Common/DCSHandler.cpp b/Common/DCSHandler.cpp index ad5281d..bbcd5a5 100644 --- a/Common/DCSHandler.cpp +++ b/Common/DCSHandler.cpp @@ -169,10 +169,10 @@ void CDCSHandler::getInfo(IReflectorCallback* handler, CRemoteRepeaterData& data if (reflector->m_destination == handler) { if (reflector->m_direction == DIR_INCOMING && reflector->m_repeater.IsEmpty()) { if (reflector->m_linkState != DCS_UNLINKING) - data.addLink(reflector->m_reflector, PROTO_DCS, reflector->m_linkState == DCS_LINKED, DIR_INCOMING, true); + data.addLink(GET_DISP_REFLECTOR(reflector), PROTO_DCS, reflector->m_linkState == DCS_LINKED, DIR_INCOMING, true); } else { if (reflector->m_linkState != DCS_UNLINKING) - data.addLink(reflector->m_reflector, PROTO_DCS, reflector->m_linkState == DCS_LINKED, reflector->m_direction, false); + data.addLink(GET_DISP_REFLECTOR(reflector), PROTO_DCS, reflector->m_linkState == DCS_LINKED, reflector->m_direction, false); } } } From ff62562e3ac824e8fe94f67a5f92796bc05921a5 Mon Sep 17 00:00:00 2001 From: Geoffrey Merck F4FXL - KC3FRA Date: Sun, 24 Mar 2019 07:45:59 +0100 Subject: [PATCH 112/166] Ignore XLX reflectors not starting with XLX --- ircDDBGateway/IRCDDBGatewayThread.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ircDDBGateway/IRCDDBGatewayThread.cpp b/ircDDBGateway/IRCDDBGatewayThread.cpp index 394b3a7..09c2ed0 100644 --- a/ircDDBGateway/IRCDDBGatewayThread.cpp +++ b/ircDDBGateway/IRCDDBGatewayThread.cpp @@ -1262,6 +1262,10 @@ void CIRCDDBGatewayThread::loadXLXReflectors() CHostFile hostFile = CHostFile(m_xlxHostsFileName, true); for (unsigned int i = 0U; i < hostFile.getCount(); i++) { wxString reflector = hostFile.getName(i); + + if(!reflector.StartsWith(_T("XLX"))) + continue; + in_addr address = CUDPReaderWriter::lookup(hostFile.getAddress(i)); bool lock = hostFile.getLock(i); From 3a87e91b5eed2ea90e83037e6dd973ff24989e98 Mon Sep 17 00:00:00 2001 From: Geoffrey Merck F4FXL - KC3FRA Date: Sun, 24 Mar 2019 07:54:27 +0100 Subject: [PATCH 113/166] Remove unused variable --- ircDDBGateway/IRCDDBGatewayApp.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/ircDDBGateway/IRCDDBGatewayApp.cpp b/ircDDBGateway/IRCDDBGatewayApp.cpp index e135d48..3b03695 100644 --- a/ircDDBGateway/IRCDDBGatewayApp.cpp +++ b/ircDDBGateway/IRCDDBGatewayApp.cpp @@ -887,7 +887,6 @@ void CIRCDDBGatewayApp::createThread() wxLogInfo(wxT("DCS enabled: %d, CCS enabled: %d, server: %s"), int(dcsEnabled), int(ccsEnabled), ccsHost.c_str()); bool xlxEnabled; - bool xlxOverrideLocal; wxString xlxHostsFileUrl; m_config->getXLX(xlxEnabled, xlxHostsFileUrl); wxLogInfo(wxT("XLX enabled: %d, Hosts file url: %s"), int(xlxEnabled), xlxHostsFileUrl.c_str()); From 70394878168485e6f40e576944adcfd8a106b412 Mon Sep 17 00:00:00 2001 From: Geoffrey Merck F4FXL - KC3FRA Date: Sun, 24 Mar 2019 07:54:50 +0100 Subject: [PATCH 114/166] Add wx net lib linking --- MakefileGUI | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MakefileGUI b/MakefileGUI index e3ee47d..4c90842 100644 --- a/MakefileGUI +++ b/MakefileGUI @@ -9,7 +9,7 @@ export BINDIR := "/usr/bin" export CXX := $(shell wx-config --cxx) export CFLAGS := -O2 -Wall $(shell wx-config --cxxflags) -DLOG_DIR='$(LOGDIR)' -DCONF_DIR='$(CONFDIR)' -DDATA_DIR='$(DATADIR)' export GUILIBS := $(shell wx-config --libs adv,core,base) -export LIBS := $(shell wx-config --libs base) +export LIBS := $(shell wx-config --libs base,net) export LDFLAGS := .PHONY: all From 25eeee30b7fc169fe017d06c18107e1ac24f8034 Mon Sep 17 00:00:00 2001 From: Geoffrey Merck F4FXL - KC3FRA Date: Sun, 24 Mar 2019 17:29:03 +0100 Subject: [PATCH 115/166] Always use wget on linux to download the XLX host file as some distros are missing wxhttp --- Common/XLXHostsFileDownloader.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Common/XLXHostsFileDownloader.h b/Common/XLXHostsFileDownloader.h index 1b51160..f5cbf7e 100644 --- a/Common/XLXHostsFileDownloader.h +++ b/Common/XLXHostsFileDownloader.h @@ -19,7 +19,9 @@ #ifndef XLXHostsFileDownloader_H #define XLXHostsFileDownloader_H -//#define XLX_USE_WGET +#if !defined (_WINDOWS__) +#define XLX_USE_WGET //for som reason libwx is missing the net stuff on some distros, therefore always use wget if we are not compiling under windows +#endif #include class CXLXHostsFileDownloader { From a70fd0510d9070971b2f8f590d2852c78f1b006d Mon Sep 17 00:00:00 2001 From: Geoffrey Merck F4FXL - KC3FRA Date: Sun, 24 Mar 2019 17:31:51 +0100 Subject: [PATCH 116/166] Typo --- Common/XLXHostsFileDownloader.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Common/XLXHostsFileDownloader.h b/Common/XLXHostsFileDownloader.h index f5cbf7e..2112b1e 100644 --- a/Common/XLXHostsFileDownloader.h +++ b/Common/XLXHostsFileDownloader.h @@ -20,7 +20,7 @@ #ifndef XLXHostsFileDownloader_H #define XLXHostsFileDownloader_H #if !defined (_WINDOWS__) -#define XLX_USE_WGET //for som reason libwx is missing the net stuff on some distros, therefore always use wget if we are not compiling under windows +#define XLX_USE_WGET //for some reason libwx is missing the net stuff on some distros, therefore always use wget if we are not compiling under windows #endif #include From 55573f77fe34a59563c57a0d42f8a786ddf46265 Mon Sep 17 00:00:00 2001 From: Geoffrey Merck F4FXL - KC3FRA Date: Tue, 26 Mar 2019 06:53:30 +0100 Subject: [PATCH 117/166] Load default XLX URL when the key is present in the config and no value is specified --- Common/IRCDDBGatewayConfig.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Common/IRCDDBGatewayConfig.cpp b/Common/IRCDDBGatewayConfig.cpp index cbf98f4..9e4fcd6 100644 --- a/Common/IRCDDBGatewayConfig.cpp +++ b/Common/IRCDDBGatewayConfig.cpp @@ -760,6 +760,8 @@ m_y(DEFAULT_WINDOW_Y) m_config->Read(m_name + KEY_XLX_ENABLED, &m_xlxEnabled, DEFAULT_XLX_ENABLED); m_config->Read(m_name + KEY_XLX_HOSTS_FILE_URL, &m_xlxHostsFileUrl, DEFAULT_XLX_HOSTS_FILE_URL); + if(m_xlxEnabled && m_xlxHostsFileUrl.isEmpty())//To avoid support nightmare, fill the url with the default one when xlx is enabled and the url is left empty + m_xlxHostsFileName = DEFAULT_XLX_HOSTS_FILE_URL; m_config->Read(m_name + KEY_STARNET_BAND1, &m_starNet1Band, DEFAULT_STARNET_BAND); @@ -1432,7 +1434,7 @@ m_y(DEFAULT_WINDOW_Y) } else if (key.IsSameAs(KEY_XLX_ENABLED)) { val.ToLong(&temp1); m_xlxEnabled = temp1 == 1L; - } else if (key.IsSameAs(KEY_XLX_HOSTS_FILE_URL)) { + } else if (key.IsSameAs(KEY_XLX_HOSTS_FILE_URL) && !val.IsEmpty()) { //always load default url if the value in the config file is empty m_xlxHostsFileUrl = val; } else if (key.IsSameAs(KEY_STARNET_BAND1)) { m_starNet1Band = val; From 746430b9bff65f79c456e0d7db3837880fbce107 Mon Sep 17 00:00:00 2001 From: Geoffrey Merck F4FXL - KC3FRA Date: Tue, 26 Mar 2019 11:07:57 +0100 Subject: [PATCH 118/166] Fix broken windows build --- Common/IRCDDBGatewayConfig.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Common/IRCDDBGatewayConfig.cpp b/Common/IRCDDBGatewayConfig.cpp index 9e4fcd6..0d9690d 100644 --- a/Common/IRCDDBGatewayConfig.cpp +++ b/Common/IRCDDBGatewayConfig.cpp @@ -760,8 +760,8 @@ m_y(DEFAULT_WINDOW_Y) m_config->Read(m_name + KEY_XLX_ENABLED, &m_xlxEnabled, DEFAULT_XLX_ENABLED); m_config->Read(m_name + KEY_XLX_HOSTS_FILE_URL, &m_xlxHostsFileUrl, DEFAULT_XLX_HOSTS_FILE_URL); - if(m_xlxEnabled && m_xlxHostsFileUrl.isEmpty())//To avoid support nightmare, fill the url with the default one when xlx is enabled and the url is left empty - m_xlxHostsFileName = DEFAULT_XLX_HOSTS_FILE_URL; + if(m_xlxEnabled && m_xlxHostsFileUrl.IsEmpty())//To avoid support nightmare, fill the url with the default one when xlx is enabled and the url is left empty + m_xlxHostsFileUrl = DEFAULT_XLX_HOSTS_FILE_URL; m_config->Read(m_name + KEY_STARNET_BAND1, &m_starNet1Band, DEFAULT_STARNET_BAND); From 95b9bd50bdc8cb91184a9e4fc29cc31b2378510d Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Tue, 2 Apr 2019 07:53:36 +0100 Subject: [PATCH 119/166] Small code cleanups. --- Common/DCSHandler.cpp | 8 ++++---- Common/IRCDDBGatewayConfig.cpp | 2 +- ircDDBGateway/IRCDDBGatewayThread.cpp | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Common/DCSHandler.cpp b/Common/DCSHandler.cpp index bbcd5a5..2016805 100644 --- a/Common/DCSHandler.cpp +++ b/Common/DCSHandler.cpp @@ -39,7 +39,7 @@ CCallsignList* CDCSHandler::m_blackList = NULL; CDCSHandler::CDCSHandler(IReflectorCallback* handler, const wxString& reflector, const wxString& repeater, CDCSProtocolHandler* protoHandler, const in_addr& address, unsigned int port, DIRECTION direction) : m_reflector(reflector.Clone()), -m_xlxReflector(_T("")), +m_xlxReflector(), m_isXlx(false), m_repeater(repeater.Clone()), m_handler(protoHandler), @@ -80,10 +80,10 @@ m_rptCall2() m_linkState = DCS_LINKED; } else { m_linkState = DCS_LINKING; - m_isXlx = m_reflector.StartsWith(_T("XLX")); - if(m_isXlx) { + m_isXlx = m_reflector.StartsWith(wxT("XLX")); + if (m_isXlx) { m_xlxReflector = m_reflector.Clone(); - m_reflector = _T("DCS") + m_reflector.Right(m_reflector.length() - 3); + m_reflector = wxT("DCS") + m_reflector.Right(m_reflector.length() - 3); } m_tryTimer.start(); } diff --git a/Common/IRCDDBGatewayConfig.cpp b/Common/IRCDDBGatewayConfig.cpp index 0d9690d..a84b4ce 100644 --- a/Common/IRCDDBGatewayConfig.cpp +++ b/Common/IRCDDBGatewayConfig.cpp @@ -266,7 +266,7 @@ const bool DEFAULT_DCS_ENABLED = true; const bool DEFAULT_CCS_ENABLED = true; const wxString DEFAULT_CCS_HOST = wxT("CCS704 "); const bool DEFAULT_XLX_ENABLED = true; -const wxString DEFAULT_XLX_HOSTS_FILE_URL = _T("http://xlxapi.rlx.lu/api.php?do=GetXLXDMRMaster");//we use the XLXDMRMaster list because it starts with XLX instead of DCS, XRF etc .... +const wxString DEFAULT_XLX_HOSTS_FILE_URL = wxT("http://xlxapi.rlx.lu/api.php?do=GetXLXDMRMaster");//we use the XLXDMRMaster list because it starts with XLX instead of DCS, XRF etc .... const wxString DEFAULT_STARNET_BAND = wxEmptyString; const wxString DEFAULT_STARNET_CALLSIGN = wxEmptyString; const wxString DEFAULT_STARNET_LOGOFF = wxEmptyString; diff --git a/ircDDBGateway/IRCDDBGatewayThread.cpp b/ircDDBGateway/IRCDDBGatewayThread.cpp index 09c2ed0..37b8b59 100644 --- a/ircDDBGateway/IRCDDBGatewayThread.cpp +++ b/ircDDBGateway/IRCDDBGatewayThread.cpp @@ -1117,7 +1117,7 @@ void CIRCDDBGatewayThread::loadGateways() void CIRCDDBGatewayThread::loadReflectors() { - if(m_xlxEnabled) + if (m_xlxEnabled) loadXLXReflectors(); if (m_dplusEnabled) { @@ -1263,7 +1263,7 @@ void CIRCDDBGatewayThread::loadXLXReflectors() for (unsigned int i = 0U; i < hostFile.getCount(); i++) { wxString reflector = hostFile.getName(i); - if(!reflector.StartsWith(_T("XLX"))) + if (!reflector.StartsWith(wxT("XLX"))) continue; in_addr address = CUDPReaderWriter::lookup(hostFile.getAddress(i)); @@ -1282,9 +1282,9 @@ void CIRCDDBGatewayThread::loadXLXReflectors() reflector.Truncate(LONG_CALLSIGN_LENGTH - 1U); reflector.Append(wxT("G")); - //if(m_dcsEnabled && reflector.StartsWith(wxT("DCS"))) + //if (m_dcsEnabled && reflector.StartsWith(wxT("DCS"))) m_cache.updateGateway(reflector, addrText, DP_DCS, lock, true); - //else if(m_dextraEnabled && reflector.StartsWith(wxT("XRF"))) + //else if (m_dextraEnabled && reflector.StartsWith(wxT("XRF"))) // m_cache.updateGateway(reflector, addrText, DP_DEXTRA, lock, true); count++; From 9f545a510ed17582bc488adf03d68bf809c767da Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Tue, 2 Apr 2019 07:54:20 +0100 Subject: [PATCH 120/166] Bump the version date. --- Common/Version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Common/Version.h b/Common/Version.h index dec4f32..36c6527 100644 --- a/Common/Version.h +++ b/Common/Version.h @@ -24,9 +24,9 @@ const wxString VENDOR_NAME = wxT("G4KLX"); #if defined(__WXDEBUG__) -const wxString VERSION = wxT("20190131 - DEBUG"); +const wxString VERSION = wxT("20190402 - DEBUG"); #else -const wxString VERSION = wxT("20190131"); +const wxString VERSION = wxT("20190402"); #endif #endif From e004be9fff609691d15badb80ba420dcd4f6e273 Mon Sep 17 00:00:00 2001 From: ernix66 Date: Thu, 4 Apr 2019 22:25:51 +0200 Subject: [PATCH 121/166] Update DCS_Hosts.txt XLX311 IP Address change --- Data/DCS_Hosts.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Data/DCS_Hosts.txt b/Data/DCS_Hosts.txt index 02894d3..d1294f8 100644 --- a/Data/DCS_Hosts.txt +++ b/Data/DCS_Hosts.txt @@ -143,7 +143,7 @@ DCS303 75.70.52.143 DCS305 145.239.116.57 DCS307 72.21.76.154 DCS310 52.11.207.121 -DCS311 78.47.206.12 +DCS311 46.41.0.214 DCS312 192.241.160.183 DCS313 34.213.108.164 DCS315 65.101.7.50 From 9fa6e9a54a87d01877c8c5509c8c6bbd350f15bb Mon Sep 17 00:00:00 2001 From: ernix66 Date: Thu, 4 Apr 2019 22:26:32 +0200 Subject: [PATCH 122/166] Update DExtra_Hosts.txt XLX311 IP Address change --- Data/DExtra_Hosts.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Data/DExtra_Hosts.txt b/Data/DExtra_Hosts.txt index 6b03a3d..03873a5 100644 --- a/Data/DExtra_Hosts.txt +++ b/Data/DExtra_Hosts.txt @@ -137,7 +137,7 @@ XRF303 75.70.52.143 XRF305 145.239.116.57 XRF307 72.21.76.154 XRF310 52.11.207.121 -XRF311 78.47.206.12 +XRF311 46.41.0.214 XRF312 192.241.160.183 XRF313 34.213.108.164 XRF315 65.101.7.50 From 99e96a1024bf6bcb4d6c7b55e428e72a05472943 Mon Sep 17 00:00:00 2001 From: ernix66 Date: Thu, 4 Apr 2019 22:27:10 +0200 Subject: [PATCH 123/166] Update DPlus_Hosts.txt XLX311 IP Address change --- Data/DPlus_Hosts.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Data/DPlus_Hosts.txt b/Data/DPlus_Hosts.txt index 476a60d..a8479b0 100644 --- a/Data/DPlus_Hosts.txt +++ b/Data/DPlus_Hosts.txt @@ -142,7 +142,7 @@ REF303 75.70.52.143 REF305 145.239.116.57 REF307 72.21.76.154 REF310 52.11.207.121 -REF311 78.47.206.12 +REF311 46.41.0.214 REF312 192.241.160.183 REF313 34.213.108.164 REF315 65.101.7.50 From dff387f06ff6aafe31089c8e98d4ce913a667df5 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Fri, 5 Apr 2019 07:36:07 +0100 Subject: [PATCH 124/166] Update XRF038's IP address. --- Data/DExtra_Hosts.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Data/DExtra_Hosts.txt b/Data/DExtra_Hosts.txt index 03873a5..02a0b89 100644 --- a/Data/DExtra_Hosts.txt +++ b/Data/DExtra_Hosts.txt @@ -23,7 +23,7 @@ XRF030 194.59.177.44 XRF032 158.64.26.140 XRF033 46.226.178.81 XRF035 45.79.94.184 -XRF038 5.249.151.111 +XRF038 44.103.34.19 XRF039 31.14.142.119 XRF040 109.71.45.29 XRF046 176.10.140.161 From a2e459676d23624eea2d9a24460d1efe6952d106 Mon Sep 17 00:00:00 2001 From: Geoffrey Merck F4FXL - KC3FRA Date: Mon, 8 Apr 2019 09:16:05 +0200 Subject: [PATCH 125/166] Add DTMF connection for XLX --- Common/DTMF.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Common/DTMF.cpp b/Common/DTMF.cpp index a05cbed..77c7287 100644 --- a/Common/DTMF.cpp +++ b/Common/DTMF.cpp @@ -167,6 +167,8 @@ wxString CDTMF::translate() return processReflector(wxT("XRF"), command.Mid(1U)); else if (command.GetChar(0U) == wxT('D')) return processReflector(wxT("DCS"), command.Mid(1U)); + else if (command.GetChar(0U) == wxT('#')) + return processReflector(wxT("XLX"), command.Mid(1U)); else return processCCS(command); } From 21a782887f5905488746f011cb9890cff57547e3 Mon Sep 17 00:00:00 2001 From: Geoffrey Merck F4FXL - KC3FRA Date: Mon, 8 Apr 2019 13:56:42 +0200 Subject: [PATCH 126/166] Changed # for A for XLX linking ... --- Common/DTMF.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Common/DTMF.cpp b/Common/DTMF.cpp index 77c7287..bab79c3 100644 --- a/Common/DTMF.cpp +++ b/Common/DTMF.cpp @@ -167,7 +167,7 @@ wxString CDTMF::translate() return processReflector(wxT("XRF"), command.Mid(1U)); else if (command.GetChar(0U) == wxT('D')) return processReflector(wxT("DCS"), command.Mid(1U)); - else if (command.GetChar(0U) == wxT('#')) + else if (command.GetChar(0U) == wxT('A')) return processReflector(wxT("XLX"), command.Mid(1U)); else return processCCS(command); From 5eff889929b78caf25da4eb354f847b5a10e9bdc Mon Sep 17 00:00:00 2001 From: Geoffrey Merck F4FXL - KC3FRA Date: Wed, 17 Apr 2019 10:42:18 +0200 Subject: [PATCH 127/166] Fix Windows build asking for wget --- Common/XLXHostsFileDownloader.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Common/XLXHostsFileDownloader.h b/Common/XLXHostsFileDownloader.h index 2112b1e..b7212a9 100644 --- a/Common/XLXHostsFileDownloader.h +++ b/Common/XLXHostsFileDownloader.h @@ -19,10 +19,12 @@ #ifndef XLXHostsFileDownloader_H #define XLXHostsFileDownloader_H -#if !defined (_WINDOWS__) + +#include + +#if !defined (__WINDOWS__) #define XLX_USE_WGET //for some reason libwx is missing the net stuff on some distros, therefore always use wget if we are not compiling under windows #endif -#include class CXLXHostsFileDownloader { public: From 0fff5f489c4ef8133395a475ff0840489e33f2a1 Mon Sep 17 00:00:00 2001 From: Geoffrey Merck F4FXL - KC3FRA Date: Thu, 18 Apr 2019 08:18:37 +0200 Subject: [PATCH 128/166] Add XLX URL Validation under windows. Fix empty string always returned for XLX URL --- GUICommon/XLXSet.cpp | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/GUICommon/XLXSet.cpp b/GUICommon/XLXSet.cpp index d1497e1..0cfd75b 100644 --- a/GUICommon/XLXSet.cpp +++ b/GUICommon/XLXSet.cpp @@ -20,6 +20,8 @@ #include "XLXSet.h" #include "Defs.h" +#include + // TODO F4FXL try to figure out why below symbols are not found under ubuntu //#include @@ -79,13 +81,17 @@ bool CXLXSet::Validate() if (n == wxNOT_FOUND) return false; +#if defined(__WINDOWS__) // TODO F4FXL try to figure out why below symbols are not found under ubuntu - /*wxString value = m_xlxHostsFileUrl->GetValue(); + wxString value = m_xlxHostsFileUrl->GetValue(); wxURL url(value); - if (url.GetError() != wxURL_NOERR) - return false;*/ + if (url.GetError() == wxURL_NOERR) + return true; + return false; +#else return true; +#endif } @@ -102,13 +108,16 @@ wxString CXLXSet::getXLXHostsFileUrl() const { wxString value = m_xlxHostsFileUrl->GetValue(); - +#if defined(__WINDOWS__) // TODO F4FXL try to figure out why below symbols are not found under ubuntu - //wxURL url(value); - //if (url.GetError() == wxURL_NOERR) - // return value; - + wxURL url(value); + if (url.GetError() == wxURL_NOERR) + return value; + return wxEmptyString; +#else + return value; +#endif } void CXLXSet::onEnabled(wxCommandEvent &event) From 87e1a31e7d8dc361b77a99688c28b44d7319ad7e Mon Sep 17 00:00:00 2001 From: Geoffrey Merck F4FXL - KC3FRA Date: Thu, 18 Apr 2019 08:20:27 +0200 Subject: [PATCH 129/166] Pi-Star puts a blank for empty values in config files, this breaks default value handling. Implement a work around for XLX URL. Should this be rather addressed on pi-star end ? --- Common/IRCDDBGatewayConfig.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Common/IRCDDBGatewayConfig.cpp b/Common/IRCDDBGatewayConfig.cpp index a84b4ce..e796555 100644 --- a/Common/IRCDDBGatewayConfig.cpp +++ b/Common/IRCDDBGatewayConfig.cpp @@ -760,7 +760,7 @@ m_y(DEFAULT_WINDOW_Y) m_config->Read(m_name + KEY_XLX_ENABLED, &m_xlxEnabled, DEFAULT_XLX_ENABLED); m_config->Read(m_name + KEY_XLX_HOSTS_FILE_URL, &m_xlxHostsFileUrl, DEFAULT_XLX_HOSTS_FILE_URL); - if(m_xlxEnabled && m_xlxHostsFileUrl.IsEmpty())//To avoid support nightmare, fill the url with the default one when xlx is enabled and the url is left empty + if(m_xlxEnabled && m_xlxHostsFileUrl.Trim().IsEmpty())//To avoid support nightmare, fill the url with the default one when xlx is enabled and the url is left empty m_xlxHostsFileUrl = DEFAULT_XLX_HOSTS_FILE_URL; m_config->Read(m_name + KEY_STARNET_BAND1, &m_starNet1Band, DEFAULT_STARNET_BAND); @@ -1434,7 +1434,7 @@ m_y(DEFAULT_WINDOW_Y) } else if (key.IsSameAs(KEY_XLX_ENABLED)) { val.ToLong(&temp1); m_xlxEnabled = temp1 == 1L; - } else if (key.IsSameAs(KEY_XLX_HOSTS_FILE_URL) && !val.IsEmpty()) { //always load default url if the value in the config file is empty + } else if (key.IsSameAs(KEY_XLX_HOSTS_FILE_URL) && !val.Trim().IsEmpty()) { //always load default url if the value in the config file is empty m_xlxHostsFileUrl = val; } else if (key.IsSameAs(KEY_STARNET_BAND1)) { m_starNet1Band = val; From 9ab2841100c7c2c6d8073abdc6eb322af319818c Mon Sep 17 00:00:00 2001 From: Geoffrey Merck F4FXL - KC3FRA Date: Thu, 18 Apr 2019 14:35:46 +0200 Subject: [PATCH 130/166] Add error message on invalid XLX URL --- GUICommon/XLXSet.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/GUICommon/XLXSet.cpp b/GUICommon/XLXSet.cpp index 0cfd75b..7d04f98 100644 --- a/GUICommon/XLXSet.cpp +++ b/GUICommon/XLXSet.cpp @@ -88,6 +88,8 @@ bool CXLXSet::Validate() if (url.GetError() == wxURL_NOERR) return true; + wxMessageDialog dialog(this, _("The XLX host file URL is not valid"), m_title + _(" Error"), wxICON_ERROR); + dialog.ShowModal(); return false; #else return true; From f7bf375bea5740897651aceef9e26c39e957aabc Mon Sep 17 00:00:00 2001 From: Geoffrey Merck F4FXL - KC3FRA Date: Fri, 19 Apr 2019 08:27:47 +0200 Subject: [PATCH 131/166] Fix segmentaton fault on exit --- ircDDBGateway/IRCDDBGatewayApp.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ircDDBGateway/IRCDDBGatewayApp.cpp b/ircDDBGateway/IRCDDBGatewayApp.cpp index 3b03695..1101563 100644 --- a/ircDDBGateway/IRCDDBGatewayApp.cpp +++ b/ircDDBGateway/IRCDDBGatewayApp.cpp @@ -171,8 +171,10 @@ int CIRCDDBGatewayApp::OnExit() wxLogInfo(APPLICATION_NAME + wxT(" is exiting")); - //m_thread->kill(); - wxGetApp().GetTopWindow()->Close(); + m_thread->kill(); + wxWindow * topWin = wxGetApp().GetTopWindow(); + if (topWin != NULL) + topWin->Close(); delete m_config; From 387f8750582bd1f037487522afc9d7536f03bfda Mon Sep 17 00:00:00 2001 From: Geoffrey Merck Date: Sun, 21 Apr 2019 08:41:23 +0200 Subject: [PATCH 132/166] Fix C4706 warning --- Common/XLXHostsFileDownloader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Common/XLXHostsFileDownloader.cpp b/Common/XLXHostsFileDownloader.cpp index 438e770..869ddd0 100644 --- a/Common/XLXHostsFileDownloader.cpp +++ b/Common/XLXHostsFileDownloader.cpp @@ -66,8 +66,8 @@ wxString CXLXHostsFileDownloader::Download(const wxString & xlxHostsFileURL) return wxEmptyString; } - wxInputStream* in = NULL; - if((in = http.GetInputStream(path)) && in->IsOk()) { + wxInputStream* in = http.GetInputStream(path); + if(in != NULL && in->IsOk()) { wxFile file; wxString xlxHostsFileName = wxFileName::CreateTempFileName(_T("XLX_Hosts_"), &file); wxLogMessage(_T("Created temporary file %s"), xlxHostsFileName); From efb68b17efbcf5a1e826cc022b51f1196276984d Mon Sep 17 00:00:00 2001 From: Geoffrey Merck Date: Sun, 21 Apr 2019 08:45:29 +0200 Subject: [PATCH 133/166] Fix Mobile GPS Typo Fix misleading error message on mobile GPS settings validation --- GUICommon/MobileGPSSet.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GUICommon/MobileGPSSet.cpp b/GUICommon/MobileGPSSet.cpp index cc1a5d9..ce67cb4 100644 --- a/GUICommon/MobileGPSSet.cpp +++ b/GUICommon/MobileGPSSet.cpp @@ -79,7 +79,7 @@ bool CMobileGPSSet::Validate() wxString address = getAddress(); if (address.IsEmpty()) { - wxMessageDialog dialog(this, _("The Repeater Address is not valid"), m_title + _(" Error"), wxICON_ERROR); + wxMessageDialog dialog(this, _("The Mobile GPS Address is not valid"), m_title + _(" Error"), wxICON_ERROR); dialog.ShowModal(); return false; } @@ -87,7 +87,7 @@ bool CMobileGPSSet::Validate() unsigned int port = getPort(); if (port == 0U || port > 65535U) { - wxMessageDialog dialog(this, _("The Repeater Port is not valid"), m_title + _(" Error"), wxICON_ERROR); + wxMessageDialog dialog(this, _("The Mobile GPS Port is not valid"), m_title + _(" Error"), wxICON_ERROR); dialog.ShowModal(); return false; } From fb70d2862f69f3783cf46be4a5aca61efd91db4e Mon Sep 17 00:00:00 2001 From: Geoffrey Merck F4FXL - KC3FRA Date: Sun, 21 Apr 2019 09:00:33 +0200 Subject: [PATCH 134/166] Correct include path for all build configurations. Correct Common x64 including from 32bits --- APRSTransmit/APRSTransmit.vcxproj | 2 ++ APRSTransmit/APRSTransmitD.vcxproj | 2 ++ Common/Common.vcxproj | 4 ++++ GUICommon/GUICommon.vcxproj | 4 ++++ RemoteControl/RemoteControl.vcxproj | 2 ++ StarNetServer/StarNetServer.vcxproj | 2 ++ TextTransmit/TextTransmit.vcxproj | 2 ++ TimeServer/TimeServer.vcxproj | 2 ++ TimerControl/TimerControl.vcxproj | 2 ++ VoiceTransmit/VoiceTransmit.vcxproj | 2 ++ ircDDB/ircDDB.vcxproj | 4 ++++ ircDDBGateway/ircDDBGateway.vcxproj | 2 ++ ircDDBGatewayConfig/ircDDBGatewayConfig.vcxproj | 2 ++ 13 files changed, 32 insertions(+) diff --git a/APRSTransmit/APRSTransmit.vcxproj b/APRSTransmit/APRSTransmit.vcxproj index 96a54ae..afecf5d 100644 --- a/APRSTransmit/APRSTransmit.vcxproj +++ b/APRSTransmit/APRSTransmit.vcxproj @@ -80,9 +80,11 @@ $(SolutionDir)$(Configuration)\ $(Configuration)\$(ProjectName) false + $(WXWIN)\include;$(WXWIN)\lib\vc_dll\mswu;$(IncludePath) false + $(WXWIN)\include;$(WXWIN)\lib\vc_x64_dll\mswu;$(IncludePath) diff --git a/APRSTransmit/APRSTransmitD.vcxproj b/APRSTransmit/APRSTransmitD.vcxproj index 7c3486c..b03ecf3 100644 --- a/APRSTransmit/APRSTransmitD.vcxproj +++ b/APRSTransmit/APRSTransmitD.vcxproj @@ -80,9 +80,11 @@ $(SolutionDir)$(Configuration)\ $(Configuration)\$(ProjectName)\ false + $(WXWIN)\include;$(WXWIN)\lib\vc_dll\mswu;$(IncludePath) false + $(WXWIN)\include;$(WXWIN)\lib\vc_x64_dll\mswu;$(IncludePath) diff --git a/Common/Common.vcxproj b/Common/Common.vcxproj index abf30b4..1f68ab8 100644 --- a/Common/Common.vcxproj +++ b/Common/Common.vcxproj @@ -77,6 +77,10 @@ $(SolutionDir)$(Configuration)\ $(Configuration)\ + $(WXWIN)\include;$(WXWIN)\lib\vc_dll\mswu;$(IncludePath) + + + $(WXWIN)\include;$(WXWIN)\lib\vc_x64_dll\mswu;$(IncludePath) diff --git a/GUICommon/GUICommon.vcxproj b/GUICommon/GUICommon.vcxproj index 57d17b0..fa1aa10 100644 --- a/GUICommon/GUICommon.vcxproj +++ b/GUICommon/GUICommon.vcxproj @@ -77,6 +77,10 @@ $(SolutionDir)$(Configuration)\ $(Configuration)\ + $(WXWIN)\include;$(WXWIN)\lib\vc_dll\mswu;$(IncludePath) + + + $(WXWIN)\include;$(WXWIN)\lib\vc_x64_dll\mswu;$(IncludePath) diff --git a/RemoteControl/RemoteControl.vcxproj b/RemoteControl/RemoteControl.vcxproj index ba4020a..fcca2ca 100644 --- a/RemoteControl/RemoteControl.vcxproj +++ b/RemoteControl/RemoteControl.vcxproj @@ -80,9 +80,11 @@ $(SolutionDir)$(Configuration)\ $(Configuration)\ false + $(WXWIN)\include;$(WXWIN)\lib\vc_dll\mswu;$(IncludePath) false + $(WXWIN)\include;$(WXWIN)\lib\vc_x64_dll\mswu;$(IncludePath) diff --git a/StarNetServer/StarNetServer.vcxproj b/StarNetServer/StarNetServer.vcxproj index 4c7a44c..6dbfc4b 100644 --- a/StarNetServer/StarNetServer.vcxproj +++ b/StarNetServer/StarNetServer.vcxproj @@ -80,9 +80,11 @@ $(SolutionDir)$(Configuration)\ $(Configuration)\ false + $(WXWIN)\include;$(WXWIN)\lib\vc_dll\mswu;$(IncludePath) false + $(WXWIN)\include;$(WXWIN)\lib\vc_x64_dll\mswu;$(IncludePath) diff --git a/TextTransmit/TextTransmit.vcxproj b/TextTransmit/TextTransmit.vcxproj index 9f636d8..b9df38e 100644 --- a/TextTransmit/TextTransmit.vcxproj +++ b/TextTransmit/TextTransmit.vcxproj @@ -80,9 +80,11 @@ $(SolutionDir)$(Configuration)\ $(Configuration)\ false + $(WXWIN)\include;$(WXWIN)\lib\vc_dll\mswu;$(IncludePath) false + $(WXWIN)\include;$(WXWIN)\lib\vc_x64_dll\mswu;$(IncludePath) diff --git a/TimeServer/TimeServer.vcxproj b/TimeServer/TimeServer.vcxproj index ff96b71..1dda959 100644 --- a/TimeServer/TimeServer.vcxproj +++ b/TimeServer/TimeServer.vcxproj @@ -80,9 +80,11 @@ $(SolutionDir)$(Configuration)\ $(Configuration)\ false + $(WXWIN)\include;$(WXWIN)\lib\vc_dll\mswu;$(IncludePath) false + $(WXWIN)\include;$(WXWIN)\lib\vc_x64_dll\mswu;$(IncludePath) diff --git a/TimerControl/TimerControl.vcxproj b/TimerControl/TimerControl.vcxproj index 96779de..246e3b1 100644 --- a/TimerControl/TimerControl.vcxproj +++ b/TimerControl/TimerControl.vcxproj @@ -80,9 +80,11 @@ $(SolutionDir)$(Configuration)\ $(Configuration)\ false + $(WXWIN)\include;$(WXWIN)\lib\vc_dll\mswu;$(IncludePath) false + $(WXWIN)\include;$(WXWIN)\lib\vc_x64_dll\mswu;$(IncludePath) diff --git a/VoiceTransmit/VoiceTransmit.vcxproj b/VoiceTransmit/VoiceTransmit.vcxproj index c0af277..a866dad 100644 --- a/VoiceTransmit/VoiceTransmit.vcxproj +++ b/VoiceTransmit/VoiceTransmit.vcxproj @@ -80,9 +80,11 @@ $(SolutionDir)$(Configuration)\ $(Configuration)\ false + $(WXWIN)\include;$(WXWIN)\lib\vc_dll\mswu;$(IncludePath) false + $(WXWIN)\include;$(WXWIN)\lib\vc_x64_dll\mswu;$(IncludePath) diff --git a/ircDDB/ircDDB.vcxproj b/ircDDB/ircDDB.vcxproj index 75e4f54..a94f278 100644 --- a/ircDDB/ircDDB.vcxproj +++ b/ircDDB/ircDDB.vcxproj @@ -77,6 +77,10 @@ $(SolutionDir)$(Configuration)\ $(Configuration)\ + $(WXWIN)\include;$(WXWIN)\lib\vc_dll\mswu;$(IncludePath) + + + $(WXWIN)\include;$(WXWIN)\lib\vc_x64_dll\mswu;$(IncludePath) diff --git a/ircDDBGateway/ircDDBGateway.vcxproj b/ircDDBGateway/ircDDBGateway.vcxproj index 991b1d1..c41edff 100644 --- a/ircDDBGateway/ircDDBGateway.vcxproj +++ b/ircDDBGateway/ircDDBGateway.vcxproj @@ -80,9 +80,11 @@ $(SolutionDir)$(Configuration)\ $(Configuration)\ false + $(WXWIN)\include;$(WXWIN)\lib\vc_dll\mswu;$(IncludePath) false + $(WXWIN)\include;$(WXWIN)\lib\vc_x64_dll\mswu;$(IncludePath) diff --git a/ircDDBGatewayConfig/ircDDBGatewayConfig.vcxproj b/ircDDBGatewayConfig/ircDDBGatewayConfig.vcxproj index 1d6186c..dbbb516 100644 --- a/ircDDBGatewayConfig/ircDDBGatewayConfig.vcxproj +++ b/ircDDBGatewayConfig/ircDDBGatewayConfig.vcxproj @@ -80,9 +80,11 @@ $(SolutionDir)$(Configuration)\ $(Configuration)\ false + $(WXWIN)\include;$(WXWIN)\lib\vc_dll\mswu;$(IncludePath) false + $(WXWIN)\include;$(WXWIN)\lib\vc_x64_dll\mswu;$(IncludePath) From 401bf9d4dd37310f6fc4bd81b21300679e52bec9 Mon Sep 17 00:00:00 2001 From: Geoffrey Merck F4FXL - KC3FRA Date: Tue, 23 Apr 2019 09:21:40 +0200 Subject: [PATCH 135/166] Fixes missing or empty CCS_Hosts.txt preventing to save the configuration. - Add error message so as to not leave user in the dark. - Allow saving configuration when CCS_hosts.txt is empty/missing and CCS is disabled --- GUICommon/DCSSet.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/GUICommon/DCSSet.cpp b/GUICommon/DCSSet.cpp index 6339de8..730bfa3 100644 --- a/GUICommon/DCSSet.cpp +++ b/GUICommon/DCSSet.cpp @@ -21,6 +21,7 @@ #include "Defs.h" #include +#include const unsigned int CONTROL_WIDTH = 130U; @@ -109,12 +110,14 @@ bool CDCSSet::Validate() if (n == wxNOT_FOUND) return false; - n = m_ccsEnabled->GetCurrentSelection(); - if (n == wxNOT_FOUND) - return false; + bool ccsEnabled = m_ccsEnabled->GetCurrentSelection() == 1; + bool ccsHostSelected = m_ccsHosts->GetCurrentSelection() != wxNOT_FOUND; - if (m_ccsHosts->GetCurrentSelection() == wxNOT_FOUND) + if (ccsEnabled && !ccsHostSelected) { + wxMessageDialog dialog(this, _("CCS is enabled and no CCS host has been selected. Either disable CCS or select a CCS host."), m_title + _(" Error"), wxICON_ERROR); + dialog.ShowModal(); return false; + } return true; } From a1dca55500622694cdd61fcd3425fc6b2a1fc013 Mon Sep 17 00:00:00 2001 From: K2DLS Date: Fri, 26 Apr 2019 19:37:45 -0400 Subject: [PATCH 136/166] Update DExtra_Hosts.txt Add XRF020 --- Data/DExtra_Hosts.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Data/DExtra_Hosts.txt b/Data/DExtra_Hosts.txt index 02a0b89..ea90eb8 100644 --- a/Data/DExtra_Hosts.txt +++ b/Data/DExtra_Hosts.txt @@ -14,6 +14,7 @@ XRF014 110.232.113.108 XRF015 213.202.228.119 XRF017 85.214.78.198 XRF019 31.7.247.58 +XRF020 54.91.214.11 XRF022 83.137.45.98 XRF024 94.199.173.123 XRF025 89.38.150.252 From b1f99f0004ad0f40ba427a63dfbcc6fa66afe8a4 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Sun, 28 Apr 2019 18:10:25 +0100 Subject: [PATCH 137/166] Simplify and remove Windows dependancy. --- GUICommon/DCSSet.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/GUICommon/DCSSet.cpp b/GUICommon/DCSSet.cpp index 730bfa3..9bc22b2 100644 --- a/GUICommon/DCSSet.cpp +++ b/GUICommon/DCSSet.cpp @@ -21,7 +21,6 @@ #include "Defs.h" #include -#include const unsigned int CONTROL_WIDTH = 130U; @@ -114,8 +113,7 @@ bool CDCSSet::Validate() bool ccsHostSelected = m_ccsHosts->GetCurrentSelection() != wxNOT_FOUND; if (ccsEnabled && !ccsHostSelected) { - wxMessageDialog dialog(this, _("CCS is enabled and no CCS host has been selected. Either disable CCS or select a CCS host."), m_title + _(" Error"), wxICON_ERROR); - dialog.ShowModal(); + wxMessageBox(_("CCS is enabled and no CCS host has been selected. Either disable CCS or select a CCS host.")); return false; } From b0488b6a597760ae8937dc0b706381e19e3551e9 Mon Sep 17 00:00:00 2001 From: K2DLS Date: Sun, 28 Apr 2019 15:33:47 -0400 Subject: [PATCH 138/166] Update DPlus_Hosts.txt Add missing REF020 --- Data/DPlus_Hosts.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Data/DPlus_Hosts.txt b/Data/DPlus_Hosts.txt index a8479b0..801bf5e 100644 --- a/Data/DPlus_Hosts.txt +++ b/Data/DPlus_Hosts.txt @@ -19,6 +19,7 @@ REF014 110.232.113.108 REF015 213.202.228.119 REF017 85.214.78.198 REF019 31.7.247.58 +REF020 52.23.107.220 REF022 83.137.45.98 REF024 94.199.173.123 REF025 89.38.150.252 From 544ce6c02060d384b343a5a6bfcb30a7c0b3fda2 Mon Sep 17 00:00:00 2001 From: Geoffrey Merck F4FXL - KC3FRA Date: Sat, 4 May 2019 06:53:56 +0200 Subject: [PATCH 139/166] Add TARGEt parameter to build dl5di drop in replacement --- Makefile | 7 +++++++ MakefileGUI | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/Makefile b/Makefile index 8fe238c..638b40a 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,14 @@ +ifeq ($(TARGET), opendv) +export DATADIR := "/usr/share/opendv" +export LOGDIR := "/var/log/opendv" +export CONFDIR := "/etc" +export BINDIR := "/usr/sbin" +else export DATADIR := "/usr/share/ircddbgateway" export LOGDIR := "/var/log" export CONFDIR := "/etc" export BINDIR := "/usr/bin" +endif # Add -DDCS_LINK to the end of the CFLAGS line below to add DCS linking to StarNet # Add -DDEXTRA_LINK to the end of the CFLAGS line below to add DExtra linking to StarNet diff --git a/MakefileGUI b/MakefileGUI index 4c90842..ca8a81b 100644 --- a/MakefileGUI +++ b/MakefileGUI @@ -1,7 +1,14 @@ +ifeq ($(TARGET), opendv) +export DATADIR := "/usr/share/opendv" +export LOGDIR := "/var/log/opendv" +export CONFDIR := "/etc" +export BINDIR := "/usr/sbin" +else export DATADIR := "/usr/share/ircddbgateway" export LOGDIR := "/var/log" export CONFDIR := "/etc" export BINDIR := "/usr/bin" +endif # Add -DDCS_LINK to the end of the CFLAGS line below to add DCS linking to StarNet # Add -DDEXTRA_LINK to the end of the CFLAGS line below to add DExtra linking to StarNet From a76f07ca0e192a95ddfd287d5b2c30191d89bce8 Mon Sep 17 00:00:00 2001 From: Geoffrey Merck F4FXL - KC3FRA Date: Sat, 4 May 2019 07:19:59 +0200 Subject: [PATCH 140/166] Add installation of systemd files for opendv andempty config for gateway --- Makefile | 12 ++ ircDDBGateway/Makefile | 4 + ircDDBGateway/ircddbgateway-emptyconfig | 183 ++++++++++++++++++++++++ 3 files changed, 199 insertions(+) create mode 100644 ircDDBGateway/ircddbgateway-emptyconfig diff --git a/Makefile b/Makefile index 638b40a..634093f 100644 --- a/Makefile +++ b/Makefile @@ -61,6 +61,18 @@ ircDDB/IRCDDB.a: force .PHONY: install install: all +ifeq ($(TARGET), opendv) + useradd --user-group -M --system opendv --shell /bin/false || true + + # Add the opendv user to the audio group so that it can open audio + # devices when using the audio based drivers such as the Sound Card + # one. Maybe this should be moved to DStarRepeater instead ... + usermod --groups audio --append opendv || true + usermod --groups dialout --append opendv || true + usermod --groups gpio --append opendv || true + mkdir /var/log/opendv || true + chown opendv:opendv /var/log/opendv +endif $(MAKE) -C Data install $(MAKE) -C APRSTransmit install $(MAKE) -C ircDDBGateway install diff --git a/ircDDBGateway/Makefile b/ircDDBGateway/Makefile index f36c9a3..73efe6a 100644 --- a/ircDDBGateway/Makefile +++ b/ircDDBGateway/Makefile @@ -15,6 +15,10 @@ ircddbgatewayd: $(OBJECTS) ../ircDDB/IRCDDB.a ../Common/Common.a .PHONY: install install: install -g bin -o root -m 0775 ircddbgatewayd $(BINDIR) + cp ircddbgateway-emptyconfig $(CONFDIR)/ircddbgateway +ifeq ($(TARGET), opendv) + cp ../debian/ircddbgatewayd.ircddbgatewayd.service /lib/systemd/system/ircddbgatewayd.service +endif .PHONY: clean clean: diff --git a/ircDDBGateway/ircddbgateway-emptyconfig b/ircDDBGateway/ircddbgateway-emptyconfig new file mode 100644 index 0000000..1a79b95 --- /dev/null +++ b/ircDDBGateway/ircddbgateway-emptyconfig @@ -0,0 +1,183 @@ +gatewayType=0 +gatewayCallsign= +gatewayAddress=0.0.0.0 +icomAddress=172.16.0.20 +icomPort=20000 +hbAddress=127.0.0.1 +hbPort=20010 +latitude= +longitude= +description1= +description2= +url= +repeaterCall1= +repeaterBand1=B +repeaterType1=0 +repeaterAddress1=127.0.0.1 +repeaterPort1=20011 +reflector1= +atStartup1=0 +reconnect1=0 +frequency1=434.00000 +offset1=0.0000 +rangeKms1=0.000 +latitude1=0.000000 +longitude1=0.000000 +agl1=0.000 +description1_1= +description1_2= +url1= +band1_1=0 +band1_2=0 +band1_3=0 +repeaterCall2= +repeaterBand2= +repeaterType2=0 +repeaterAddress2=127.0.0.1 +repeaterPort2=20012 +reflector2= +atStartup2=0 +reconnect2=0 +frequency2=0.00000 +offset2=0.0000 +rangeKms2=0.000 +latitude2=0.000000 +longitude2=0.000000 +agl2=0.000 +description2_1= +description2_2= +url2= +band2_1=0 +band2_2=0 +band2_3=0 +repeaterCall3= +repeaterBand3= +repeaterType3=0 +repeaterAddress3=127.0.0.1 +repeaterPort3=20013 +reflector3= +atStartup3=0 +reconnect3=0 +frequency3=0.00000 +offset3=0.0000 +rangeKms3=0.000 +latitude3=0.000000 +longitude3=0.000000 +agl3=0.000 +description3_1= +description3_2= +url3= +band3_1=0 +band3_2=0 +band3_3=0 +repeaterCall4= +repeaterBand4= +repeaterType4=0 +repeaterAddress4=127.0.0.1 +repeaterPort4=20014 +reflector4= +atStartup4=0 +reconnect4=0 +frequency4=0.00000 +offset4=0.0000 +rangeKms4=0.000 +latitude4=0.000000 +longitude4=0.000000 +agl4=0.000 +description4_1= +description4_2= +url4= +band4_1=0 +band4_2=0 +band4_3=0 +ircddbEnabled=1 +ircddbHostname=rr.openquad.net +ircddbUsername= +ircddbPassword= +ircddbEnabled2=0 +ircddbHostname2=rr.openquad.net +ircddbUsername2= +ircddbPassword2= +ircddbEnabled3=0 +ircddbHostname3= +ircddbUsername3= +ircddbPassword3= +ircddbEnabled4=0 +ircddbHostname4= +ircddbUsername4= +ircddbPassword4= +aprsEnabled=1 +aprsHostname=rotate.aprs2.net +aprsPassword= +aprsPort=14580 +dextraEnabled=1 +dextraMaxDongles=5 +dplusEnabled=0 +dplusMaxDongles=5 +dplusLogin= +dcsEnabled=1 +ccsEnabled=1 +ccsHost=CCS704 +xlxEnabled=1 +xlxHostsFileUrl=http://xlxapi.rlx.lu/api.php?do=GetReflectorHostname +starNetBand1=A +starNetCallsign1= +starNetLogoff1= +starNetInfo1= +starNetPermanent1= +starNetUserTimeout1=300 +starNetGroupTimeout1=300 +starNetCallsignSwitch1=0 +starNetTXMsgSwitch1=1 +starNetReflector1= +starNetBand2=A +starNetCallsign2= +starNetLogoff2= +starNetInfo2= +starNetPermanent2= +starNetUserTimeout2=300 +starNetGroupTimeout2=300 +starNetCallsignSwitch2=0 +starNetTXMsgSwitch2=1 +starNetReflector2= +starNetBand3=A +starNetCallsign3= +starNetLogoff3= +starNetInfo3= +starNetPermanent3= +starNetUserTimeout3=300 +starNetGroupTimeout3=300 +starNetCallsignSwitch3=0 +starNetTXMsgSwitch3=1 +starNetReflector3= +starNetBand4=A +starNetCallsign4= +starNetLogoff4= +starNetInfo4= +starNetPermanent4= +starNetUserTimeout4=300 +starNetGroupTimeout4=300 +starNetCallsignSwitch4=0 +starNetTXMsgSwitch4=1 +starNetReflector4= +starNetBand5=A +starNetCallsign5= +starNetLogoff5= +starNetInfo5= +starNetPermanent5= +starNetUserTimeout5=300 +starNetGroupTimeout5=300 +starNetCallsignSwitch5=0 +starNetTXMsgSwitch5=1 +starNetReflector5= +remoteEnabled=1 +remotePassword= +remotePort=54321 +language=0 +infoEnabled=1 +echoEnabled=1 +logEnabled=0 +dratsEnabled=0 +dtmfEnabled=1 +windowX=-1 +windowY=-1 From 824d411e735821be05ea731bf77bb4d7fb838ce1 Mon Sep 17 00:00:00 2001 From: Geoffrey Merck Date: Sat, 4 May 2019 07:38:32 +0200 Subject: [PATCH 141/166] Update README.md to include build instructions --- README.md | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d099084..7d9a7ab 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ This is the ircDDB Gateway. It allows a D-Star Repeater to interface into callsi * XLX reflectors. * CCS7 routing. * D-RATS data transfers. -* Gateway DPRS data to aprs.fi. +* Gateway DPRS data to APRS-IS. * Full multi lingual text and voice announcements. * DTMF or UR call control. * Remote control interface. @@ -22,3 +22,24 @@ There are many external programs that allow for inserting voice or text messages They all build on 32-bit and 64-bit Linux as well as on Windows using Visual Studio 2017 on x86 and x64. This software is licenced under the GPL v2. + +# Build and installing +## Regular build +```shell +make +make -f MakefileGUI #only required if you want to build the GUI programs +sudo make install +``` +## Drop-in replacement for dl5di OpenDV packages +This will conpile the program to be used as a drop in replacement for the no longer maintained DL5DI OpenDV packages. Systemd files to run ircddbgatewayd as daemon will also be installed. +```shell +export TARGET=opendv +make +make -f MakefileGUI #only required if you want to build the GUI programs +sudo make install +``` +Now you should edit the configuration in the file /etc/ircddbgateway +```shell +sudo systemctl enable ircddbgatewayd.service #enable service +sudo service ircddbgatewayd start +``` From 825c996c189e1ec1fc0a2d068383136645c69210 Mon Sep 17 00:00:00 2001 From: Geoffrey Merck Date: Wed, 8 May 2019 09:13:20 +0200 Subject: [PATCH 142/166] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7d9a7ab..a90b421 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ make make -f MakefileGUI #only required if you want to build the GUI programs sudo make install ``` -Now you should edit the configuration in the file /etc/ircddbgateway +Now you should edit the configuration in the file /etc/ircddbgateway to match your needs. ```shell sudo systemctl enable ircddbgatewayd.service #enable service sudo service ircddbgatewayd start From 1444e5ac492ca2a36ad244bc5d733e29c7d53fc9 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Sun, 19 May 2019 13:40:07 +0100 Subject: [PATCH 143/166] Update the host files from K7VE's list. --- Data/DCS_Hosts.txt | 256 +++++++--- Data/DExtra_Hosts.txt | 487 +++++++++++++++++-- Data/DPlus_Hosts.txt | 1067 ++++------------------------------------- 3 files changed, 730 insertions(+), 1080 deletions(-) diff --git a/Data/DCS_Hosts.txt b/Data/DCS_Hosts.txt index d1294f8..6bd6452 100644 --- a/Data/DCS_Hosts.txt +++ b/Data/DCS_Hosts.txt @@ -1,100 +1,131 @@ -# DCS_Hosts.txt downloaded from http://www.pistar.uk/downloads/DCS_Hosts.txt -# DCS Hosts resolved from xreflector.net DNS, with additional hosts -# sourced from http://xlxapi.rlx.lu/api.php?do=GetReflectorHostname -# Please report issues at https://www.facebook.com/groups/pistar/ -# File created at Tuesday 10th of July 2018 08:13:04 PM BST -# +# Prepared at ar-dns.net - Sun, 19 May 2019 12:38:05 GMT DCS000 23.111.174.198 -#DCS001 77.57.24.143 -#DCS002 140.82.62.162 -#DCS003 173.199.124.183 -#DCS004 44.103.34.3 -DCS005 87.117.229.174 -#DCS006 34.213.176.201 -DCS007 212.227.203.37 -#DCS008 45.77.153.132 +DCS001 dcs001.xreflector.net +DCS002 dcs002.xreflector.net +DCS003 dcs003.xreflector.net +DCS004 dcs004.xreflector.net +DCS005 dcs.bm-dmr.uk +DCS006 dcs006.xreflector.net +DCS006 146.168.196.187 +DCS007 dcs007.xreflector.net +DCS008 dcs008.xreflector.net +DCS009 dcs009.xreflector.net DCS010 85.197.129.86 -DCS011 81.95.126.168 +DCS010 dcs010.xreflector.net +DCS011 dcs011.xreflector.net DCS012 194.38.140.205 -DCS014 52.63.223.130 -DCS015 213.202.228.119 -DCS017 85.214.78.198 -DCS019 31.7.247.58 -#DCS022 83.137.45.98 -#DCS024 94.199.173.123 -#DCS025 89.38.150.252 -DCS026 65.175.188.230 -#DCS029 80.123.238.76 +DCS012 dcs012.xreflector.net +DCS013 dcs013.xreflector.net +DCS014 dcs014.xreflector.net +DCS015 dcs015.xreflector.net +DCS016 dcs016.xreflector.net +DCS017 dcs017.xreflector.net +DCS018 dcs018.xreflector.net +DCS019 dcs019.xreflector.net +DCS020 3.208.40.45 +DCS021 dcs021.xreflector.net +DCS022 dcs022.xreflector.net +DCS023 dcs023.xreflector.net +DCS024 dcs024.xreflector.net +DCS025 dcs025.xreflector.net +DCS026 dcs026.xreflector.net +DCS027 dcs027.xreflector.net +DCS028 xlx028.org +DCS029 dcs029.xreflector.net DCS030 194.59.177.44 -DCS032 158.64.26.140 -DCS033 46.226.178.81 +DCS032 dcs032.xreflector.net +DCS033 dcs033.xreflector.net DCS035 45.79.94.184 +DCS036 151.12.36.112 DCS038 5.249.151.111 DCS039 31.14.142.119 DCS040 109.71.45.29 +DCS041 45.62.226.137 +DCS044 dcs044.xreflector.net +DCS045 64.137.172.60 DCS046 176.10.140.161 DCS047 202.171.147.58 DCS049 212.71.234.224 DCS050 80.211.155.206 DCS051 93.186.254.219 -DCS052 121.119.96.205 -DCS053 185.97.120.120 +DCS052 121.116.69.175 +DCS053 5.133.99.12 DCS054 52.86.180.251 DCS055 52.80.4.154 DCS057 74.193.217.15 -DCS058 118.110.251.54 +DCS058 150.66.16.176 DCS059 18.219.32.21 DCS060 212.237.36.181 +DCS061 208.71.169.83 +DCS062 72.17.20.173 DCS064 122.222.1.50 -DCS067 77.229.104.173 +DCS066 79.55.195.190 +DCS067 95.60.130.176 DCS068 92.222.145.202 +DCS069 89.36.214.120 DCS071 211.60.41.185 DCS072 75.60.237.17 +DCS073 114.224.6.211 DCS074 212.237.211.82 +DCS075 5.135.162.136 DCS076 203.137.116.117 DCS077 216.21.9.156 DCS078 109.15.57.11 +DCS079 121.162.91.31 DCS080 121.81.128.207 DCS081 121.82.151.243 +DCS082 110.232.113.108 DCS083 185.205.210.217 +DCS084 45.79.93.167 DCS085 113.150.26.8 +DCS086 52.80.139.252 DCS087 44.137.36.209 DCS088 194.109.192.235 DCS089 194.109.192.236 DCS090 91.92.136.252 -DCS093 82.51.162.200 +DCS092 104.200.25.53 +DCS093 185.177.59.221 DCS095 203.137.76.53 DCS097 80.211.154.173 DCS098 203.136.233.165 DCS099 80.211.27.75 -DCS100 45.62.233.223 +DCS100 45.62.234.223 DCS101 64.137.236.164 DCS102 23.111.174.196 DCS103 64.137.224.126 DCS104 23.111.174.197 DCS105 51.254.99.78 -DCS109 182.168.128.138 +DCS109 115.179.53.132 DCS110 150.7.164.10 DCS111 61.195.96.160 DCS112 94.177.235.81 DCS113 151.12.36.103 DCS114 5.135.188.16 DCS115 217.182.128.3 +DCS116 31.185.101.211 DCS118 5.249.148.252 DCS119 125.129.207.86 DCS120 81.150.10.63 DCS121 174.37.249.156 +DCS122 83.137.45.126 DCS124 211.14.169.234 DCS125 213.181.208.52 -DCS129 220.209.106.220 +DCS127 190.112.228.107 +DCS128 153.248.144.11 +DCS129 111.64.166.200 DCS130 194.59.177.45 DCS131 80.127.118.226 DCS132 91.203.55.87 +DCS134 159.89.176.86 DCS135 74.208.214.69 DCS140 95.211.211.145 +DCS142 44.168.48.8 DCS145 178.59.23.138 +DCS146 213.7.197.202 DCS147 46.41.1.127 DCS150 80.211.10.212 +DCS153 210.189.104.236 +DCS155 18.235.96.93 DCS158 150.66.16.176 DCS160 61.195.109.179 DCS170 210.178.113.173 @@ -102,42 +133,57 @@ DCS171 210.178.113.123 DCS175 162.248.92.25 DCS180 192.241.240.7 DCS185 89.106.108.151 +DCS190 190.194.12.53 DCS199 153.126.179.214 +DCS200 185.203.119.158 +DCS202 148.251.122.251 DCS204 85.214.126.111 DCS206 193.190.240.227 DCS208 151.80.155.39 DCS210 64.137.224.107 DCS212 52.38.90.188 DCS214 185.47.129.230 +DCS215 185.87.96.172 DCS216 74.214.25.135 DCS220 124.41.83.11 DCS222 212.43.96.84 DCS224 203.137.99.97 DCS226 2.226.183.226 DCS227 89.33.44.100 -DCS228 83.77.104.52 +DCS228 85.6.171.146 DCS229 194.191.4.54 DCS230 80.250.3.114 DCS232 89.185.97.35 +DCS235 5.150.254.97 +DCS238 172.104.239.219 DCS241 151.80.158.227 DCS242 73.14.84.43 DCS246 172.93.48.159 DCS255 142.91.158.199 +DCS257 47.157.82.87 DCS258 75.60.237.19 -DCS262 92.192.107.54 +DCS261 44.144.0.23 +DCS262 87.139.70.67 DCS263 85.214.193.146 DCS264 52.2.131.118 +DCS265 212.237.51.82 DCS266 212.237.51.82 DCS268 194.38.140.204 DCS270 158.64.26.132 -DCS272 200.231.36.188 +DCS272 177.194.25.234 +DCS274 75.115.207.48 +DCS280 87.19.134.242 +DCS282 210.188.25.17 DCS284 95.158.165.32 +DCS285 91.92.93.15 DCS287 43.245.172.2 +DCS288 121.75.75.200 DCS290 44.182.7.20 DCS291 101.143.242.189 -DCS298 220.144.59.222 +DCS295 45.62.224.93 +DCS298 122.131.152.80 DCS299 203.86.194.92 -DCS300 45.62.244.43 +DCS300 45.62.247.43 DCS302 144.217.241.23 DCS303 75.70.52.143 DCS305 145.239.116.57 @@ -155,26 +201,36 @@ DCS330 18.222.199.205 DCS332 188.213.168.99 DCS333 194.116.29.73 DCS334 96.47.95.121 +DCS335 185.206.145.2 DCS336 23.226.233.133 +DCS338 122.116.216.47 +DCS339 198.98.53.247 DCS345 45.62.237.34 DCS352 35.230.162.146 +DCS357 93.152.167.4 DCS358 93.152.167.4 DCS359 94.156.172.213 DCS360 222.229.25.105 DCS364 159.65.231.53 DCS365 59.139.141.204 +DCS367 xrf367.ad6dm.net +DCS367 18.216.66.72 DCS370 188.213.168.24 DCS371 212.237.8.77 -DCS373 58.189.49.139 +DCS373 119.229.134.1 DCS374 61.195.108.146 DCS376 75.145.119.225 +DCS377 186.159.96.100 DCS379 104.218.36.162 DCS380 160.16.65.39 -DCS382 211.131.19.200 +DCS382 211.131.3.119 DCS388 138.197.67.52 -DCS389 106.71.198.27 +DCS389 106.71.212.36 +DCS389 xlxdmr.duckdns.org DCS390 149.7.214.253 DCS393 139.91.200.186 +DCS395 5.249.151.111 +DCS398 45.62.243.153 DCS399 185.227.110.247 DCS400 13.58.192.185 DCS404 91.229.143.187 @@ -186,45 +242,56 @@ DCS421 118.189.181.236 DCS431 61.195.98.225 DCS433 217.160.22.17 DCS434 51.254.128.134 -DCS440 153.133.72.142 +DCS438 80.211.189.236 +DCS440 153.176.140.229 DCS441 203.137.99.110 DCS444 188.68.37.51 DCS449 159.89.183.117 DCS450 64.137.224.233 -DCS454 168.70.74.137 +DCS454 218.250.250.21 DCS455 208.71.169.83 +DCS456 xrf456.de DCS456 54.37.204.187 +DCS460 183.53.66.145 DCS464 52.192.129.174 DCS470 104.49.29.243 DCS477 139.162.213.89 DCS479 198.58.106.10 DCS486 51.255.172.249 +DCS487 93.66.214.109 DCS499 203.137.76.22 DCS500 58.96.21.253 DCS501 198.211.98.63 -DCS502 104.143.94.48 +DCS502 190.148.222.28 DCS505 45.248.50.37 DCS506 121.200.19.211 DCS508 185.188.4.15 +DCS510 110.141.219.161 DCS511 213.172.232.13 DCS515 203.137.78.35 DCS518 176.9.1.168 -DCS519 167.114.104.65 +DCS519 149.56.165.76 DCS520 119.59.125.192 DCS521 150.129.184.54 DCS522 14.102.146.160 +DCS523 175.142.199.32 DCS525 80.211.68.38 DCS530 116.251.193.99 -DCS538 124.41.76.58 -DCS544 210.131.32.240 +DCS534 208.71.169.83 +DCS538 131.129.217.94 +DCS544 202.218.152.66 DCS550 89.36.222.146 -DCS551 182.167.49.77 +DCS551 140.227.198.45 +DCS553 45.79.92.86 DCS554 52.35.183.178 DCS555 210.86.135.13 +DCS567 212.91.156.69 DCS569 203.137.111.98 -DCS583 183.76.149.208 +DCS570 172.104.13.31 +DCS573 216.189.148.204 +DCS583 116.70.240.104 DCS587 68.32.126.21 -DCS595 220.146.23.42 +DCS595 220.146.24.34 DCS599 203.137.118.190 DCS600 13.69.14.204 DCS601 51.141.52.193 @@ -233,38 +300,55 @@ DCS603 216.246.155.99 DCS604 139.162.241.24 DCS605 183.76.179.238 DCS608 219.122.253.83 +DCS609 219.122.253.83 DCS610 89.186.80.81 DCS613 198.50.202.39 DCS619 167.99.168.82 DCS626 45.77.234.162 DCS627 121.75.75.200 -DCS634 180.46.54.237 +DCS630 61.195.125.81 +DCS634 222.148.104.64 +DCS647 217.182.168.54 +DCS651 198.96.90.144 DCS655 146.64.235.19 -DCS666 86.188.14.232 +DCS666 86.153.215.35 +DCS672 180.27.223.252 DCS673 180.147.243.178 DCS684 212.237.17.83 DCS689 97.107.128.47 +DCS695 155.254.33.145 +DCS698 203.137.123.89 DCS699 82.102.5.239 +DCS700 2.29.27.21 DCS701 61.195.107.77 DCS703 61.195.98.254 DCS704 150.66.34.110 DCS706 93.186.255.126 DCS707 90.145.156.196 -DCS708 202.218.37.62 +DCS708 150.66.20.222 DCS709 212.237.34.32 -DCS712 124.86.129.12 +DCS711 212.237.18.27 +DCS712 153.215.181.34 DCS713 218.251.63.99 DCS714 81.169.140.163 DCS717 44.137.70.100 -DCS724 189.20.209.70 +DCS722 80.211.2.161 +DCS723 45.33.118.112 +DCS724 xlx.dvbrazil.com.br +DCS724 75.99.228.35 DCS725 172.245.9.180 +DCS730 190.14.50.165 DCS732 190.159.68.105 DCS733 45.56.117.158 +DCS734 181.208.254.236 +DCS735 104.131.81.32 DCS737 195.130.75.246 -DCS740 173.208.200.180 +DCS738 210.171.151.238 +DCS740 104.167.114.230 DCS741 203.137.78.41 DCS746 178.254.34.44 -DCS747 93.209.36.152 +DCS747 93.209.44.227 +DCS748 64.137.197.36 DCS749 45.77.102.203 DCS750 203.86.206.49 DCS751 203.118.145.79 @@ -275,45 +359,67 @@ DCS762 129.21.36.65 DCS766 201.62.48.61 DCS768 80.211.199.231 DCS770 153.126.173.9 -DCS773 94.177.175.230 -DCS776 218.221.181.241 +DCS773 89.46.75.166 +DCS775 149.202.61.17 +DCS776 182.168.37.205 DCS777 194.182.66.76 DCS781 101.143.242.199 +DCS782 153.221.123.92 DCS787 46.41.1.96 +DCS788 192.168.0.96 DCS789 45.33.119.142 DCS794 101.143.242.95 DCS800 87.252.188.119 DCS801 213.47.71.17 -DCS803 77.116.56.123 -DCS806 178.198.23.201 +DCS803 77.117.21.251 +DCS806 92.107.25.23 +DCS807 153.167.124.196 DCS808 18.220.252.27 DCS809 78.46.11.69 -DCS810 64.137.238.189 +DCS810 71.41.121.228 +DCS811 64.137.238.189 DCS812 203.145.233.141 DCS813 97.76.81.165 DCS817 18.235.96.93 +DCS818 120.79.155.116 +DCS825 51.75.252.197 DCS828 195.225.116.244 +DCS833 78.226.112.146 DCS844 137.226.79.122 +DCS847 162.243.4.29 DCS850 88.198.94.77 +DCS852 42.2.140.44 +DCS858 54.227.203.214 +DCS859 54.227.203.214 DCS860 24.134.86.93 -DCS866 46.93.204.84 +DCS861 66.175.218.63 +DCS865 45.32.212.226 +DCS866 93.233.182.237 +DCS867 51.254.115.5 +DCS870 103.3.234.95 +DCS871 182.245.190.200 DCS878 203.137.123.113 -DCS883 153.179.226.85 +DCS880 176.10.105.211 +DCS883 153.179.224.224 DCS886 118.163.103.178 DCS887 118.163.103.177 DCS888 46.18.142.169 +DCS889 130.149.36.93 DCS893 104.223.59.212 +DCS897 212.237.2.183 DCS900 94.177.237.192 DCS903 80.211.29.226 DCS904 211.14.169.215 DCS906 212.237.11.53 -DCS907 176.84.168.11 +DCS907 176.84.63.187 DCS908 92.222.23.124 DCS909 216.86.147.198 +DCS910 94.177.207.26 DCS911 178.128.118.127 DCS912 80.211.1.143 DCS915 72.28.30.93 DCS919 80.211.232.174 +DCS920 81.150.10.62 DCS921 44.143.184.83 DCS922 81.150.10.62 DCS925 90.255.232.101 @@ -321,25 +427,41 @@ DCS929 158.69.166.132 DCS930 94.177.160.5 DCS931 68.131.30.206 DCS933 164.132.104.167 +DCS935 188.213.166.199 DCS940 202.218.37.121 DCS944 202.218.34.210 DCS945 213.202.229.40 +DCS946 212.227.174.45 DCS950 158.64.26.134 DCS951 18.188.166.109 +DCS956 192.99.245.120 +DCS959 203.137.98.121 DCS964 52.173.142.244 +DCS965 47.23.66.19 DCS966 203.150.19.24 +DCS967 95.158.165.32 DCS969 142.93.46.36 DCS970 157.7.221.186 +DCS972 109.226.48.53 DCS973 211.14.169.43 DCS974 94.177.217.52 -DCS986 81.89.102.160 +DCS975 176.31.161.9 +DCS976 212.237.36.71 +DCS979 217.162.36.91 +DCS980 80.211.84.249 +DCS986 194.59.205.218 DCS987 185.32.183.148 DCS988 80.211.236.189 DCS989 50.27.131.75 DCS990 35.164.237.63 DCS991 80.211.19.121 +DCS992 149.28.243.165 +DCS993 97.64.20.63 DCS994 35.177.233.106 +DCS995 118.27.30.92 DCS996 47.104.177.248 DCS997 94.177.187.40 DCS998 44.140.236.20 DCS999 94.177.173.53 +DSC034 dcs034.xreflector.net +# EOF - Sun, 19 May 2019 12:38:05 GMT diff --git a/Data/DExtra_Hosts.txt b/Data/DExtra_Hosts.txt index ea90eb8..550eb4c 100644 --- a/Data/DExtra_Hosts.txt +++ b/Data/DExtra_Hosts.txt @@ -1,340 +1,749 @@ +# Prepared at ar-dns.net - Sun, 19 May 2019 12:35:55 GMT XRF000 23.111.174.198 +XRF000 000.xreflector.org XRF001 77.57.24.143 +XRF001 xlx001.homepc.it XRF002 140.82.62.162 +XRF002 xrf002.dstar.club XRF003 173.199.124.183 +XRF003 xlx003.xrefl.net XRF004 44.103.34.3 -XRF005 87.117.229.174 +XRF004 xrf004.kb8zgl.net +XRF005 50.116.62.225 +XRF005 ve3tnk.homelinux.net XRF006 34.213.176.201 -XRF007 212.227.203.37 +XRF006 xrf006.xrefl.net +XRF007 82.223.18.138 XRF008 45.77.153.132 +XRF008 xrf008.kingsofdigital.net +XRF009 118.150.164.96 +XRF009 www.hamtalk.net XRF010 85.197.129.86 +XRF010 xlx010.n8qq.com XRF011 81.95.126.168 -XRF012 194.38.140.205 -XRF014 110.232.113.108 -XRF015 213.202.228.119 -XRF017 85.214.78.198 -XRF019 31.7.247.58 -XRF020 54.91.214.11 +XRF011 xlx011.warn.org +XRF012 52.26.161.5 +XRF012 xrf012.papasys.com +XRF013 34.213.176.201 +XRF013 xrf013.perform2themax.com +XRF014 xrf014.iz0rin.it +XRF015 194.59.205.228 +XRF015 xrf015.theapplecore.me +XRF016 xrf016.ampr.at +XRF017 92.177.212.64 +XRF018 flatcap.badweather.net +XRF019 46.28.108.233 +XRF019 xlx019.ok2it.com +XRF020 xrf020.k2dls.net +XRF021 44.103.34.4 XRF022 83.137.45.98 +XRF022 xrf022.tms-it.net +XRF023 185.177.59.166 +XRF023 xlx023.dtdns.net XRF024 94.199.173.123 +XRF024 xrf024.dstar.at XRF025 89.38.150.252 +XRF025 025.ham-digital.es XRF026 65.175.188.230 +XRF027 194.116.29.78 +XRF028 172.104.63.79 +XRF028 stn028.dstar.be XRF029 80.123.238.76 +XRF029 xrf029.tms-it.net XRF030 194.59.177.44 +XRF030 xrf030.oe3xht.at +XRF031 83.241.141.245 +XRF031 xlx031.ddns.net XRF032 158.64.26.140 +XRF032 xlx032.epf.lu XRF033 46.226.178.81 +XRF034 xrf034.dynu.net XRF035 45.79.94.184 +XRF035 xrf035.wa7dre.org +XRF036 151.12.36.112 +XRF036 xlx036.macasoft.it +XRF037 185.58.193.163 XRF038 44.103.34.19 XRF039 31.14.142.119 XRF040 109.71.45.29 +XRF040 xrf040.dyndns.org +XRF041 167.88.37.80 +XRF042 xrf042.luthienstar.fr +XRF043 xrf043.aotnet.it +XRF044 82.1.185.173 +XRF045 45.62.233.223 XRF046 176.10.140.161 +XRF046 xlx.c4fm.se XRF047 202.171.147.58 +XRF047 xlx047.ddns.net +XRF048 xrf048.n5uxt.org XRF049 212.71.234.224 XRF050 80.211.155.206 +XRF050 dstar.emcomspain.xreflector.es XRF051 93.186.254.219 XRF052 121.119.96.205 +XRF052 xrf052.dip.jp XRF053 185.97.120.120 +XRF053 xlx.grvdc.eu XRF054 52.86.180.251 +XRF054 xrf054.metro-uhf.org XRF055 52.80.4.154 +XRF055 dstar.zzux.com +XRF056 xrf056.homepc.it XRF057 74.193.217.15 -XRF058 118.110.251.54 +XRF057 xlx057.ddns.net +XRF058 133.208.235.3 +XRF058 xrf058.dip.jp XRF059 18.219.32.21 XRF060 212.237.36.181 +XRF061 68.115.205.110 +XRF062 72.17.20.173 +XRF062 xlx.maryland-dstar.net +XRF063 162.248.141.148 XRF064 122.222.1.50 -XRF067 77.229.104.173 +XRF064 xrf064.owari.biz +XRF065 212.237.53.67 +XRF066 87.7.192.18 +XRF066 xlx066.homepc.it +XRF067 95.60.130.176 +XRF067 xrf067.f5kav.org XRF068 92.222.145.202 +XRF068 xrf068.ircddb.it +XRF069 xrf069.sustrai.org +XRF070 xrf070.iptime.org XRF071 211.60.41.185 +XRF071 xrf.elechomebrew.com XRF072 75.60.237.17 +XRF072 xrf072.dv.or.kr +XRF073 147.102.7.34 XRF074 212.237.211.82 +XRF074 xrf074.dyndns.org +XRF075 5.135.162.136 +XRF075 xrf075.ir9bs.it XRF076 203.137.116.117 +XRF076 xrf076.xreflector-jp.org XRF077 216.21.9.156 +XRF077 xrf077.duckdns.org XRF078 109.15.57.11 +XRF078 xlx.grvdc.eu +XRF079 184.23.183.98 +XRF079 xlx079.dvham.com XRF080 121.81.128.207 +XRF080 jr3vh.dip.jp XRF081 121.82.151.243 +XRF081 jr3vh.dip.jp +XRF082 110.232.113.108 +XRF082 xlx082.pungsan.com XRF083 185.205.210.217 +XRF083 xlx083.pungsan.com +XRF084 45.79.93.167 XRF085 113.150.26.8 +XRF085 jr1ofp.dip.jp +XRF086 52.80.139.252 XRF087 44.137.36.209 XRF088 194.109.192.235 +XRF088 xrf088.pa4tw.nl XRF089 194.109.192.236 +XRF089 xlx089.pa4tw.nl XRF090 91.92.136.252 -XRF093 82.51.162.200 +XRF091 89.36.219.197 +XRF092 104.200.25.53 +XRF093 185.177.59.221 +XRF094 157.7.221.186 XRF095 203.137.76.53 +XRF095 xrf095.xreflector-jp.org XRF097 80.211.154.173 XRF098 203.136.233.165 +XRF098 xrf098.dip.jp XRF099 80.211.27.75 +XRF099 xlx099.iz7auh.net XRF100 45.62.233.223 -XRF101 64.137.236.164 +XRF100 xlx100.xlxreflector.org +XRF101 45.62.213.101 +XRF101 xlx101.xlxreflector.org XRF102 23.111.174.196 +XRF102 xlx102.xlxreflector.org XRF103 64.137.224.126 +XRF103 xlx103.xlxreflector.org XRF104 23.111.174.197 +XRF104 xlx104.xlxreflector.org XRF105 51.254.99.78 +XRF105 xrf105.xlxreflector.org XRF109 182.168.128.138 +XRF109 xrf109.tokyo XRF110 150.7.164.10 +XRF110 xrf110.xreflector-jp.org XRF111 61.195.96.160 +XRF111 xrf111.xreflector-jp.org XRF112 94.177.235.81 -XRF113 151.12.36.103 +XRF112 112.xreflector.es +XRF113 212.227.202.198 +XRF113 xlx113.homepc.it XRF114 5.135.188.16 XRF115 217.182.128.3 +XRF115 reflector-xlx.hb9vd.ch +XRF116 31.185.101.211 XRF118 5.249.148.252 +XRF118 xlx118.ns0.it XRF119 125.129.207.86 +XRF119 xlx119.dvham.com XRF120 81.150.10.63 XRF121 174.37.249.156 +XRF122 83.137.45.126 +XRF122 xrf.vpn4ham.com +XRF123 213.126.90.100 XRF124 211.14.169.234 +XRF124 xrf124.xreflector-jp.org XRF125 213.181.208.52 +XRF125 xlx125.dyndns.hu +XRF127 190.112.228.107 +XRF127 pj2man.hopto.org +XRF128 153.147.157.213 XRF129 220.209.106.220 +XRF129 guwgw.cir-ins.com XRF130 194.59.177.45 XRF131 80.127.118.226 +XRF131 xlx131.pe1er.nl XRF132 91.203.55.87 +XRF132 xrf132.dstar.radom.pl +XRF133 xrf133.gb7de.co.uk +XRF134 159.89.176.86 XRF135 74.208.214.69 XRF140 95.211.211.145 XRF145 178.59.23.138 +XRF146 213.7.90.5 +XRF146 xlx146.ddns.net XRF147 46.41.1.127 XRF150 80.211.10.212 +XRF150 argentina.mmdvm.es +XRF153 210.189.104.236 +XRF155 18.235.96.93 XRF158 150.66.16.176 XRF160 61.195.109.179 +XRF164 122.222.1.50 +XRF168 xrf168.duckdns.org XRF170 210.178.113.173 +XRF170 dvham.mooo.com XRF171 210.178.113.123 +XRF171 xrf171.dvham.com XRF175 162.248.92.25 +XRF177 xlx177.webandcloud.net XRF180 192.241.240.7 +XRF180 xlx180.warn.org +XRF181 122.19.214.143 XRF185 89.106.108.151 +XRF190 190.194.12.53 XRF199 153.126.179.214 +XRF200 185.203.119.158 +XRF200 xrf200.theapplecore.me +XRF202 148.251.122.251 XRF204 85.214.126.111 +XRF204 xlx204.ph0dv.nl XRF206 193.190.240.227 XRF208 151.80.155.39 +XRF208 xlx208.f5kav.org XRF210 64.137.224.107 +XRF210 210.xreflector.org XRF212 52.38.90.188 +XRF212 xlx212.dstar.club XRF214 185.47.129.230 +XRF214 xlx214.sustrai.org +XRF215 185.87.96.172 XRF216 74.214.25.135 XRF220 124.41.83.11 +XRF220 xlx220.sapotech.com XRF222 212.43.96.84 +XRF222 xlx222.webandcloud.net +XRF223 208.73.201.157 +XRF223 xrf223.parkerradio.org XRF224 203.137.99.97 +XRF224 xrf224.xreflector-jp.org XRF226 2.226.183.226 +XRF226 xrf226.hamnet.ro XRF227 89.33.44.100 -XRF228 83.77.104.52 +XRF228 212.237.33.114 XRF229 194.191.4.54 +XRF229 dstar.hamnet.xyz XRF230 80.250.3.114 +XRF230 ref.dstar.cz XRF232 89.185.97.35 +XRF232 xrf232.tms-it.net +XRF233 xlx233.f1smf.com +XRF235 5.150.254.97 +XRF235 xlx235.duckdns.org +XRF238 172.104.239.219 +XRF238 xlx.brandmeister.digital XRF241 151.80.158.227 XRF242 73.14.84.43 +XRF242 xrf242.k7edw.com XRF246 172.93.48.159 +XRF246 xlx.mkagawa.com +XRF248 xrf248.dyndns.org +XRF250 xrf250.dstar.su +XRF252 je7zbu.jpn.ph XRF255 142.91.158.199 +XRF255 xrf255.reflector.up4dar.de +XRF257 47.157.82.87 XRF258 75.60.237.19 -XRF262 92.192.107.54 +XRF261 44.144.0.23 +XRF262 92.201.84.2 +XRF262 xrf262.reflector.up4dar.de XRF263 85.214.193.146 XRF264 52.2.131.118 +XRF265 51.255.43.60 XRF266 212.237.51.82 XRF268 194.38.140.204 XRF270 158.64.26.132 +XRF270 xrf270.reflector.up4dar.de XRF272 200.231.36.188 +XRF275 xrf275.dyndns.org +XRF277 xlx277.dyndns.org +XRF280 95.234.119.44 +XRF282 210.188.25.17 +XRF282 xrf282.dip.jp XRF284 95.158.165.32 +XRF285 91.92.93.15 XRF287 43.245.172.2 +XRF288 99.108.210.100 XRF290 44.182.7.20 XRF291 101.143.242.189 +XRF291 xrf291.xreflector-jp.org +XRF295 45.62.224.93 +XRF295 xrf295.dyndns.org XRF298 220.144.59.222 +XRF298 xrf298.dip.jp XRF299 203.86.194.92 +XRF299 xlx299.zl2ro.nz XRF300 45.62.244.43 +XRF300 300.xreflector.org XRF302 144.217.241.23 +XRF302 xlx302.hopto.org XRF303 75.70.52.143 XRF305 145.239.116.57 XRF307 72.21.76.154 +XRF307 xlx307.ddns.net XRF310 52.11.207.121 +XRF310 xrf310.xrefl.net XRF311 46.41.0.214 +XRF311 xrf311.ernix.de XRF312 192.241.160.183 +XRF312 xrf312.xrefl.net XRF313 34.213.108.164 +XRF313 xlx313.openstd.net +XRF314 162.248.10.154 XRF315 65.101.7.50 XRF317 44.48.8.15 +XRF317 xrf317.crossroadsdmr.org +XRF318 xrf318.xrefl.net XRF321 31.207.110.45 +XRF321 vps.makeitrad.com XRF328 212.237.33.114 +XRF328 cisarbasel.ddns.net XRF329 114.181.139.32 XRF330 18.222.199.205 XRF332 188.213.168.99 XRF333 194.116.29.73 +XRF333 xrf333.f1smf.com XRF334 96.47.95.121 +XRF335 185.206.145.2 XRF336 23.226.233.133 +XRF336 xrf336.mawcg.org +XRF338 122.116.216.47 +XRF339 198.98.53.247 +XRF339 xlx339.avarc.ca XRF345 45.62.237.34 +XRF345 xrf345.dyndns.org +XRF350 350.opendstar.eu XRF352 35.230.162.146 +XRF353 94.173.206.53 +XRF356 93.152.167.4 +XRF357 93.152.167.4 +XRF357 xlx357.w6kd.com XRF358 93.152.167.4 XRF359 94.156.172.213 XRF360 222.229.25.105 +XRF360 xrf360.dip.jp XRF364 159.65.231.53 XRF365 59.139.141.204 +XRF365 xrf365.dip.jp +XRF367 18.216.66.72 +XRF367 xrf367.ad6dm.net XRF370 188.213.168.24 +XRF370 xrf370.selfip.com XRF371 212.237.8.77 -XRF373 58.189.49.139 +XRF371 xlx371.selfip.com +XRF373 119.229.134.1 +XRF373 xrf73.dip.jp XRF374 61.195.108.146 +XRF374 xrf374.xreflector-jp.org XRF376 75.145.119.225 +XRF377 186.159.96.100 XRF379 104.218.36.162 XRF380 160.16.65.39 +XRF380 kdk.ddns.net XRF382 211.131.19.200 +XRF382 xrf382.pgw.jp +XRF387 195.130.59.77 XRF388 138.197.67.52 -XRF389 106.71.198.27 +XRF389 106.70.187.224 +XRF389 xlxdmr.duckdns.org XRF390 149.7.214.253 +XRF390 xrf390.aotnet.it XRF393 139.91.200.186 +XRF395 5.249.151.111 +XRF398 104.167.117.71 XRF399 185.227.110.247 XRF400 13.58.192.185 +XRF400 xlx400.iz7auh.net XRF404 91.229.143.187 -XRF410 166.78.145.146 +XRF404 xlx.bendiksverden.net +XRF410 xlx.n5amd.com XRF411 82.171.119.45 XRF412 61.195.107.113 +XRF412 xrf412.dip.jp XRF420 174.138.113.116 +XRF420 kc9qen.com XRF421 118.189.181.236 +XRF423 4ix.hacktic.de XRF431 61.195.98.225 +XRF431 xrf431.xreflector-jp.org XRF433 217.160.22.17 +XRF433 xrf433.de XRF434 51.254.128.134 +XRF438 80.211.189.236 XRF440 153.133.72.142 +XRF440 xrf440.e-kyushu.net XRF441 203.137.99.110 +XRF441 xrf441.xreflector-jp.org +XRF443 xrf443.arisondrio.it XRF444 188.68.37.51 +XRF444 xlx444.pa3dfn.nl +XRF446 78.226.112.146 XRF449 159.89.183.117 XRF450 64.137.224.233 -XRF454 168.70.74.137 +XRF450 450.xreflector.org +XRF454 218.250.250.21 XRF455 208.71.169.83 XRF456 54.37.204.187 +XRF456 xrf456.de +XRF460 183.53.66.145 XRF464 52.192.129.174 XRF470 104.49.29.243 +XRF473 104.49.29.243 XRF477 139.162.213.89 XRF479 198.58.106.10 XRF486 51.255.172.249 +XRF486 xlx486.iz8gur.it +XRF487 93.66.214.109 +XRF490 xrf490.dyndns.org XRF499 203.137.76.22 -XRF500 58.96.21.253 -XRF501 198.211.98.63 -XRF502 104.143.94.48 -XRF505 45.248.50.37 +XRF499 xrf499.xreflector-jp.org +XRF500 125.63.57.138 +XRF500 xrf500.org +XRF501 104.130.72.187 +XRF502 74.208.88.137 +XRF505 110.141.219.161 XRF506 121.200.19.211 XRF508 185.188.4.15 +XRF510 xrf510.s56g.net XRF511 213.172.232.13 +XRF511 xlx511.ddns.net XRF515 203.137.78.35 +XRF515 shounandstar.dip.jp XRF518 176.9.1.168 -XRF519 167.114.104.65 +XRF518 xrf518.n18.de +XRF519 24.55.196.105 +XRF519 xrf519.ve3zin.com XRF520 119.59.125.192 +XRF520 dstar.thdar.com XRF521 150.129.184.54 XRF522 14.102.146.160 +XRF523 175.142.199.32 XRF525 80.211.68.38 XRF530 116.251.193.99 +XRF534 208.71.169.83 XRF538 124.41.76.58 -XRF544 210.131.32.240 +XRF538 xrf538.dip.jp +XRF544 202.218.152.66 +XRF544 xlx544.ddns.net XRF550 89.36.222.146 -XRF551 182.167.49.77 +XRF550 550.xreflector.es +XRF551 140.227.198.45 +XRF553 45.79.92.86 XRF554 52.35.183.178 XRF555 210.86.135.13 +XRF555 xrf555.w6kd.com +XRF556 xrf556.w6kd.com +XRF559 98.239.113.175 +XRF567 212.91.156.69 XRF569 203.137.111.98 -XRF583 183.76.149.208 +XRF569 xlxreflector.jpn.ph +XRF570 104.128.230.153 +XRF573 216.189.148.204 +XRF580 67.20.31.79 +XRF583 116.70.240.104 XRF587 68.32.126.21 XRF595 220.146.23.42 +XRF595 hamradio.dip.jp XRF599 203.137.118.190 +XRF599 xrf599.n5wls.net XRF600 13.69.14.204 +XRF600 xrf600.gb7de.co.uk XRF601 51.141.52.193 XRF602 212.56.100.200 XRF603 216.246.155.99 +XRF603 xlx603.cnharc.org XRF604 139.162.241.24 XRF605 183.76.179.238 XRF608 219.122.253.83 +XRF608 xrf608.dip.jp +XRF609 219.122.253.83 XRF610 89.186.80.81 +XRF610 xrf610.vkradio.com XRF613 198.50.202.39 XRF619 167.99.168.82 XRF626 45.77.234.162 +XRF626 626.nz XRF627 121.75.75.200 +XRF630 61.195.125.81 XRF634 180.46.54.237 +XRF634 xrf634.dip.jp +XRF647 217.182.168.54 +XRF651 66.240.165.26 XRF655 146.64.235.19 -XRF666 86.188.14.232 +XRF666 86.186.35.158 +XRF666 vpngrf.webandcloud.net XRF673 180.147.243.178 +XRF673 xrf673.xreflector-jp.org +XRF678 xrf678.ddns.net XRF684 212.237.17.83 XRF689 97.107.128.47 +XRF695 155.254.33.145 +XRF698 203.137.123.89 XRF699 82.102.5.239 +XRF699 xlx.tekniksnack.se +XRF700 78.47.222.93 +XRF700 xrf700.d-star.se XRF701 61.195.107.77 +XRF701 xrf701.xreflector-jp.org XRF703 61.195.98.254 XRF704 150.66.34.110 XRF706 93.186.255.126 +XRF706 xlx706.iz0rin.it XRF707 90.145.156.196 +XRF707 xrf707.openquad.net XRF708 202.218.37.62 +XRF708 xrf708.xreflector-jp.org XRF709 212.237.34.32 -XRF712 124.86.129.12 +XRF709 xlx.dvmega.co.uk +XRF710 oe7mfi.ddns.net +XRF711 212.237.18.27 +XRF712 153.215.181.34 +XRF712 xrf712.ddo.jp XRF713 218.251.63.99 -XRF714 81.169.140.163 +XRF714 85.214.119.76 +XRF714 xrf714.ea3hkb.com +XRF715 xlx715.ea3hkb.net +XRF716 xlx716.duckdns.org XRF717 44.137.70.100 +XRF719 199.227.117.121 +XRF720 23.237.16.149 +XRF720 xrf720.freestar.us +XRF722 80.211.2.161 +XRF722 722.xreflector.es +XRF723 45.33.118.112 XRF724 189.20.209.70 +XRF724 xlx.dvbrazil.com.br XRF725 172.245.9.180 +XRF727 108.33.72.83 +XRF727 w4icy.inerrantenergy.com +XRF730 186.64.123.59 XRF732 190.159.68.105 +XRF732 xlx.hk4km.co XRF733 45.56.117.158 +XRF733 xlx733.ddns.net +XRF735 104.131.81.32 XRF737 195.130.75.246 -XRF740 173.208.200.180 +XRF738 210.171.151.238 +XRF740 104.167.114.230 +XRF740 imagewell.duckdns.org XRF741 203.137.78.41 XRF746 178.254.34.44 -XRF747 93.209.36.152 +XRF747 87.147.142.9 +XRF747 xrf747.de +XRF748 64.137.197.36 +XRF748 xrf748.dyndns.org XRF749 45.77.102.203 XRF750 203.86.206.49 XRF751 203.118.145.79 XRF752 66.154.105.195 +XRF752 xlx752.zl2wl.nz XRF755 178.22.148.229 +XRF755 xlx.radioamateur.tk XRF757 43.229.63.42 +XRF757 xrf757.openquad.net XRF762 129.21.36.65 XRF766 201.62.48.61 +XRF766 xlx.amrase.org.br +XRF767 xrf767.de XRF768 80.211.199.231 XRF770 153.126.173.9 XRF773 94.177.175.230 +XRF773 xrf773.iz0rin.it +XRF775 149.202.61.17 XRF776 218.221.181.241 -XRF777 194.182.66.76 +XRF776 xlx776.tokyo +XRF777 112.218.40.91 +XRF780 96.53.97.22 XRF781 101.143.242.199 +XRF781 xrf781.xreflector-jp.org +XRF782 122.16.56.210 XRF787 46.41.1.96 +XRF787 xrf787.de +XRF788 192.168.0.96 XRF789 45.33.119.142 +XRF789 xrf789.dstarxlx.com.br XRF794 101.143.242.95 +XRF794 xrf794.xreflector-jp.org XRF800 87.252.188.119 XRF801 213.47.71.17 -XRF803 77.116.56.123 -XRF806 178.198.23.201 +XRF801 f4hin.fr +XRF803 77.117.21.251 +XRF806 92.107.25.23 +XRF807 122.18.165.164 +XRF807 hajikko.iobb.net XRF808 18.220.252.27 +XRF808 xrf808.n5wls.net XRF809 78.46.11.69 XRF810 64.137.238.189 +XRF810 810.xreflector.org +XRF811 64.137.238.189 XRF812 203.145.233.141 +XRF812 xrf812.xreflector-jp.org XRF813 97.76.81.165 +XRF813 xlx.inerrantenergy.com XRF817 18.235.96.93 +XRF818 120.79.155.116 +XRF825 51.75.252.197 XRF828 195.225.116.244 +XRF828 xlx828.ddnss.de +XRF833 78.226.112.146 XRF844 137.226.79.122 +XRF847 162.243.4.29 XRF850 88.198.94.77 +XRF850 xrf850.xrfmaster.net +XRF851 xrf851.rsdt.de +XRF852 42.2.140.44 +XRF858 xrf858.ke0lmx.net +XRF859 54.227.203.214 +XRF859 xlx859.ke0lmx.net XRF860 24.134.86.93 -XRF866 46.93.204.84 +XRF860 xrf.njpaasterisk.org +XRF861 66.175.218.63 +XRF865 45.32.212.226 +XRF866 93.233.176.219 +XRF867 51.254.115.5 +XRF870 103.3.234.95 +XRF870 xrf870.ddns.net +XRF871 222.172.252.56 XRF878 203.137.123.113 +XRF878 xrf878.xreflector-jp.org +XRF880 176.10.105.211 XRF883 153.179.226.85 +XRF883 xrf883.dip.jp XRF886 118.163.103.178 +XRF886 xrf886.metropit.net XRF887 118.163.103.177 XRF888 46.18.142.169 +XRF888 xlx888.ns0.it +XRF889 130.149.36.93 XRF893 104.223.59.212 +XRF897 92.222.23.124 XRF900 94.177.237.192 +XRF901 xrf901.dyndns.org +XRF902 xrf902.dyndns.org XRF903 80.211.29.226 XRF904 211.14.169.215 +XRF905 199.212.121.20 XRF906 212.237.11.53 -XRF907 176.84.168.11 +XRF906 xrf906.radioclubveleta.es +XRF907 88.3.75.162 +XRF907 xlx907.ddns.net XRF908 92.222.23.124 XRF909 216.86.147.198 -XRF911 178.128.118.127 +XRF909 www.ealink.es +XRF910 92.177.212.64 +XRF911 5.196.73.89 XRF912 80.211.1.143 XRF915 72.28.30.93 XRF919 80.211.232.174 +XRF920 xrf920.oe7xxr.ampr.at XRF921 44.143.184.83 +XRF921 xlx921.oe7xxr.ampr.at XRF922 81.150.10.62 +XRF922 xrf922.mb6er.com XRF925 90.255.232.101 XRF929 158.69.166.132 +XRF929 xrf929.ddns.net XRF930 94.177.160.5 +XRF930 xreflector.ddns.net XRF931 68.131.30.206 +XRF931 xref.kw4yb.com XRF933 164.132.104.167 +XRF935 188.213.166.199 +XRF935 xlx935.ddns.net XRF940 202.218.37.121 +XRF940 xrf940.xreflector-jp.org XRF944 202.218.34.210 +XRF944 xrf944.xreflector-jp.org XRF945 213.202.229.40 +XRF945 xlx945.xreflector.es +XRF946 212.227.174.45 XRF950 158.64.26.134 +XRF950 xlx950.epf.lu XRF951 18.188.166.109 +XRF956 192.99.245.120 +XRF959 203.137.98.121 +XRF960 80.211.226.89 XRF964 52.173.142.244 +XRF965 47.23.66.19 XRF966 203.150.19.24 +XRF967 95.158.165.32 +XRF967 xlx967.uk.to XRF969 142.93.46.36 XRF970 157.7.221.186 +XRF972 46.121.158.50 XRF973 211.14.169.43 +XRF973 xrf973.xreflector-jp.org XRF974 94.177.217.52 +XRF974 xlx974.dynu.net +XRF975 176.31.161.9 +XRF976 212.237.36.71 +XRF977 977.opendstar.eu +XRF978 74.104.179.159 +XRF978 978.opendstar.eu +XRF979 217.162.36.91 +XRF981 153.210.14.45 XRF986 81.89.102.160 XRF987 185.32.183.148 +XRF987 xrf987.metro-uhf.org XRF988 80.211.236.189 +XRF988 988.xreflector.es XRF989 50.27.131.75 +XRF989 xrf989.bbhill.net XRF990 35.164.237.63 -XRF991 80.211.19.121 +XRF991 91.92.136.118 +XRF993 97.64.20.63 XRF994 35.177.233.106 +XRF995 118.27.30.92 +XRF995 xlx995.ddns.net XRF996 47.104.177.248 XRF997 94.177.187.40 +XRF997 xrf997.iw2gob.it XRF998 44.140.236.20 +XRF998 xlx.sm7.hamnet.nu XRF999 94.177.173.53 +XRF999 xrf999.no-ip.org +XRFWDX 47.149.178.211 +XRFWDX worldwidedx.com +# EOF - Sun, 19 May 2019 12:35:55 GMT diff --git a/Data/DPlus_Hosts.txt b/Data/DPlus_Hosts.txt index 801bf5e..f958e52 100644 --- a/Data/DPlus_Hosts.txt +++ b/Data/DPlus_Hosts.txt @@ -1,974 +1,93 @@ -# DPlus_Hosts.txt downloaded from http://www.pistar.uk/downloads/DPlus_Hosts.txt -# DPlus Hosts resolved from dstargateway.org DNS, with additional hosts -# sourced from http://xlxapi.rlx.lu/api.php?do=GetReflectorHostname -# Please report issues at https://www.facebook.com/groups/pistar/ -# File created at Tuesday 10th of July 2018 08:12:16 PM BST -REF000 23.111.174.198 -REF001 77.57.24.143 -REF002 140.82.62.162 -REF003 173.199.124.183 -REF004 44.103.34.3 -REF005 87.117.229.174 -REF006 34.213.176.201 -REF007 212.227.203.37 -REF008 45.77.153.132 -REF010 85.197.129.86 -REF011 81.95.126.168 -REF012 194.38.140.205 -REF014 110.232.113.108 -REF015 213.202.228.119 -REF017 85.214.78.198 -REF019 31.7.247.58 -REF020 52.23.107.220 -REF022 83.137.45.98 -REF024 94.199.173.123 -REF025 89.38.150.252 -REF026 65.175.188.230 -REF029 80.123.238.76 -REF030 194.59.177.44 -REF032 158.64.26.140 -REF033 46.226.178.81 -REF035 45.79.94.184 -REF038 5.249.151.111 -REF039 31.14.142.119 -REF040 109.71.45.29 -REF046 176.10.140.161 -REF047 202.171.147.58 -REF049 212.71.234.224 -REF050 80.211.155.206 -REF051 93.186.254.219 -REF052 121.119.96.205 -REF053 185.97.120.120 -REF054 52.86.180.251 -REF055 52.80.4.154 -REF057 74.193.217.15 -REF058 118.110.251.54 -REF059 18.219.32.21 -REF060 212.237.36.181 -REF064 122.222.1.50 -REF067 77.229.104.173 -REF068 92.222.145.202 -REF071 211.60.41.185 -REF072 75.60.237.17 -REF074 212.237.211.82 -REF076 203.137.116.117 -REF077 216.21.9.156 -REF078 109.15.57.11 -REF080 121.81.128.207 -REF081 121.82.151.243 -REF083 185.205.210.217 -REF085 113.150.26.8 -REF087 44.137.36.209 -REF088 194.109.192.235 -REF089 194.109.192.236 -REF090 91.92.136.252 -REF093 82.51.162.200 -REF095 203.137.76.53 -REF097 80.211.154.173 -REF098 203.136.233.165 -REF099 80.211.27.75 -REF100 45.62.233.223 -REF101 64.137.236.164 -REF102 23.111.174.196 -REF103 64.137.224.126 -REF104 23.111.174.197 -REF105 51.254.99.78 -REF109 182.168.128.138 -REF110 150.7.164.10 -REF111 61.195.96.160 -REF112 94.177.235.81 -REF113 151.12.36.103 -REF114 5.135.188.16 -REF115 217.182.128.3 -REF118 5.249.148.252 -REF119 125.129.207.86 -REF120 81.150.10.63 -REF121 174.37.249.156 -REF124 211.14.169.234 -REF125 213.181.208.52 -REF129 220.209.106.220 -REF130 194.59.177.45 -REF131 80.127.118.226 -REF132 91.203.55.87 -REF135 74.208.214.69 -REF140 95.211.211.145 -REF145 178.59.23.138 -REF147 46.41.1.127 -REF150 80.211.10.212 -REF158 150.66.16.176 -REF160 61.195.109.179 -REF170 210.178.113.173 -REF171 210.178.113.123 -REF175 162.248.92.25 -REF180 192.241.240.7 -REF185 89.106.108.151 -REF199 153.126.179.214 -REF204 85.214.126.111 -REF206 193.190.240.227 -REF208 151.80.155.39 -REF210 64.137.224.107 -REF212 52.38.90.188 -REF214 185.47.129.230 -REF216 74.214.25.135 -REF220 124.41.83.11 -REF222 212.43.96.84 -REF224 203.137.99.97 -REF226 2.226.183.226 -REF227 89.33.44.100 -REF228 83.77.104.52 -REF229 194.191.4.54 -REF230 80.250.3.114 -REF232 89.185.97.35 -REF241 151.80.158.227 -REF242 73.14.84.43 -REF246 172.93.48.159 -REF255 142.91.158.199 -REF258 75.60.237.19 -REF262 92.192.107.54 -REF263 85.214.193.146 -REF264 52.2.131.118 -REF266 212.237.51.82 -REF268 194.38.140.204 -REF270 158.64.26.132 -REF272 200.231.36.188 -REF284 95.158.165.32 -REF287 43.245.172.2 -REF290 44.182.7.20 -REF291 101.143.242.189 -REF298 220.144.59.222 -REF299 203.86.194.92 -REF300 45.62.244.43 -REF302 144.217.241.23 -REF303 75.70.52.143 -REF305 145.239.116.57 -REF307 72.21.76.154 -REF310 52.11.207.121 -REF311 46.41.0.214 -REF312 192.241.160.183 -REF313 34.213.108.164 -REF315 65.101.7.50 -REF317 44.48.8.15 -REF321 31.207.110.45 -REF328 212.237.33.114 -REF329 114.181.139.32 -REF330 18.222.199.205 -REF332 188.213.168.99 -REF333 194.116.29.73 -REF334 96.47.95.121 -REF336 23.226.233.133 -REF345 45.62.237.34 -REF352 35.230.162.146 -REF358 93.152.167.4 -REF359 94.156.172.213 -REF360 222.229.25.105 -REF364 159.65.231.53 -REF365 59.139.141.204 -REF370 188.213.168.24 -REF371 212.237.8.77 -REF373 58.189.49.139 -REF374 61.195.108.146 -REF376 75.145.119.225 -REF379 104.218.36.162 -REF380 160.16.65.39 -REF382 211.131.19.200 -REF388 138.197.67.52 -REF389 106.71.198.27 -REF390 149.7.214.253 -REF393 139.91.200.186 -REF399 185.227.110.247 -REF400 13.58.192.185 -REF404 91.229.143.187 -REF410 166.78.145.146 -REF411 82.171.119.45 -REF412 61.195.107.113 -REF420 174.138.113.116 -REF421 118.189.181.236 -REF431 61.195.98.225 -REF433 217.160.22.17 -REF434 51.254.128.134 -REF440 153.133.72.142 -REF441 203.137.99.110 -REF444 188.68.37.51 -REF449 159.89.183.117 -REF450 64.137.224.233 -REF454 168.70.74.137 -REF455 208.71.169.83 -REF456 54.37.204.187 -REF464 52.192.129.174 -REF470 104.49.29.243 -REF477 139.162.213.89 -REF479 198.58.106.10 -REF486 51.255.172.249 -REF499 203.137.76.22 -REF500 58.96.21.253 -REF501 198.211.98.63 -REF502 104.143.94.48 -REF505 45.248.50.37 -REF506 121.200.19.211 -REF508 185.188.4.15 -REF511 213.172.232.13 -REF515 203.137.78.35 -REF518 176.9.1.168 -REF519 167.114.104.65 -REF520 119.59.125.192 -REF521 150.129.184.54 -REF522 14.102.146.160 -REF525 80.211.68.38 -REF530 116.251.193.99 -REF538 124.41.76.58 -REF544 210.131.32.240 -REF550 89.36.222.146 -REF551 182.167.49.77 -REF554 52.35.183.178 -REF555 210.86.135.13 -REF569 203.137.111.98 -REF583 183.76.149.208 -REF587 68.32.126.21 -REF595 220.146.23.42 -REF599 203.137.118.190 -REF600 13.69.14.204 -REF601 51.141.52.193 -REF602 212.56.100.200 -REF603 216.246.155.99 -REF604 139.162.241.24 -REF605 183.76.179.238 -REF608 219.122.253.83 -REF610 89.186.80.81 -REF613 198.50.202.39 -REF619 167.99.168.82 -REF626 45.77.234.162 -REF627 121.75.75.200 -REF634 180.46.54.237 -REF655 146.64.235.19 -REF666 86.188.14.232 -REF673 180.147.243.178 -REF684 212.237.17.83 -REF689 97.107.128.47 -REF699 82.102.5.239 -REF701 61.195.107.77 -REF703 61.195.98.254 -REF704 150.66.34.110 -REF706 93.186.255.126 -REF707 90.145.156.196 -REF708 202.218.37.62 -REF709 212.237.34.32 -REF712 124.86.129.12 -REF713 218.251.63.99 -REF714 81.169.140.163 -REF717 44.137.70.100 -REF724 189.20.209.70 -REF725 172.245.9.180 -REF732 190.159.68.105 -REF733 45.56.117.158 -REF737 195.130.75.246 -REF740 173.208.200.180 -REF741 203.137.78.41 -REF746 178.254.34.44 -REF747 93.209.36.152 -REF749 45.77.102.203 -REF750 203.86.206.49 -REF751 203.118.145.79 -REF752 66.154.105.195 -REF755 178.22.148.229 -REF757 43.229.63.42 -REF762 129.21.36.65 -REF766 201.62.48.61 -REF768 80.211.199.231 -REF770 153.126.173.9 -REF773 94.177.175.230 -REF776 218.221.181.241 -REF777 194.182.66.76 -REF781 101.143.242.199 -REF787 46.41.1.96 -REF789 45.33.119.142 -REF794 101.143.242.95 -REF800 87.252.188.119 -REF801 213.47.71.17 -REF803 77.116.56.123 -REF806 178.198.23.201 -REF808 18.220.252.27 -REF809 78.46.11.69 -REF810 64.137.238.189 -REF812 203.145.233.141 -REF813 97.76.81.165 -REF817 18.235.96.93 -REF828 195.225.116.244 -REF844 137.226.79.122 -REF850 88.198.94.77 -REF860 24.134.86.93 -REF866 46.93.204.84 -REF878 203.137.123.113 -REF883 153.179.226.85 -REF886 118.163.103.178 -REF887 118.163.103.177 -REF888 46.18.142.169 -REF893 104.223.59.212 -REF900 94.177.237.192 -REF903 80.211.29.226 -REF904 211.14.169.215 -REF906 212.237.11.53 -REF907 176.84.168.11 -REF908 92.222.23.124 -REF909 216.86.147.198 -REF911 178.128.118.127 -REF912 80.211.1.143 -REF915 72.28.30.93 -REF919 80.211.232.174 -REF921 44.143.184.83 -REF922 81.150.10.62 -REF925 90.255.232.101 -REF929 158.69.166.132 -REF930 94.177.160.5 -REF931 68.131.30.206 -REF933 164.132.104.167 -REF940 202.218.37.121 -REF944 202.218.34.210 -REF945 213.202.229.40 -REF950 158.64.26.134 -REF951 18.188.166.109 -REF964 52.173.142.244 -REF966 203.150.19.24 -REF969 142.93.46.36 -REF970 157.7.221.186 -REF973 211.14.169.43 -REF974 94.177.217.52 -REF986 81.89.102.160 -REF987 185.32.183.148 -REF988 80.211.236.189 -REF989 50.27.131.75 -REF990 35.164.237.63 -REF991 80.211.19.121 -REF994 35.177.233.106 -REF996 47.104.177.248 -REF997 94.177.187.40 -REF998 44.140.236.20 -REF999 94.177.173.53 -W5DRA 75.66.21.213 -4O0LPG 89.188.45.102 -9A0DOS 77.217.166.68 -9A0DRI 83.184.125.202 -9A0DST 83.178.253.62 -9A0DZG 78.134.209.194 -AA4PP 208.54.85.173 -BR2SY 223.100.16.100 -CQ0DAM 94.63.182.214 -CQ0DCH 2.83.253.219 -CQ0DLR 213.13.57.41 -CQ0DPF 95.94.111.92 -CQ0DSE 37.28.237.153 -CQ0DTV 2.82.184.21 -CQ0DVI 94.132.206.63 -CQ1DAH 95.69.107.146 -DB0AB 188.194.155.4 -DB0AFZ 92.50.67.6 -DB0AMK 217.235.18.26 -DB0BLB 91.35.33.79 -DB0BS 134.19.115.94 -DB0CI 79.249.33.248 -DB0DAM 194.94.26.157 -DB0DB 185.70.220.35 -DB0DBN 91.21.102.204 -DB0DJ 217.92.28.60 -DB0DLR 109.41.80.150 -DB0DOS 131.173.32.247 -DB0DRB 88.207.202.202 -DB0EAT 92.210.130.60 -DB0EIS 88.152.157.186 -DB0ERZ 46.227.221.228 -DB0ESS 80.81.9.242 -DB0FIB 78.111.116.226 -DB0GM 91.19.211.133 -DB0GZL 62.226.86.193 -DB0HAA 79.201.23.3 -DB0HAS 84.189.32.49 -DB0HE 109.91.59.80 -DB0HEW 89.15.236.164 -DB0HFD 178.208.98.198 -DB0HFT 194.94.26.189 -DB0HGW 87.151.235.12 -DB0HRR 84.171.15.17 -DB0HUS 79.204.32.126 -DB0IZ 87.122.244.143 -DB0KOE 212.17.239.121 -DB0LBX 185.156.156.157 -DB0LJ 87.139.70.67 -DB0LY 176.9.53.177 -DB0MDX 137.248.151.45 -DB0MOT 94.249.222.90 -DB0NIC 188.194.116.23 -DB0OAL 212.125.105.177 -DB0OX 77.21.170.9 -DB0PBS 192.26.179.90 -DB0POB 87.151.203.58 -DB0REU 93.236.57.36 -DB0RKD 212.17.239.126 -DB0RTV 87.191.151.162 -DB0SIF 134.176.128.63 -DB0SLF 91.35.62.133 -DB0SN 134.76.247.241 -DB0SOB 91.61.226.84 -DB0TVM 129.187.5.189 -DB0UHC 194.97.35.190 -DB0VA 178.4.188.175 -DB0VOX 141.75.245.244 -DB0VS 185.75.164.30 -DB0WA 137.226.79.113 -DB0WBD 91.38.82.249 -DB0WO 194.94.26.157 -DB0WTV 93.223.111.117 -DB0WZ 80.147.61.209 -DB0ZKA 84.128.215.222 -DF0MHR 134.91.90.124 -DM0BAM 84.186.217.60 -DM0GER 87.178.171.3 -DM0HEI 87.151.254.73 -DM0HHW 90.187.26.49 -DM0HMB 141.22.12.147 -DM0IZH 217.91.66.171 -DM0LEI 178.14.70.174 -DM0MW 141.55.128.102 -DM0NOR 77.20.218.106 -DM0SAT 84.146.238.31 -DM0SL 79.204.32.126 -DM0TR 31.16.39.90 -DO0SRE 62.143.16.216 -DO0TPB 195.122.157.243 -E24DK 110.77.235.11 -E25CD 124.122.29.190 -ED1YBK 213.60.194.98 -ED1YBL 213.60.194.98 -ED1ZAJ 81.169.133.171 -ED1ZAM 91.117.67.25 -ED2YAA 77.209.144.230 -ED2YAO 95.60.102.67 -ED2ZAC 83.48.116.61 -ED4ZAD 87.217.220.177 -ED5ZAB 158.42.97.21 -ED5ZAC 89.39.47.83 -ED5ZAG 62.14.178.43 -ED6ZAB 37.152.91.23 -ED7ZAC 195.57.121.189 -ED7ZAD 46.37.89.21 -ED7ZAE 85.137.220.39 -F1ZBU 80.251.102.117 -F1ZCD 88.187.220.2 -F1ZCK 86.248.115.2 -F1ZDF 78.203.212.22 -F1ZDI 92.129.98.93 -F1ZDZ 82.231.84.133 -F1ZEM 86.248.79.161 -F1ZEU 86.248.79.161 -F1ZFG 195.154.33.170 -F1ZGK 90.101.58.185 -F1ZHY 92.171.228.145 -F1ZID 92.188.81.63 -F1ZII 88.164.2.51 -F1ZJH 46.227.22.53 -F1ZJO 37.168.76.85 -F1ZJP 82.64.16.222 -F1ZJR 90.56.60.45 -F1ZKP 2.6.241.54 -F1ZKR 90.41.75.178 -F1ZLX 78.204.173.219 -F1ZWB 77.136.204.53 -F1ZYH 90.63.172.220 -F5ZCV 90.100.204.201 -F5ZFY 80.14.94.180 -F5ZJQ 80.119.102.44 -F5ZKE 78.239.80.131 -F5ZKN 176.134.142.251 -F5ZKO 90.70.0.138 -F5ZKP 82.255.165.128 -F5ZKQ 93.9.3.192 -F5ZLB 92.184.101.43 -F5ZLC 83.196.12.10 -F5ZLG 82.225.216.39 -F5ZLK 79.83.11.55 -F5ZLM 88.121.60.200 -F5ZML 109.214.64.172 -F5ZQH 80.119.102.44 -F5ZSS 86.74.95.58 -GB3WL 81.149.15.21 -GB7CD 194.80.132.179 -GB7DC 81.174.242.218 -GB7DM 94.175.78.230 -GB7DN 86.157.42.132 -GB7HZ 92.28.227.216 -GB7JD 212.56.100.200 -GB7KH 85.119.82.151 -GB7SM 86.133.136.170 -GB7SO 109.145.76.188 -GB7TP 82.31.87.63 -GB7WT 185.49.92.226 -HB9BO 213.202.33.211 -HB9CSR 188.60.43.206 -HB9DR 178.193.253.23 -HB9DS 194.29.11.9 -HB9VD 51.254.122.59 -HB9ZRH 77.57.117.248 -IR0AAB 87.17.208.105 -IR0CJ 185.82.114.251 -IR0DV 94.39.94.213 -IR0K 185.78.18.13 -IR0UBT 78.15.153.11 -IR0UEZ 185.82.114.253 -IR1CT 2.40.23.41 -IR1DC 88.149.181.240 -IR1UAW 79.30.54.193 -IR1UBR 81.30.11.81 -IR1UBY 79.44.127.10 -IR1UFV 151.16.215.69 -IR1UGO 82.50.132.89 -IR1UIM 151.16.108.239 -IR1UIV 217.19.159.207 -IR1UIW 2.235.33.50 -IR2AY 79.21.171.25 -IR2UDW 91.142.66.115 -IR2UEZ 78.134.30.121 -IR3EE 213.21.185.184 -IR3EF 79.6.136.177 -IR3UBK 46.19.235.134 -IR3UBZ 79.6.136.178 -IR3UG 95.142.180.57 -IR3UIB 79.6.136.179 -IR3UJ 79.6.136.181 -IR4MO 80.17.240.27 -IR4UCJ 31.3.184.38 -IR5AF 79.20.189.118 -IR5AN 62.48.40.65 -IR5AR 95.239.125.53 -IR5AY 79.35.129.25 -IR5UBM 46.226.178.80 -IR5UBO 93.188.115.147 -IR5UBS 46.226.178.83 -IR5UCK 46.226.176.11 -IR5UCL 79.53.51.208 -IR5UCM 91.214.61.109 -IR5UCQ 188.13.250.107 -IR5UDB 46.226.178.84 -IR6UCX 95.247.183.177 -IR6UDO 185.47.96.11 -IR7UBL 87.1.250.55 -IR7UBP 213.45.9.196 -IR7UBX 2.237.73.137 -IR7UE 87.11.254.122 -IR9P 87.11.163.158 -IR9UBM 5.170.220.181 -IR9UBQ 185.152.140.1 -IR9UBV 151.54.10.175 -JE4YLP 122.20.168.4 -JH3ZMD 180.145.113.1 -JL3ZBS 111.64.21.179 -JL3ZDF 125.207.29.216 -JQ1ZBD 122.249.235.110 -JQ1ZKF 180.50.81.49 -JQ1ZKG 118.243.253.222 -JQ1ZOR 118.241.159.202 -JQ1ZRY 221.27.66.171 -K0PRA 72.1.108.245 -K1MRA 207.180.168.249 -K1RFI 173.166.94.77 -K2BWK 24.213.133.213 -K3AWS 76.190.233.121 -K3CR 146.186.33.234 -K4BRK 73.20.208.61 -K4HPT 68.225.85.83 -K5PSA 24.54.146.202 -K6CLX 72.134.1.68 -K6PUW 162.219.58.134 -K7EVR 72.201.150.71 -K7LWH 63.226.225.249 -K7YI 67.22.175.38 -KB1TIX 71.255.118.133 -KB1UVD 73.47.74.3 -KB1UVE 72.65.115.44 -KB1WUW 71.184.97.85 -KB3KWD 199.193.59.214 -KB5DRP 52.144.103.54 -KB8EOC 192.180.5.104 -KC1ACI 68.185.127.105 -KC1AZZ 108.7.32.84 -KC1EGN 71.181.20.21 -KC2TGB 73.226.52.46 -KC3BIY 184.89.158.48 -KC3BMB 71.58.65.44 -KC3FHC 71.244.175.15 -KC4UG 64.91.93.185 -KC8ARJ 174.84.8.3 -KD0PKU 67.55.181.66 -KD0QPG 162.255.157.234 -KD0YLG 199.17.47.23 -KD0ZSA 71.37.237.68 -KD2DIP 74.88.18.162 -KD2FET 174.224.139.213 -KD2GBR 70.13.94.158 -KD2LWX 71.7.10.101 -KD2LYO 66.243.219.222 -KD2MNA 67.241.251.13 -KD5RCA 173.185.79.204 -KD8SWP 76.189.143.248 -KD8TUZ 74.140.148.77 -KD9AKF 158.222.16.101 -KD9CVF 69.174.171.8 -KD9IPR 97.83.196.212 -KE0KKN 24.111.240.142 -KE0MVE 156.98.131.33 -KE0MVG 69.76.160.34 -KE5YAP 71.97.89.126 -KE8AOQ 168.215.61.3 -KE8BUO 98.29.31.4 -KE8EVF 68.61.246.212 -KF5MMX 47.32.251.186 -KF7CLD 70.89.134.123 -KF7NOD 73.193.45.223 -KF7NPL 63.225.171.156 -KF7VJO 67.169.255.93 -KG5JPJ 98.172.10.197 -KG5OXR 24.49.102.111 -KG5RED 24.182.107.171 -KG7QPU 66.235.18.176 -KG7WZG 168.103.142.41 -KJ6KTV 98.150.91.5 -KK4IQW 68.47.133.52 -KK4PGE 74.131.186.40 -KK4QXJ 173.214.218.208 -KK4WIB 73.184.164.110 -KK4YOE 71.91.69.74 -KK6GIZ 76.178.49.69 -KK6JA 73.70.240.127 -KM4LNN 216.221.204.103 -KN4BDJ 74.137.13.22 -KN4BOF 64.234.50.153 -KR7ST 204.89.198.102 -KS1R 73.119.107.231 -KY4HS 71.28.168.77 -LD1XB 46.46.205.177 -LD2EM 82.148.173.251 -LD2HT 84.214.96.91 -LD4FH 91.149.30.230 -LD4LA 46.66.178.25 -LD5BG 93.184.115.59 -LD7FF 148.252.102.235 -LD8BS 89.162.85.130 -LD8LK 81.167.105.194 -LD8MM 88.89.35.121 -LD8NA 193.212.207.139 -LD8NN 85.166.209.165 -LD8SA 89.162.67.118 -LU5FB 179.60.235.222 -LX0DML 78.141.137.66 -LX0DRD 213.135.244.146 -LX0DRH 88.207.174.219 -LX0DRJ 78.141.137.66 -LX0DRN 213.135.244.146 -LX0DRV 88.207.202.202 -LX0RL 146.0.189.212 -LX9EPF 158.64.26.2 -LZ0DAA 78.83.103.163 -LZ0DAD 213.16.55.2 -LZ0DAH 95.158.175.90 -LZ0DAM 151.237.6.74 -LZ0DAO 212.39.89.30 -LZ0DAR 212.73.131.203 -LZ0DAV 213.16.49.230 -LZ0DBS 185.18.57.21 -LZ0DVB 62.176.87.194 -LZ0SUN 151.237.49.30 -MB6AB 81.98.206.178 -MB6AF 213.121.3.16 -MB6BA 80.6.17.181 -MB6CA 81.151.69.117 -MB6CE 90.195.155.188 -MB6CY 86.143.115.28 -MB6EG 176.24.39.74 -MB6EY 86.184.9.11 -MB6FG 147.147.164.234 -MB6HU 86.168.101.171 -MB6IOG 86.145.6.185 -MB6JD 212.56.100.200 -MB6LY 86.142.208.37 -MB6NK 188.29.164.237 -N0CXX 65.103.49.196 -N1HIT 73.249.54.16 -N4ARG 71.41.121.229 -N7JN 192.231.186.217 -N7RDS 72.250.209.84 -NE1DV 198.0.181.254 -NJ2MC 174.225.6.77 -NR7SS 74.95.68.73 -NU7TS 72.250.210.9 -NW7DR 192.231.186.5 -OE1XDS 80.109.80.41 -OE1XIK 178.115.227.153 -OE3XWW 194.166.53.142 -OE5XKL 193.33.210.138 -OE5XOL 185.16.114.90 -OH0DST 79.133.3.134 -OK0BAF 84.16.107.229 -OK0BCA 151.249.105.57 -OK0BRQ 88.102.142.95 -OK0DIT 88.146.217.109 -OK0DJ 37.221.252.37 -OK0DPL 85.207.84.124 -OK0DRB 89.235.49.32 -OK0DRO 85.13.109.61 -OK0DV 37.221.252.37 -OK0EB 92.62.226.10 -ON0CPS 81.245.76.160 -ON0CVH 91.183.117.199 -ON0DP 84.198.145.44 -ON0DST 5.135.58.242 -ON0LB 188.210.92.86 -ON0LGE 44.144.12.194 -ON0LUS 87.64.154.241 -ON0OS 178.116.123.86 -ON0TB 78.94.50.214 -OZ0EVA 85.202.72.96 -OZ0REA 87.58.212.152 -OZ0RED 80.251.196.244 -OZ0REF 93.178.152.206 -OZ0REH 109.57.28.210 -OZ1DHS 212.112.154.128 -OZ1REC 109.59.28.68 -OZ1REJ 80.62.116.137 -OZ2REE 176.21.189.181 -OZ2REG 87.49.146.167 -OZ2REM 212.98.114.58 -OZ3DSR 212.112.156.53 -OZ3REQ 130.225.2.2 -OZ3REY 80.62.117.65 -OZ4REN 83.90.173.65 -OZ6DST 77.68.172.7 -OZ7DSD 62.242.112.138 -OZ7REL 62.44.134.179 -OZ9AFZ 185.109.76.192 -OZ9RET 87.55.118.187 -PI1CJP 83.87.195.38 -PI1DHD 94.211.247.46 -PI1DSE 88.159.83.58 -PI1HGD 83.85.108.198 -PI1MEP 44.137.69.19 -PI1RYS 44.137.37.37 -PI1SHA 84.83.171.182 -PI1SNK 145.129.86.235 -PI1UTR 44.137.72.10 -PJ2A 190.112.246.172 -PT2DV 201.87.243.130 -PT2MTD 200.96.200.110 -PY1CEU 179.55.35.114 -PY1EGR 189.82.114.34 -PY2KBH 189.92.85.70 -PY2KJP 189.28.159.114 -PY2KPE 177.38.42.86 -S55DLJ 90.157.180.200 -S55DMX 164.8.106.109 -S55DZA 88.200.95.123 -SE0O 80.216.190.189 -SE0S 193.150.254.146 -SE3XCH 80.170.3.193 -SG0AHH 2.248.47.171 -SG4UOF 77.53.38.251 -SG4UZM 44.140.128.254 -SG4VBO 155.4.32.228 -SG5EWE 77.218.246.190 -SG5TAH 90.224.101.245 -SG6JWU 176.10.223.2 -SG7HTP 46.162.115.187 -SG7IKJ 213.66.79.158 -SG7WDL 94.255.137.118 -SG7WSE 83.184.191.161 -SI9AM 44.140.102.134 -SK0AI 5.150.225.10 -SK0RMT 44.140.13.5 -SK2AT 88.83.52.159 -SK3GY 90.236.23.43 -SK3LH 46.230.233.3 -SK3RHU 95.143.207.93 -SK3XX 80.170.4.42 -SK4BW 44.140.128.254 -SK5UM 78.71.198.202 -SK6BA 78.72.45.233 -SK6DZ 31.31.161.42 -SK6EP 31.208.231.214 -SK6IF 2.64.169.90 -SK6MA 2.68.144.73 -SK6SA 90.144.170.73 -SK7BS 44.140.236.21 -SK7DS 77.107.16.191 -SK7RDS 46.230.239.7 -SK7RGM 46.195.13.179 -SK7RNQ 85.30.164.129 -SK7RRV 81.170.157.133 -SK7RSR 46.162.115.29 -SL2ZA 44.140.236.90 -SR1UVH 178.238.252.12 -SR1UVS 185.71.241.179 -SR2UVG 178.182.231.10 -SR2UVO 77.91.9.87 -SR2UVV 193.188.198.80 -SR2VVV 193.188.198.121 -SR3UVL 89.68.2.48 -SR3ZX 31.179.247.147 -SR4MR 89.229.112.15 -SR4UBI 109.231.36.129 -SR4UVD 213.73.1.97 -SR4UVM 213.73.1.96 -SR4UVN 82.160.168.159 -SR5RK 212.2.124.66 -SR5UOS 194.50.158.122 -SR5UVA 185.28.103.77 -SR5UVR 193.111.146.160 -SR5WC 195.137.246.150 -SR6DMR 79.190.47.27 -SR6UKB 46.231.77.40 -SR6UPK 192.162.98.59 -SR6UVO 79.162.252.86 -SR6UVW 94.254.131.164 -SR6UVX 213.199.207.199 -SR7LDZ 217.113.226.137 -SR7ULM 217.113.226.137 -SR7USC 93.105.207.178 -SR7UVK 46.45.109.210 -SR8UVC 95.160.212.234 -SR8UVL 46.21.222.34 -SR8UVP 212.2.124.234 -SR8UWD 94.246.175.66 -SR9CZ 193.93.90.190 -SR9KR 37.47.68.144 -SR9SZ 79.175.232.17 -SR9UV 89.174.117.157 -SR9UVK 194.187.236.178 -SR9UVP 85.190.240.120 -SR9UVZ 178.23.105.134 -SR9VVO 89.234.226.126 -SV1P 79.130.76.190 -SV2Q 80.106.24.223 -SV3G 83.212.248.94 -SV8S 94.66.26.109 -SV9K 85.72.39.67 -SW1I 178.59.23.138 -SW2A 109.242.193.199 -T79DV 77.242.223.46 -TF3RPI 194.144.104.195 -UR0HUA 193.200.175.69 -V53W 41.182.6.211 -VA2LX 45.42.113.14 -VA2REX 207.35.36.178 -VA2RKA 199.91.244.166 -VA2RKB 23.178.1.126 -VA2RVO 207.253.107.5 -VA2XNY 206.47.252.157 -VA3ITL 174.117.156.18 -VA3ODG 64.179.223.221 -VA3RDD 142.114.102.68 -VA3SNR 70.76.12.11 -VA3SRG 216.223.75.148 -VA3WDG 216.8.148.24 -VA5DR 128.233.238.66 -VA6ACW 68.147.27.52 -VA6MEO 70.73.156.104 -VA6SRG 199.126.180.49 -VA7REF 24.86.6.163 -VE1DNR 47.55.201.14 -VE2CSA 142.116.210.109 -VE2CST 192.99.111.170 -VE2FCT 173.177.48.60 -VE2QE 70.50.46.246 -VE2REX 209.226.17.162 -VE2RHH 70.27.229.10 -VE2RIO 192.81.14.31 -VE2RKI 104.245.152.243 -VE2RQT 132.203.129.20 -VE2RTO 148.59.220.178 -VE2RVI 104.192.17.255 -VE2SEW 207.253.181.227 -VE2SKG 74.210.140.143 -VE2VPS 66.159.41.113 -VE3DSL 208.114.128.164 -VE3EBX 99.228.74.129 -VE3FCD 99.237.33.210 -VE3NMN 97.107.59.241 -VE3RIG 108.161.115.76 -VE3RSB 184.151.178.34 -VE3STP 104.245.3.63 -VE3XBT 50.100.78.137 -VE3YRK 66.159.121.4 -VE5MBX 24.72.17.36 -VE6IPG 70.73.156.94 -VE6JKB 108.173.190.73 -VE6KM 69.196.80.40 -VE6MHD 198.53.218.88 -VE6WRE 70.73.93.106 -VE7RMR 216.13.198.52 -VK1RWN 43.225.61.4 -VK2RAG 202.182.150.242 -VK2RBV 202.182.133.44 -VK2RWN 112.213.33.196 -VK3RMM 120.157.89.133 -VK4RBD 110.141.198.177 -VK4RBX 203.201.137.251 -VK4RDK 123.211.29.67 -VK4RUS 103.102.229.98 -VK7RAA 118.208.246.183 -VK7RCR 120.29.244.4 -VK7RRR 118.208.244.133 -VY1RDS 174.90.251.92 -VY2CFB 96.30.171.235 -VY2DSR 96.30.161.195 -W0CDS 66.109.218.67 -W0QEY 129.82.254.231 -W0ZWY 184.169.107.74 -W1BCG 199.241.247.2 -W1CNH 65.175.188.230 -W1MRA 173.48.14.233 -W2ECA 163.151.247.12 -W2XRX 174.224.132.162 -W3DHS 69.140.91.192 -W3DRA 69.242.93.85 -W4BRM 108.18.217.86 -W4GSO 98.101.176.110 -W4GWM 64.234.103.45 -W4IAX 70.145.51.143 -W4VLD 192.119.238.197 -W5AW 208.68.71.94 -W5DRA 75.66.21.213 -W5SUL 173.216.181.178 -W5TC 129.15.109.18 -W5WIN 24.162.194.195 -W6CX 208.80.118.218 -W7AI 75.146.134.20 -W7NPC 97.113.104.185 -W7NPG 50.47.138.52 -W7RNK 70.89.121.130 -W8HEQ 74.218.95.46 -W8ORG 162.195.36.251 -W8RNL 74.218.136.51 -W8RTL 72.9.63.207 -W9WDX 74.126.231.228 -WA0RC 204.77.163.64 -WA2EMO 72.230.162.224 -WA4KIK 71.82.31.66 -WA7HJR 44.24.241.133 -WA7VC 64.91.53.130 -WB1GOF 108.7.45.17 -WB4KOG 44.34.128.175 -WB6BA 64.135.177.146 -WD1CRS 73.126.7.192 -WI8DX 24.209.195.47 -WI9WIN 216.246.177.7 -WR0AEN 66.109.209.220 -WR5FM 67.61.81.83 -WR7KCR 69.55.219.9 -WW9RS 216.222.190.20 -WX4PCA 107.141.141.203 -WX8GRR 96.36.57.251 -WX9NC 76.29.59.178 -XE2ITZ 189.237.150.227 -XE2NL 187.138.65.97 -YO6K 86.125.103.6 -YO6U 193.254.231.124 -ZL1CCT 131.203.124.1 -ZL1IBD 202.36.75.248 -ZL1TPD 222.154.227.90 -ZS6VTS 146.64.235.18 -ZU9DBI 154.73.157.17 +# Prepared at ar-dns.net - Sun, 19 May 2019 12:38:29 GMT +REF001 ref001.dstargateway.org +REF002 ref002.dstargateway.org +REF003 ref003.dstargateway.org +REF004 ref004.dstargateway.org +REF005 ref005.dstargateway.org +REF006 ref006.dstargateway.org +REF007 ref007.dstargateway.org +REF008 ref008.dstargateway.org +REF009 ref009.dstargateway.org +REF010 ref010.dstargateway.org +REF011 ref011.dstargateway.org +REF012 ref012.dstargateway.org +REF013 ref013.dstargateway.org +REF014 ref014.dstargateway.org +REF015 ref015.dstargateway.org +REF016 ref016.dstargateway.org +REF017 ref017.dstargateway.org +REF018 ref018.dstargateway.org +REF019 ref019.dstargateway.org +REF020 ref020.dstargateway.org +REF021 ref021.dstargateway.org +REF022 ref022.dstargateway.org +REF023 ref023.dstargateway.org +REF024 ref024.dstargateway.org +REF025 ref025.dstargateway.org +REF026 ref026.dstargateway.org +REF027 ref027.dstargateway.org +REF028 ref028.dstargateway.org +REF029 ref029.dstargateway.org +REF030 ref030.dstargateway.org +REF031 ref031.dstargateway.org +REF032 ref032.dstargateway.org +REF033 ref033.dstargateway.org +REF034 ref034.dstargateway.org +REF035 ref035.dstargateway.org +REF036 ref036.dstargateway.org +REF037 ref037.dstargateway.org +REF038 ref038.dstargateway.org +REF039 ref039.dstargateway.org +REF040 ref040.dstargateway.org +REF041 ref041.dstargateway.org +REF042 ref042.dstargateway.org +REF043 ref043.dstargateway.org +REF044 ref044.dstargateway.org +REF045 ref045.dstargateway.org +REF046 ref046.dstargateway.org +REF047 ref047.dstargateway.org +REF048 ref048.dstargateway.org +REF049 ref049.dstargateway.org +REF050 ref050.dstargateway.org +REF051 ref051.dstargateway.org +REF052 ref052.dstargateway.org +REF053 ref053.dstargateway.org +REF054 ref054.dstargateway.org +REF055 ref055.dstargateway.org +REF056 ref056.dstargateway.org +REF057 ref057.dstargateway.org +REF058 ref058.dstargateway.org +REF059 ref059.dstargateway.org +REF060 ref060.dstargateway.org +REF061 ref061.dstargateway.org +REF062 ref062.dstargateway.org +REF063 ref063.dstargateway.org +REF064 ref064.dstargateway.org +REF065 ref065.dstargateway.org +REF066 ref066.dstargateway.org +REF067 ref067.dstargateway.org +REF068 ref068.dstargateway.org +REF069 ref069.dstargateway.org +REF070 ref070.dstargateway.org +REF071 ref071.dstargateway.org +REF072 ref072.dstargateway.org +REF073 ref073.dstargateway.org +REF074 ref074.dstargateway.org +REF075 ref075.dstargateway.org +REF076 ref076.dstargateway.org +REF077 ref077.dstargateway.org +REF078 ref078.dstargateway.org +REF079 ref079.dstargateway.org +REF080 ref080.dstargateway.org +REF081 ref081.dstargateway.org +REF082 ref082.dstargateway.org +REF083 ref083.dstargateway.org +REF084 ref084.dstargateway.org +REF085 ref085.dstargateway.org +REF086 ref086.dstargateway.org +REF087 ref087.dstargateway.org +REF088 ref088.dstargateway.org +REF089 ref089.dstargateway.org +REF367 xrf367.ad6dm.net +REF425 xlx425.xlx.ar-dns.net +# EOF - Sun, 19 May 2019 12:38:29 GMT From 7900609c52da31dc341c7b13ef23380990359a80 Mon Sep 17 00:00:00 2001 From: Napont Kitiwiriyakul Date: Mon, 3 Jun 2019 22:20:27 +0700 Subject: [PATCH 144/166] update thai hosts --- Data/DCS_Hosts.txt | 6 +++--- Data/DExtra_Hosts.txt | 8 +++----- Data/DPlus_Hosts.txt | 3 +++ 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Data/DCS_Hosts.txt b/Data/DCS_Hosts.txt index 6bd6452..f4da4f2 100644 --- a/Data/DCS_Hosts.txt +++ b/Data/DCS_Hosts.txt @@ -271,7 +271,7 @@ DCS511 213.172.232.13 DCS515 203.137.78.35 DCS518 176.9.1.168 DCS519 149.56.165.76 -DCS520 119.59.125.192 +DCS520 xlx.dtdxa.com DCS521 150.129.184.54 DCS522 14.102.146.160 DCS523 175.142.199.32 @@ -284,7 +284,7 @@ DCS550 89.36.222.146 DCS551 140.227.198.45 DCS553 45.79.92.86 DCS554 52.35.183.178 -DCS555 210.86.135.13 +DCS555 xlx555.dtdxa.com DCS567 212.91.156.69 DCS569 203.137.111.98 DCS570 172.104.13.31 @@ -415,7 +415,7 @@ DCS907 176.84.63.187 DCS908 92.222.23.124 DCS909 216.86.147.198 DCS910 94.177.207.26 -DCS911 178.128.118.127 +DCS911 xlx911.patrweb.com DCS912 80.211.1.143 DCS915 72.28.30.93 DCS919 80.211.232.174 diff --git a/Data/DExtra_Hosts.txt b/Data/DExtra_Hosts.txt index 550eb4c..11df3ce 100644 --- a/Data/DExtra_Hosts.txt +++ b/Data/DExtra_Hosts.txt @@ -454,8 +454,7 @@ XRF518 176.9.1.168 XRF518 xrf518.n18.de XRF519 24.55.196.105 XRF519 xrf519.ve3zin.com -XRF520 119.59.125.192 -XRF520 dstar.thdar.com +XRF520 xlx.dtdxa.com XRF521 150.129.184.54 XRF522 14.102.146.160 XRF523 175.142.199.32 @@ -471,8 +470,7 @@ XRF550 550.xreflector.es XRF551 140.227.198.45 XRF553 45.79.92.86 XRF554 52.35.183.178 -XRF555 210.86.135.13 -XRF555 xrf555.w6kd.com +XRF555 xlx555.dtdxa.com XRF556 xrf556.w6kd.com XRF559 98.239.113.175 XRF567 212.91.156.69 @@ -673,7 +671,7 @@ XRF908 92.222.23.124 XRF909 216.86.147.198 XRF909 www.ealink.es XRF910 92.177.212.64 -XRF911 5.196.73.89 +XRF911 xlx911.patrweb.com XRF912 80.211.1.143 XRF915 72.28.30.93 XRF919 80.211.232.174 diff --git a/Data/DPlus_Hosts.txt b/Data/DPlus_Hosts.txt index f958e52..2cedcd3 100644 --- a/Data/DPlus_Hosts.txt +++ b/Data/DPlus_Hosts.txt @@ -90,4 +90,7 @@ REF088 ref088.dstargateway.org REF089 ref089.dstargateway.org REF367 xrf367.ad6dm.net REF425 xlx425.xlx.ar-dns.net +REF520 xlx.dtdxa.com +REF555 xlx555.dtdxa.com +REF911 xlx911.patrweb.com # EOF - Sun, 19 May 2019 12:38:29 GMT From 5f0c5993e162a61f52a19feb689e8b17e3c95410 Mon Sep 17 00:00:00 2001 From: Shawn Chain Date: Thu, 4 Jul 2019 19:12:29 +0800 Subject: [PATCH 145/166] fix merge error --- Common/Logger.cpp | 8 ++------ Common/Logger.h | 2 -- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/Common/Logger.cpp b/Common/Logger.cpp index abe3da9..3747b1b 100644 --- a/Common/Logger.cpp +++ b/Common/Logger.cpp @@ -87,9 +87,9 @@ void CLogger::DoLogRecord(wxLogLevel level, const wxString& msg, const wxLogReco struct tm* tm; if (utc){ - tm = ::gmtime(×tamp); + tm = ::gmtime(&info.timestamp); }else{ - tm = ::localtime(×tamp); + tm = ::localtime(&info.timestamp); } wxString message; @@ -133,8 +133,4 @@ void CLogger::writeLog(const wxChar* msg, time_t timestamp) m_file->Write(wxString(msg)); m_file->Flush(); -} - -void CLogger::DoLogRecord(wxLogLevel level, const wxString& msg, const wxLogRecordInfo& info) { - DoLog(level, msg.c_str(), info.timestamp); } \ No newline at end of file diff --git a/Common/Logger.h b/Common/Logger.h index e95ea32..b9ca2c2 100644 --- a/Common/Logger.h +++ b/Common/Logger.h @@ -30,8 +30,6 @@ public: virtual void DoLogRecord(wxLogLevel level, const wxString& msg, const wxLogRecordInfo& info); - virtual void DoLogRecord(wxLogLevel level, const wxString& msg, const wxLogRecordInfo& info); - private: wxString m_name; wxFFile* m_file; From 0bdf963d84c47bb8a480d2393c5a2578d0e5f9e4 Mon Sep 17 00:00:00 2001 From: sp5lg <55870605+sp5lg@users.noreply.github.com> Date: Fri, 27 Sep 2019 09:14:43 +0200 Subject: [PATCH 146/166] Altitude in the comment before range According to APRS spec http://www.aprs.org/doc/APRS101.PDF altitude (/A=) should be placed in the comment section of the packet so it should be after range (RNG) descriptor. --- Common/APRSWriter.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Common/APRSWriter.cpp b/Common/APRSWriter.cpp index d0d840e..8b52bea 100644 --- a/Common/APRSWriter.cpp +++ b/Common/APRSWriter.cpp @@ -406,12 +406,12 @@ void CAPRSWriter::sendIdFramesFixed() lon.Replace(wxT(","), wxT(".")); wxString output; - output.Printf(wxT("%s-S>APDG01,TCPIP*,qAC,%s-GS:;%-7s%-2s*%02d%02d%02dz%s%cD%s%ca/A=%06.0lfRNG%04.0lf %s %s"), + output.Printf(wxT("%s-S>APDG01,TCPIP*,qAC,%s-GS:;%-7s%-2s*%02d%02d%02dz%s%cD%s%caRNG%04.0lf/A=%06.0lf %s %s"), m_gateway.c_str(), m_gateway.c_str(), entry->getCallsign().c_str(), entry->getBand().c_str(), tm->tm_mday, tm->tm_hour, tm->tm_min, lat.c_str(), (entry->getLatitude() < 0.0F) ? wxT('S') : wxT('N'), lon.c_str(), (entry->getLongitude() < 0.0F) ? wxT('W') : wxT('E'), - entry->getAGL() * 3.28, entry->getRange() * 0.6214, band.c_str(), desc.c_str()); + entry->getRange() * 0.6214, entry->getAGL() * 3.28, band.c_str(), desc.c_str()); char ascii[300U]; ::memset(ascii, 0x00, 300U); @@ -421,11 +421,11 @@ void CAPRSWriter::sendIdFramesFixed() m_thread->write(ascii); if (entry->getBand().Len() == 1U) { - output.Printf(wxT("%s-%s>APDG02,TCPIP*,qAC,%s-%sS:!%s%cD%s%c&/A=%06.0lfRNG%04.0lf %s %s"), + output.Printf(wxT("%s-%s>APDG02,TCPIP*,qAC,%s-%sS:!%s%cD%s%c&RNG%04.0lf/A=%06.0lf %s %s"), entry->getCallsign().c_str(), entry->getBand().c_str(), entry->getCallsign().c_str(), entry->getBand().c_str(), lat.c_str(), (entry->getLatitude() < 0.0F) ? wxT('S') : wxT('N'), lon.c_str(), (entry->getLongitude() < 0.0F) ? wxT('W') : wxT('E'), - entry->getAGL() * 3.28, entry->getRange() * 0.6214, band.c_str(), desc.c_str()); + entry->getRange() * 0.6214, entry->getAGL() * 3.28, band.c_str(), desc.c_str()); ::memset(ascii, 0x00, 300U); for (unsigned int i = 0U; i < output.Len(); i++) From d8192a9c7f761ff9b96d5269f7353a66bbb4f3bd Mon Sep 17 00:00:00 2001 From: Shawn Chain Date: Mon, 9 Dec 2019 14:36:43 +0800 Subject: [PATCH 147/166] add linux server compile --- GlobalDefines.h | 2 +- Makefile.linux | 70 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 Makefile.linux diff --git a/GlobalDefines.h b/GlobalDefines.h index adc4397..e17c85a 100644 --- a/GlobalDefines.h +++ b/GlobalDefines.h @@ -1,7 +1,7 @@ #ifndef __GLOBAL_DEFS__ #define __GLOBAL_DEFS__ -#if defined(__APPLE__) +#if defined(__APPLE__) || defined(LINUX) #define DATA_DIR "/opt/mmdvm/conf/dstar" #define LOG_DIR "/opt/mmdvm/logs" #define CONF_DIR "/opt/mmdvm/conf" diff --git a/Makefile.linux b/Makefile.linux new file mode 100644 index 0000000..08e14e1 --- /dev/null +++ b/Makefile.linux @@ -0,0 +1,70 @@ +# export CXX ?= $(shell wx-config --cxx) +# export CFLAGS ?= -O2 -Wall $(shell wx-config --cxxflags) -DLOG_LOCALTIME=1 -DLINUX=1 +# export GUILIBS ?= $(shell wx-config --libs adv,core,base) +# export LIBS ?= $(shell wx-config --libs base) +# export LDFLAGS ?= + +all: ircDDBGateway/ircddbgatewayd + +ircDDBGateway/ircddbgatewayd: Common/Common.a ircDDB/IRCDDB.a + $(MAKE) -C ircDDBGateway + +ircDDBGatewayConfig/ircddbgatewayconfig: GUICommon/GUICommon.a Common/Common.a + $(MAKE) -C ircDDBGatewayConfig + +APRSTransmit/aprstransmitd: Common/Common.a + $(MAKE) -C APRSTransmit + +RemoteControl/remotecontrold: Common/Common.a + $(MAKE) -C RemoteControl + +StarNetServer/starnetserverd: Common/Common.a ircDDB/IRCDDB.a + $(MAKE) -C StarNetServer + +TextTransmit/texttransmitd: Common/Common.a + $(MAKE) -C TextTransmit + +TimerControl/timercontrold: Common/Common.a GUICommon/GUICommon.a + $(MAKE) -C TimerControl + +TimeServer/timeserverd: Common/Common.a GUICommon/GUICommon.a + $(MAKE) -C TimeServer + +VoiceTransmit/voicetransmitd: Common/Common.a + $(MAKE) -C VoiceTransmit + +GUICommon/GUICommon.a: + $(MAKE) -C GUICommon + +Common/Common.a: + $(MAKE) -C Common + +ircDDB/IRCDDB.a: + $(MAKE) -C ircDDB + +install: all + $(MAKE) -C Data install + $(MAKE) -C APRSTransmit install + $(MAKE) -C ircDDBGateway install + $(MAKE) -C RemoteControl install + $(MAKE) -C StarNetServer install + $(MAKE) -C TextTransmit install + $(MAKE) -C TimerControl install + $(MAKE) -C TimeServer install + $(MAKE) -C VoiceTransmit install + $(MAKE) -C ircDDBGatewayConfig install + +clean: + $(MAKE) -C Common clean + $(MAKE) -C ircDDB clean + $(MAKE) -C GUICommon clean + $(MAKE) -C APRSTransmit clean + $(MAKE) -C ircDDBGateway clean + $(MAKE) -C RemoteControl clean + $(MAKE) -C StarNetServer clean + $(MAKE) -C TextTransmit clean + $(MAKE) -C TimerControl clean + $(MAKE) -C TimeServer clean + $(MAKE) -C VoiceTransmit clean + $(MAKE) -C ircDDBGatewayConfig clean + From b51f6435c574d6251aeb55e081ac4b95f5a13041 Mon Sep 17 00:00:00 2001 From: Shawn Chain Date: Mon, 9 Dec 2019 14:41:07 +0800 Subject: [PATCH 148/166] fix linux compile --- Makefile.linux | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile.linux b/Makefile.linux index 08e14e1..e6be2ea 100644 --- a/Makefile.linux +++ b/Makefile.linux @@ -1,8 +1,8 @@ -# export CXX ?= $(shell wx-config --cxx) -# export CFLAGS ?= -O2 -Wall $(shell wx-config --cxxflags) -DLOG_LOCALTIME=1 -DLINUX=1 -# export GUILIBS ?= $(shell wx-config --libs adv,core,base) -# export LIBS ?= $(shell wx-config --libs base) -# export LDFLAGS ?= +export CXX ?= $(shell wx-config --cxx) +export CFLAGS ?= -O2 -Wall $(shell wx-config --cxxflags) -DLOG_LOCALTIME=1 -DLINUX=1 +export GUILIBS ?= $(shell wx-config --libs adv,core,base) +export LIBS ?= $(shell wx-config --libs base) +export LDFLAGS ?= all: ircDDBGateway/ircddbgatewayd From 77cb31fe2d31e6ed841377ae766b904e17fc084b Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Fri, 13 Dec 2019 08:36:39 +0000 Subject: [PATCH 149/166] Revert "Tweaks for OpenWrt build" --- Common/DDHandler.cpp | 2 - Common/DStarDefines.h | 1 - Common/Defs.h | 1 - Common/Logger.cpp | 30 ++---------- Common/XLXHostsFileDownloader.cpp | 1 - GlobalDefines.h | 30 ------------ Makefile.linux | 70 --------------------------- Makefile.openwrt | 70 --------------------------- Makefile.osx | 70 --------------------------- ircDDBGateway/IRCDDBGatewayAppD.cpp | 8 +-- ircDDBGateway/IRCDDBGatewayDefs.h | 3 +- ircDDBGateway/IRCDDBGatewayThread.cpp | 16 +++--- 12 files changed, 16 insertions(+), 286 deletions(-) delete mode 100644 GlobalDefines.h delete mode 100644 Makefile.linux delete mode 100644 Makefile.openwrt delete mode 100644 Makefile.osx diff --git a/Common/DDHandler.cpp b/Common/DDHandler.cpp index 604babe..faa9a40 100644 --- a/Common/DDHandler.cpp +++ b/Common/DDHandler.cpp @@ -26,10 +26,8 @@ #include #include #include -#if defined(__linux__) #include #include -#endif #include #endif diff --git a/Common/DStarDefines.h b/Common/DStarDefines.h index 5899b0f..b0c3972 100644 --- a/Common/DStarDefines.h +++ b/Common/DStarDefines.h @@ -15,7 +15,6 @@ #define DStarDefines_H #include -#include "../GlobalDefines.h" const unsigned int DSTAR_GMSK_SYMBOL_RATE = 4800U; const float DSTAR_GMSK_BT = 0.5F; diff --git a/Common/Defs.h b/Common/Defs.h index ca9d950..f2c5c31 100644 --- a/Common/Defs.h +++ b/Common/Defs.h @@ -20,7 +20,6 @@ #define Defs_H #include -#include "../GlobalDefines.h" const wxString DEXTRA_HOSTS_FILE_NAME = wxT("DExtra_Hosts.txt"); const wxString DPLUS_HOSTS_FILE_NAME = wxT("DPlus_Hosts.txt"); diff --git a/Common/Logger.cpp b/Common/Logger.cpp index 3747b1b..6aa789b 100644 --- a/Common/Logger.cpp +++ b/Common/Logger.cpp @@ -18,12 +18,6 @@ #include "Logger.h" -#if defined(LOG_LOCALTIME) && LOG_LOCALTIME == 1 -static const bool utc = false; -#else -static const bool utc = true; -#endif - CLogger::CLogger(const wxString& directory, const wxString& name) : wxLog(), m_name(name), @@ -38,12 +32,7 @@ m_day(0) time_t timestamp; ::time(×tamp); - struct tm* tm; - if (utc){ - tm = ::gmtime(×tamp); - }else{ - tm = ::localtime(×tamp); - } + struct tm* tm = ::gmtime(×tamp); wxString text; text.Printf(wxT("%s-%04d-%02d-%02d"), m_name.c_str(), tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday); @@ -85,12 +74,7 @@ void CLogger::DoLogRecord(wxLogLevel level, const wxString& msg, const wxLogReco default: letter = wxT("U"); break; } - struct tm* tm; - if (utc){ - tm = ::gmtime(&info.timestamp); - }else{ - tm = ::localtime(&info.timestamp); - } + struct tm* tm = ::gmtime(&info.timestamp); wxString message; message.Printf(wxT("%s: %04d-%02d-%02d %02d:%02d:%02d: %s\n"), letter.c_str(), tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec, msg.c_str()); @@ -107,12 +91,7 @@ void CLogger::writeLog(const wxChar* msg, time_t timestamp) wxASSERT(m_file->IsOpened()); wxASSERT(msg != NULL); - struct tm* tm; - if (utc){ - tm = ::gmtime(×tamp); - }else{ - tm = ::localtime(×tamp); - } + struct tm* tm = ::gmtime(×tamp); int day = tm->tm_yday; if (day != m_day) { @@ -133,4 +112,5 @@ void CLogger::writeLog(const wxChar* msg, time_t timestamp) m_file->Write(wxString(msg)); m_file->Flush(); -} \ No newline at end of file +} + diff --git a/Common/XLXHostsFileDownloader.cpp b/Common/XLXHostsFileDownloader.cpp index 09c6be8..869ddd0 100644 --- a/Common/XLXHostsFileDownloader.cpp +++ b/Common/XLXHostsFileDownloader.cpp @@ -31,7 +31,6 @@ wxString CXLXHostsFileDownloader::Download(const wxString & xlxHostsFileURL) wxLogMessage(_T("Downloading XLX reflector list from %s"), xlxHostsFileURL.c_str()); wxString xlxHostsFileName = wxFileName::CreateTempFileName(_T("XLX_Hosts_")); - wxLogMessage(_T("Downloading XLX host file...")); wxString commandLine = _T("wget -q -O ") + xlxHostsFileName + _T(" ") + xlxHostsFileURL; bool execResult = wxShell(commandLine); diff --git a/GlobalDefines.h b/GlobalDefines.h deleted file mode 100644 index e17c85a..0000000 --- a/GlobalDefines.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef __GLOBAL_DEFS__ -#define __GLOBAL_DEFS__ - -#if defined(__APPLE__) || defined(LINUX) -#define DATA_DIR "/opt/mmdvm/conf/dstar" -#define LOG_DIR "/opt/mmdvm/logs" -#define CONF_DIR "/opt/mmdvm/conf" -#define CONF_FILE "ircDDBGateway.ini" -#define PID_FILE "/tmp/ircDDBGateway.pid" -#define PID_FILE_T "/tmp/ircDDBGateway_%s.pid" - -#elif defined(OPENWRT) && OPENWRT == 1 -#define DATA_DIR "/etc/mmdvm/dstar" -#define LOG_DIR "/var/log/mmdvm" -#define CONF_DIR "/etc" -#define CONF_FILE "ircDDBGateway.ini" -#define PID_FILE "/tmp/ircDDBGateway.pid" -#define PID_FILE_T "/tmp/ircDDBGateway_%s.pid" - -#else -#define DATA_DIR "/usr/share/ircddbgateway" -#define LOG_DIR "/tmp" -#define CONF_DIR "/etc" -#define CONF_FILE "ircddbgateway" -#define PID_FILE "/var/run/ircddbgateway.pid" -#define PID_FILE_T "/var/run/ircddbgateway_%s.pid" - -#endif - -#endif diff --git a/Makefile.linux b/Makefile.linux deleted file mode 100644 index e6be2ea..0000000 --- a/Makefile.linux +++ /dev/null @@ -1,70 +0,0 @@ -export CXX ?= $(shell wx-config --cxx) -export CFLAGS ?= -O2 -Wall $(shell wx-config --cxxflags) -DLOG_LOCALTIME=1 -DLINUX=1 -export GUILIBS ?= $(shell wx-config --libs adv,core,base) -export LIBS ?= $(shell wx-config --libs base) -export LDFLAGS ?= - -all: ircDDBGateway/ircddbgatewayd - -ircDDBGateway/ircddbgatewayd: Common/Common.a ircDDB/IRCDDB.a - $(MAKE) -C ircDDBGateway - -ircDDBGatewayConfig/ircddbgatewayconfig: GUICommon/GUICommon.a Common/Common.a - $(MAKE) -C ircDDBGatewayConfig - -APRSTransmit/aprstransmitd: Common/Common.a - $(MAKE) -C APRSTransmit - -RemoteControl/remotecontrold: Common/Common.a - $(MAKE) -C RemoteControl - -StarNetServer/starnetserverd: Common/Common.a ircDDB/IRCDDB.a - $(MAKE) -C StarNetServer - -TextTransmit/texttransmitd: Common/Common.a - $(MAKE) -C TextTransmit - -TimerControl/timercontrold: Common/Common.a GUICommon/GUICommon.a - $(MAKE) -C TimerControl - -TimeServer/timeserverd: Common/Common.a GUICommon/GUICommon.a - $(MAKE) -C TimeServer - -VoiceTransmit/voicetransmitd: Common/Common.a - $(MAKE) -C VoiceTransmit - -GUICommon/GUICommon.a: - $(MAKE) -C GUICommon - -Common/Common.a: - $(MAKE) -C Common - -ircDDB/IRCDDB.a: - $(MAKE) -C ircDDB - -install: all - $(MAKE) -C Data install - $(MAKE) -C APRSTransmit install - $(MAKE) -C ircDDBGateway install - $(MAKE) -C RemoteControl install - $(MAKE) -C StarNetServer install - $(MAKE) -C TextTransmit install - $(MAKE) -C TimerControl install - $(MAKE) -C TimeServer install - $(MAKE) -C VoiceTransmit install - $(MAKE) -C ircDDBGatewayConfig install - -clean: - $(MAKE) -C Common clean - $(MAKE) -C ircDDB clean - $(MAKE) -C GUICommon clean - $(MAKE) -C APRSTransmit clean - $(MAKE) -C ircDDBGateway clean - $(MAKE) -C RemoteControl clean - $(MAKE) -C StarNetServer clean - $(MAKE) -C TextTransmit clean - $(MAKE) -C TimerControl clean - $(MAKE) -C TimeServer clean - $(MAKE) -C VoiceTransmit clean - $(MAKE) -C ircDDBGatewayConfig clean - diff --git a/Makefile.openwrt b/Makefile.openwrt deleted file mode 100644 index 8e07cf3..0000000 --- a/Makefile.openwrt +++ /dev/null @@ -1,70 +0,0 @@ -# export CXX ?= $(shell wx-config --cxx) -# export CFLAGS ?= -O2 -Wall $(shell wx-config --cxxflags) -# export GUILIBS ?= $(shell wx-config --libs adv,core,base) -# export LIBS ?= $(shell wx-config --libs base) -# export LDFLAGS ?= - -all: ircDDBGateway/ircddbgatewayd - -ircDDBGateway/ircddbgatewayd: Common/Common.a ircDDB/IRCDDB.a - $(MAKE) -C ircDDBGateway - -ircDDBGatewayConfig/ircddbgatewayconfig: GUICommon/GUICommon.a Common/Common.a - $(MAKE) -C ircDDBGatewayConfig - -APRSTransmit/aprstransmitd: Common/Common.a - $(MAKE) -C APRSTransmit - -RemoteControl/remotecontrold: Common/Common.a - $(MAKE) -C RemoteControl - -StarNetServer/starnetserverd: Common/Common.a ircDDB/IRCDDB.a - $(MAKE) -C StarNetServer - -TextTransmit/texttransmitd: Common/Common.a - $(MAKE) -C TextTransmit - -TimerControl/timercontrold: Common/Common.a GUICommon/GUICommon.a - $(MAKE) -C TimerControl - -TimeServer/timeserverd: Common/Common.a GUICommon/GUICommon.a - $(MAKE) -C TimeServer - -VoiceTransmit/voicetransmitd: Common/Common.a - $(MAKE) -C VoiceTransmit - -GUICommon/GUICommon.a: - $(MAKE) -C GUICommon - -Common/Common.a: - $(MAKE) -C Common - -ircDDB/IRCDDB.a: - $(MAKE) -C ircDDB - -install: all - $(MAKE) -C Data install - $(MAKE) -C APRSTransmit install - $(MAKE) -C ircDDBGateway install - $(MAKE) -C RemoteControl install - $(MAKE) -C StarNetServer install - $(MAKE) -C TextTransmit install - $(MAKE) -C TimerControl install - $(MAKE) -C TimeServer install - $(MAKE) -C VoiceTransmit install - $(MAKE) -C ircDDBGatewayConfig install - -clean: - $(MAKE) -C Common clean - $(MAKE) -C ircDDB clean - $(MAKE) -C GUICommon clean - $(MAKE) -C APRSTransmit clean - $(MAKE) -C ircDDBGateway clean - $(MAKE) -C RemoteControl clean - $(MAKE) -C StarNetServer clean - $(MAKE) -C TextTransmit clean - $(MAKE) -C TimerControl clean - $(MAKE) -C TimeServer clean - $(MAKE) -C VoiceTransmit clean - $(MAKE) -C ircDDBGatewayConfig clean - diff --git a/Makefile.osx b/Makefile.osx deleted file mode 100644 index 66755cd..0000000 --- a/Makefile.osx +++ /dev/null @@ -1,70 +0,0 @@ -export CXX ?= $(shell wx-config --cxx) -export CFLAGS ?= -O2 -Wall $(shell wx-config --cxxflags) -DLOG_LOCALTIME=1 -export GUILIBS ?= $(shell wx-config --libs adv,core,base) -export LIBS ?= $(shell wx-config --libs base) -export LDFLAGS ?= - -all: ircDDBGateway/ircddbgatewayd ircDDBGatewayConfig/ircddbgatewayconfig - -ircDDBGateway/ircddbgatewayd: Common/Common.a ircDDB/IRCDDB.a - $(MAKE) -C ircDDBGateway - -ircDDBGatewayConfig/ircddbgatewayconfig: GUICommon/GUICommon.a Common/Common.a - $(MAKE) -C ircDDBGatewayConfig - -APRSTransmit/aprstransmitd: Common/Common.a - $(MAKE) -C APRSTransmit - -RemoteControl/remotecontrold: Common/Common.a - $(MAKE) -C RemoteControl - -StarNetServer/starnetserverd: Common/Common.a ircDDB/IRCDDB.a - $(MAKE) -C StarNetServer - -TextTransmit/texttransmitd: Common/Common.a - $(MAKE) -C TextTransmit - -TimerControl/timercontrold: Common/Common.a GUICommon/GUICommon.a - $(MAKE) -C TimerControl - -TimeServer/timeserverd: Common/Common.a GUICommon/GUICommon.a - $(MAKE) -C TimeServer - -VoiceTransmit/voicetransmitd: Common/Common.a - $(MAKE) -C VoiceTransmit - -GUICommon/GUICommon.a: - $(MAKE) -C GUICommon - -Common/Common.a: - $(MAKE) -C Common - -ircDDB/IRCDDB.a: - $(MAKE) -C ircDDB - -install: all - $(MAKE) -C Data install - $(MAKE) -C APRSTransmit install - $(MAKE) -C ircDDBGateway install - $(MAKE) -C RemoteControl install - $(MAKE) -C StarNetServer install - $(MAKE) -C TextTransmit install - $(MAKE) -C TimerControl install - $(MAKE) -C TimeServer install - $(MAKE) -C VoiceTransmit install - $(MAKE) -C ircDDBGatewayConfig install - -clean: - $(MAKE) -C Common clean - $(MAKE) -C ircDDB clean - $(MAKE) -C GUICommon clean - $(MAKE) -C APRSTransmit clean - $(MAKE) -C ircDDBGateway clean - $(MAKE) -C RemoteControl clean - $(MAKE) -C StarNetServer clean - $(MAKE) -C TextTransmit clean - $(MAKE) -C TimerControl clean - $(MAKE) -C TimeServer clean - $(MAKE) -C VoiceTransmit clean - $(MAKE) -C ircDDBGatewayConfig clean - diff --git a/ircDDBGateway/IRCDDBGatewayAppD.cpp b/ircDDBGateway/IRCDDBGatewayAppD.cpp index 5dcaa61..4ea6d25 100644 --- a/ircDDBGateway/IRCDDBGatewayAppD.cpp +++ b/ircDDBGateway/IRCDDBGatewayAppD.cpp @@ -42,8 +42,6 @@ #include #include -#include "../GlobalDefines.h" - const wxChar* NAME_PARAM = wxT("Gateway Name"); const wxChar* NOLOGGING_SWITCH = wxT("nolog"); const wxChar* DEBUG_SWITCH = wxT("debug"); @@ -124,9 +122,9 @@ int main(int argc, char** argv) wxString pidFileName; if (!name.IsEmpty()) - pidFileName.Printf(wxT(PID_FILE_T), name.c_str()); + pidFileName.Printf(wxT("/var/run/opendv/ircddbgateway_%s.pid"), name.c_str()); else - pidFileName = wxT(PID_FILE); + pidFileName = wxT("/var/run/opendv/ircddbgateway.pid"); pidFileName.Replace(wxT(" "), wxT("_")); char fileName[128U]; @@ -200,7 +198,6 @@ bool CIRCDDBGatewayAppD::init() new wxLogNull; } -#if !defined(OPENWRT) || OPENWRT != 1 wxString appName; if (!m_name.IsEmpty()) appName = APPLICATION_NAME + wxT(" ") + m_name; @@ -214,7 +211,6 @@ bool CIRCDDBGatewayAppD::init() wxLogError(wxT("Another copy of the ircDDB Gateway is running, exiting")); return false; } -#endif wxLogInfo(wxT("Starting ") + APPLICATION_NAME + wxT(" daemon - ") + VERSION); diff --git a/ircDDBGateway/IRCDDBGatewayDefs.h b/ircDDBGateway/IRCDDBGatewayDefs.h index 7806c3b..9eac8a0 100644 --- a/ircDDBGateway/IRCDDBGatewayDefs.h +++ b/ircDDBGateway/IRCDDBGatewayDefs.h @@ -20,11 +20,10 @@ #define IRCDDBGatewayDefs_H #include -#include "../GlobalDefines.h" const wxString APPLICATION_NAME = wxT("ircDDB Gateway"); -const wxString CONFIG_FILE_NAME = wxT(CONF_FILE); +const wxString CONFIG_FILE_NAME = wxT("ircddbgateway"); const wxString STATUS1_FILE_NAME = wxT("status1.txt"); const wxString STATUS2_FILE_NAME = wxT("status2.txt"); diff --git a/ircDDBGateway/IRCDDBGatewayThread.cpp b/ircDDBGateway/IRCDDBGatewayThread.cpp index 301bc4e..37b8b59 100644 --- a/ircDDBGateway/IRCDDBGatewayThread.cpp +++ b/ircDDBGateway/IRCDDBGatewayThread.cpp @@ -693,19 +693,19 @@ void CIRCDDBGatewayThread::processIrcDDB() case 0: case 10: if (m_lastStatus != IS_DISCONNECTED) { - wxLogMessage(wxT("Disconnected from ircDDB")); + wxLogInfo(wxT("Disconnected from ircDDB")); m_lastStatus = IS_DISCONNECTED; } break; case 7: if (m_lastStatus != IS_CONNECTED) { - wxLogMessage(wxT("Connected to ircDDB")); + wxLogInfo(wxT("Connected to ircDDB")); m_lastStatus = IS_CONNECTED; } break; default: if (m_lastStatus != IS_CONNECTING) { - wxLogMessage(wxT("Connecting to ircDDB")); + wxLogInfo(wxT("Connecting to ircDDB")); m_lastStatus = IS_CONNECTING; } break; @@ -726,13 +726,13 @@ void CIRCDDBGatewayThread::processIrcDDB() break; if (!address.IsEmpty()) { - wxLogInfo(wxT("USER: %s %s %s %s"), user.c_str(), repeater.c_str(), gateway.c_str(), address.c_str()); + wxLogMessage(wxT("USER: %s %s %s %s"), user.c_str(), repeater.c_str(), gateway.c_str(), address.c_str()); m_cache.updateUser(user, repeater, gateway, address, timestamp, DP_DEXTRA, false, false); #if defined(ENABLE_NAT_TRAVERSAL) m_natTraversal->traverseNatG2(address); #endif } else { - wxLogInfo(wxT("USER: %s NOT FOUND"), user.c_str()); + wxLogMessage(wxT("USER: %s NOT FOUND"), user.c_str()); } } break; @@ -745,7 +745,7 @@ void CIRCDDBGatewayThread::processIrcDDB() CRepeaterHandler::resolveRepeater(repeater, gateway, address, DP_DEXTRA); if (!address.IsEmpty()) { - wxLogInfo(wxT("REPEATER: %s %s %s"), repeater.c_str(), gateway.c_str(), address.c_str()); + wxLogMessage(wxT("REPEATER: %s %s %s"), repeater.c_str(), gateway.c_str(), address.c_str()); m_cache.updateRepeater(repeater, gateway, address, DP_DEXTRA, false, false); #if defined(ENABLE_NAT_TRAVERSAL) m_natTraversal->traverseNatG2(address); @@ -765,7 +765,7 @@ void CIRCDDBGatewayThread::processIrcDDB() CDExtraHandler::gatewayUpdate(gateway, address); CDPlusHandler::gatewayUpdate(gateway, address); if (!address.IsEmpty()) { - wxLogInfo(wxT("GATEWAY: %s %s"), gateway.c_str(), address.c_str()); + wxLogMessage(wxT("GATEWAY: %s %s"), gateway.c_str(), address.c_str()); m_cache.updateGateway(gateway, address, DP_DEXTRA, false, false); #if defined(ENABLE_NAT_TRAVERSAL) m_natTraversal->traverseNatG2(address); @@ -812,7 +812,7 @@ void CIRCDDBGatewayThread::processRepeater(IRepeaterProtocolHandler* handler) if (!repeater.IsSameAs(user)) { CRepeaterHandler* handler = CRepeaterHandler::findDVRepeater(repeater); if (handler == NULL) - wxLogInfo(wxT("Heard received from unknown repeater, %s"), repeater.c_str()); + wxLogMessage(wxT("Heard received from unknown repeater, %s"), repeater.c_str()); else handler->processRepeater(*heard); From 1b917f5a7f316bd985ab4ea76f7cf9d505e1b284 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Fri, 27 Dec 2019 17:15:08 +0000 Subject: [PATCH 150/166] Remove the dutch-star D-Plus authentication. --- Common/DPlusAuthenticator.cpp | 15 +-------------- Common/DPlusAuthenticator.h | 3 +-- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/Common/DPlusAuthenticator.cpp b/Common/DPlusAuthenticator.cpp index 527df14..0576edd 100644 --- a/Common/DPlusAuthenticator.cpp +++ b/Common/DPlusAuthenticator.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2015,2018 by Jonathan Naylor G4KLX + * Copyright (C) 2010-2015,2018,2019 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 @@ -25,9 +25,6 @@ const wxString OPENDSTAR_HOSTNAME = wxT("auth.dstargateway.org"); const unsigned int OPENDSTAR_PORT = 20001U; -const wxString DUTCHSTAR_HOSTNAME = wxT("dpns.dutch-star.eu"); -const unsigned int DUTCHSTAR_PORT = 20001U; - const unsigned int TCP_TIMEOUT = 10U; CDPlusAuthenticator::CDPlusAuthenticator(const wxString& loginCallsign, const wxString& gatewayCallsign, const wxString& address, CCacheManager* cache) : @@ -37,7 +34,6 @@ m_gatewayCallsign(gatewayCallsign), m_address(address), m_cache(cache), m_timer(1U, 6U * 3600U), // 6 hours -m_pollTimer(1U, 60U), // 1 minute m_killed(false) { wxASSERT(!loginCallsign.IsEmpty()); @@ -68,28 +64,19 @@ void* CDPlusAuthenticator::Entry() wxLogMessage(wxT("Starting the D-Plus Authenticator thread")); authenticate(m_loginCallsign, OPENDSTAR_HOSTNAME, OPENDSTAR_PORT, '2', true); - authenticate(m_gatewayCallsign, DUTCHSTAR_HOSTNAME, DUTCHSTAR_PORT, 'K', false); m_timer.start(); - m_pollTimer.start(); try { while (!m_killed) { - if (m_pollTimer.hasExpired()) { - poll(m_gatewayCallsign, DUTCHSTAR_HOSTNAME, DUTCHSTAR_PORT, 'K'); - m_pollTimer.start(); - } - if (m_timer.hasExpired()) { authenticate(m_loginCallsign, OPENDSTAR_HOSTNAME, OPENDSTAR_PORT, '2', true); - authenticate(m_gatewayCallsign, DUTCHSTAR_HOSTNAME, DUTCHSTAR_PORT, 'K', false); m_timer.start(); } Sleep(1000UL); m_timer.clock(); - m_pollTimer.clock(); } } catch (std::exception& e) { diff --git a/Common/DPlusAuthenticator.h b/Common/DPlusAuthenticator.h index 606ce12..03faead 100644 --- a/Common/DPlusAuthenticator.h +++ b/Common/DPlusAuthenticator.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2013 by Jonathan Naylor G4KLX + * Copyright (C) 2010-2013,2019 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 @@ -48,7 +48,6 @@ private: wxString m_address; CCacheManager* m_cache; CTimer m_timer; - CTimer m_pollTimer; bool m_killed; bool poll(const wxString& callsign, const wxString& hostname, unsigned int port, unsigned char id); From b8fbf58815823f06e38564f3c5f613e3eb5c7aad Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Fri, 14 Feb 2020 22:05:47 +0000 Subject: [PATCH 151/166] Update to VS2019. --- APRSTransmit/APRSTransmit.vcxproj | 10 +++++----- APRSTransmit/APRSTransmitD.vcxproj | 10 +++++----- Common/Common.vcxproj | 10 +++++----- GUICommon/GUICommon.vcxproj | 10 +++++----- RemoteControl/RemoteControl.vcxproj | 10 +++++----- StarNetServer/StarNetServer.vcxproj | 10 +++++----- TextTransmit/TextTransmit.vcxproj | 10 +++++----- TimeServer/TimeServer.vcxproj | 10 +++++----- TimerControl/TimerControl.vcxproj | 10 +++++----- VoiceTransmit/VoiceTransmit.vcxproj | 10 +++++----- ircDDB/ircDDB.vcxproj | 10 +++++----- ircDDBGateway/ircDDBGateway.vcxproj | 10 +++++----- ircDDBGatewayConfig/ircDDBGatewayConfig.vcxproj | 10 +++++----- 13 files changed, 65 insertions(+), 65 deletions(-) diff --git a/APRSTransmit/APRSTransmit.vcxproj b/APRSTransmit/APRSTransmit.vcxproj index afecf5d..8c383ab 100644 --- a/APRSTransmit/APRSTransmit.vcxproj +++ b/APRSTransmit/APRSTransmit.vcxproj @@ -22,29 +22,29 @@ {F26EA1DB-74CF-4C52-A425-00235C8ABED2} APRSTransmit Win32Proj - 10.0.16299.0 + 10.0 Application - v141 + v142 Unicode true Application - v141 + v142 Unicode true Application - v141 + v142 Unicode Application - v141 + v142 Unicode diff --git a/APRSTransmit/APRSTransmitD.vcxproj b/APRSTransmit/APRSTransmitD.vcxproj index b03ecf3..8c76d99 100644 --- a/APRSTransmit/APRSTransmitD.vcxproj +++ b/APRSTransmit/APRSTransmitD.vcxproj @@ -22,29 +22,29 @@ {C706EF5D-3917-4796-8BEB-823498A1B13C} APRSTransmit Win32Proj - 10.0.16299.0 + 10.0 Application - v141 + v142 Unicode true Application - v141 + v142 Unicode true Application - v141 + v142 Unicode Application - v141 + v142 Unicode diff --git a/Common/Common.vcxproj b/Common/Common.vcxproj index 1f68ab8..7e565ee 100644 --- a/Common/Common.vcxproj +++ b/Common/Common.vcxproj @@ -22,29 +22,29 @@ {E793CB8E-2AC9-431A-BBFC-3F52537BB3CF} Common Win32Proj - 10.0.16299.0 + 10.0 StaticLibrary - v141 + v142 Unicode true StaticLibrary - v141 + v142 Unicode true StaticLibrary - v141 + v142 Unicode StaticLibrary - v141 + v142 Unicode diff --git a/GUICommon/GUICommon.vcxproj b/GUICommon/GUICommon.vcxproj index fa1aa10..3d02b78 100644 --- a/GUICommon/GUICommon.vcxproj +++ b/GUICommon/GUICommon.vcxproj @@ -22,29 +22,29 @@ {02D03515-0BBE-4553-8C40-566A597478F8} GUICommon Win32Proj - 10.0.16299.0 + 10.0 StaticLibrary - v141 + v142 Unicode true StaticLibrary - v141 + v142 Unicode true StaticLibrary - v141 + v142 Unicode StaticLibrary - v141 + v142 Unicode diff --git a/RemoteControl/RemoteControl.vcxproj b/RemoteControl/RemoteControl.vcxproj index fcca2ca..4b5b287 100644 --- a/RemoteControl/RemoteControl.vcxproj +++ b/RemoteControl/RemoteControl.vcxproj @@ -22,29 +22,29 @@ {F7756875-1F58-4006-AD55-5C963AB682C0} RemoteControl Win32Proj - 10.0.16299.0 + 10.0 Application - v141 + v142 Unicode true Application - v141 + v142 Unicode true Application - v141 + v142 Unicode Application - v141 + v142 Unicode diff --git a/StarNetServer/StarNetServer.vcxproj b/StarNetServer/StarNetServer.vcxproj index 6dbfc4b..7536891 100644 --- a/StarNetServer/StarNetServer.vcxproj +++ b/StarNetServer/StarNetServer.vcxproj @@ -22,29 +22,29 @@ {4E9989C8-80D4-4F6E-BCA1-754DCED3AF5F} StarNetServer Win32Proj - 10.0.16299.0 + 10.0 Application - v141 + v142 Unicode true Application - v141 + v142 Unicode true Application - v141 + v142 Unicode Application - v141 + v142 Unicode diff --git a/TextTransmit/TextTransmit.vcxproj b/TextTransmit/TextTransmit.vcxproj index b9df38e..c8c556e 100644 --- a/TextTransmit/TextTransmit.vcxproj +++ b/TextTransmit/TextTransmit.vcxproj @@ -22,29 +22,29 @@ {AFB9BCE5-0D37-4707-93A1-DA14E39F2773} TextTransmit Win32Proj - 10.0.16299.0 + 10.0 Application - v141 + v142 Unicode true Application - v141 + v142 Unicode true Application - v141 + v142 Unicode Application - v141 + v142 Unicode diff --git a/TimeServer/TimeServer.vcxproj b/TimeServer/TimeServer.vcxproj index 1dda959..2676d4d 100644 --- a/TimeServer/TimeServer.vcxproj +++ b/TimeServer/TimeServer.vcxproj @@ -22,29 +22,29 @@ {99F336A5-6E33-4919-BF75-D6D8BA26345E} TimeServer Win32Proj - 10.0.16299.0 + 10.0 Application - v141 + v142 Unicode true Application - v141 + v142 Unicode true Application - v141 + v142 Unicode Application - v141 + v142 Unicode diff --git a/TimerControl/TimerControl.vcxproj b/TimerControl/TimerControl.vcxproj index 246e3b1..61543c9 100644 --- a/TimerControl/TimerControl.vcxproj +++ b/TimerControl/TimerControl.vcxproj @@ -22,29 +22,29 @@ {68CFAB6D-AED3-4B8A-BCB3-EE4136CA00A3} TimerControl Win32Proj - 10.0.16299.0 + 10.0 Application - v141 + v142 Unicode true Application - v141 + v142 Unicode true Application - v141 + v142 Unicode Application - v141 + v142 Unicode diff --git a/VoiceTransmit/VoiceTransmit.vcxproj b/VoiceTransmit/VoiceTransmit.vcxproj index a866dad..2c67175 100644 --- a/VoiceTransmit/VoiceTransmit.vcxproj +++ b/VoiceTransmit/VoiceTransmit.vcxproj @@ -22,29 +22,29 @@ {27D44C4F-6849-4E15-A5BB-0B54BA296D98} VoiceTransmit Win32Proj - 10.0.16299.0 + 10.0 Application - v141 + v142 Unicode true Application - v141 + v142 Unicode true Application - v141 + v142 Unicode Application - v141 + v142 Unicode diff --git a/ircDDB/ircDDB.vcxproj b/ircDDB/ircDDB.vcxproj index a94f278..fc1ca68 100644 --- a/ircDDB/ircDDB.vcxproj +++ b/ircDDB/ircDDB.vcxproj @@ -22,29 +22,29 @@ {276BC54D-5581-4A0C-AFD5-A5BDC947F0AD} ircDDB Win32Proj - 10.0.16299.0 + 10.0 StaticLibrary - v141 + v142 Unicode true StaticLibrary - v141 + v142 Unicode true StaticLibrary - v141 + v142 Unicode StaticLibrary - v141 + v142 Unicode diff --git a/ircDDBGateway/ircDDBGateway.vcxproj b/ircDDBGateway/ircDDBGateway.vcxproj index c41edff..5b8ae21 100644 --- a/ircDDBGateway/ircDDBGateway.vcxproj +++ b/ircDDBGateway/ircDDBGateway.vcxproj @@ -22,29 +22,29 @@ {6DDA3497-66A3-4856-BAD4-1DDCDBDFF959} ircDDBGateway Win32Proj - 10.0.16299.0 + 10.0 Application - v141 + v142 Unicode true Application - v141 + v142 Unicode true Application - v141 + v142 Unicode Application - v141 + v142 Unicode diff --git a/ircDDBGatewayConfig/ircDDBGatewayConfig.vcxproj b/ircDDBGatewayConfig/ircDDBGatewayConfig.vcxproj index dbbb516..786e575 100644 --- a/ircDDBGatewayConfig/ircDDBGatewayConfig.vcxproj +++ b/ircDDBGatewayConfig/ircDDBGatewayConfig.vcxproj @@ -22,29 +22,29 @@ {D0A32505-822B-4936-A61B-A5151966AEAA} ircDDBGatewayConfig Win32Proj - 10.0.16299.0 + 10.0 Application - v141 + v142 Unicode true Application - v141 + v142 Unicode true Application - v141 + v142 Unicode Application - v141 + v142 Unicode From 81a818b2352658d1b3904f66fe62eb4d24e3b639 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Tue, 3 Mar 2020 15:49:13 +0000 Subject: [PATCH 152/166] Add a backoff timer for connections to aprs.fi. --- Common/APRSWriter.cpp | 4 +++- Common/APRSWriterThread.cpp | 41 ++++++++++++++++++++++++++++++++----- Common/APRSWriterThread.h | 8 +++++++- 3 files changed, 46 insertions(+), 7 deletions(-) diff --git a/Common/APRSWriter.cpp b/Common/APRSWriter.cpp index 8b52bea..28cab71 100644 --- a/Common/APRSWriter.cpp +++ b/Common/APRSWriter.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2014,2018 by Jonathan Naylor G4KLX + * Copyright (C) 2010-2014,2018,2020 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 @@ -284,6 +284,8 @@ void CAPRSWriter::clock(unsigned int ms) { m_idTimer.clock(ms); + m_thread->clock(ms); + if (m_socket != NULL) { if (m_idTimer.hasExpired()) { pollGPS(); diff --git a/Common/APRSWriterThread.cpp b/Common/APRSWriterThread.cpp index 1f9bb98..84112b3 100644 --- a/Common/APRSWriterThread.cpp +++ b/Common/APRSWriterThread.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2014,2018 by Jonathan Naylor G4KLX + * Copyright (C) 2010-2014,2018,2020 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 @@ -34,6 +34,8 @@ m_socket(hostname, port, address), m_queue(20U), m_exit(false), m_connected(false), +m_reconnectTimer(1000U), +m_tries(0U), m_APRSReadCallback(NULL), m_filter(wxT("")), m_clientName(wxT("ircDDBGateway")) @@ -59,6 +61,8 @@ m_socket(hostname, port, address), m_queue(20U), m_exit(false), m_connected(false), +m_reconnectTimer(1000U), +m_tries(0U), m_APRSReadCallback(NULL), m_filter(filter), m_clientName(clientName) @@ -94,19 +98,28 @@ void* CAPRSWriterThread::Entry() wxLogMessage(wxT("Starting the APRS Writer thread")); m_connected = connect(); + if (!m_connected) { + wxLogError(wxT("Connect attempt to the APRS server has failed")); + startReconnectionTimer(); + } try { while (!m_exit) { if (!m_connected) { - m_connected = connect(); + if (m_reconnectTimer.isRunning() && m_reconnectTimer.hasExpired()) { + m_reconnectTimer.stop(); - if (!m_connected){ - wxLogError(wxT("Reconnect attempt to the APRS server has failed")); - Sleep(10000UL); // 10 secs + m_connected = connect(); + if (!m_connected) { + wxLogError(wxT("Reconnect attempt to the APRS server has failed")); + startReconnectionTimer(); + } } } if (m_connected) { + m_tries = 0U; + if(!m_queue.isEmpty()){ char* p = m_queue.getData(); @@ -120,6 +133,7 @@ void* CAPRSWriterThread::Entry() m_connected = false; m_socket.close(); wxLogError(wxT("Connection to the APRS thread has failed")); + startReconnectionTimer(); } delete[] p; @@ -135,6 +149,7 @@ void* CAPRSWriterThread::Entry() m_connected = false; m_socket.close(); wxLogError(wxT("Error when reading from the APRS server")); + startReconnectionTimer(); } if(length > 0 && line.GetChar(0) != '#'//check if we have something and if that something is an APRS frame @@ -201,6 +216,11 @@ void CAPRSWriterThread::stop() Wait(); } +void CAPRSWriterThread::clock(unsigned int ms) +{ + m_reconnectTimer.clock(ms); +} + bool CAPRSWriterThread::connect() { bool ret = m_socket.open(); @@ -248,3 +268,14 @@ bool CAPRSWriterThread::connect() return true; } + +void CAPRSWriterThread::startReconnectionTimer() +{ + // Clamp at a ten minutes reconnect time + m_tries++; + if (m_tries > 10U) + m_tries = 10U; + + m_reconnectTimer.setTimeout(m_tries * 60U); + m_reconnectTimer.start(); +} diff --git a/Common/APRSWriterThread.h b/Common/APRSWriterThread.h index cdac160..f93e35b 100644 --- a/Common/APRSWriterThread.h +++ b/Common/APRSWriterThread.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010,2011,2012,2018 by Jonathan Naylor G4KLX + * Copyright (C) 2010,2011,2012,2018,2020 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 @@ -21,6 +21,7 @@ #include "TCPReaderWriterClient.h" #include "RingBuffer.h" +#include "Timer.h" #include typedef void (*ReadAPRSFrameCallback)(const wxString&); @@ -41,6 +42,8 @@ public: virtual void stop(); + void clock(unsigned int ms); + void setReadAPRSCallback(ReadAPRSFrameCallback cb); private: @@ -51,11 +54,14 @@ private: CRingBuffer m_queue; bool m_exit; bool m_connected; + CTimer m_reconnectTimer; + unsigned int m_tries; ReadAPRSFrameCallback m_APRSReadCallback; wxString m_filter; wxString m_clientName; bool connect(); + void startReconnectionTimer(); }; #endif From 44a58d74c63190c6f6bf4115bead9e4f4ac91b13 Mon Sep 17 00:00:00 2001 From: Adam Kolakowski Date: Wed, 27 May 2020 22:24:26 +0200 Subject: [PATCH 153/166] Adds console logging option to ircddbgatewayd When invoked with the `-foreground` parameter, ircddbgatewayd will print all logs to the console (stdout/stderr) instead of log files. This allows ircddbgatewayd to be run in a container or as a systemd standard service where applications are expected to provide logs on standard output / standard error. --- Common/Common.vcxproj.filters | 6 +++ Common/ConsoleLogger.cpp | 48 ++++++++++++++++++++++++ Common/ConsoleLogger.h | 41 +++++++++++++++++++++ Common/Makefile | 2 +- ircDDBGateway/IRCDDBGatewayAppD.cpp | 57 ++++++++++++++++++++--------- ircDDBGateway/IRCDDBGatewayAppD.h | 4 +- 6 files changed, 138 insertions(+), 20 deletions(-) create mode 100644 Common/ConsoleLogger.cpp create mode 100644 Common/ConsoleLogger.h diff --git a/Common/Common.vcxproj.filters b/Common/Common.vcxproj.filters index 82574fb..441f132 100644 --- a/Common/Common.vcxproj.filters +++ b/Common/Common.vcxproj.filters @@ -53,6 +53,9 @@ Source Files + + Source Files + Source Files @@ -259,6 +262,9 @@ Header Files + + Header Files + Header Files diff --git a/Common/ConsoleLogger.cpp b/Common/ConsoleLogger.cpp new file mode 100644 index 0000000..acd4269 --- /dev/null +++ b/Common/ConsoleLogger.cpp @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2002,2003,2009,2011,2012,2019 by Jonathan Naylor G4KLX + * Copyright (C) 2020 by Adam Kolakowski SQ7LRX + * + * 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 + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include "ConsoleLogger.h" + +const char CConsoleLogger::S_LEVELS[] = "FEWMMIDTPU"; + +CConsoleLogger::CConsoleLogger() : +wxLog(), +m_stdout(new wxMessageOutputStderr(stdout)), +m_stderr(new wxMessageOutputStderr(stderr)) +{ +} + +CConsoleLogger::~CConsoleLogger() +{ +} + +void CConsoleLogger::DoLogRecord(wxLogLevel level, const wxString& msg, const wxLogRecordInfo& info) +{ + if (level > 9) + level = 9; + + if (level <= wxLOG_Error) { + m_stderr->Printf(wxT("%c: %s\n"), CConsoleLogger::S_LEVELS[level], msg.c_str()); + } else { + m_stdout->Printf(wxT("%c: %s\n"), CConsoleLogger::S_LEVELS[level], msg.c_str()); + } + + if (level == wxLOG_FatalError) + ::abort(); +} diff --git a/Common/ConsoleLogger.h b/Common/ConsoleLogger.h new file mode 100644 index 0000000..b040bf9 --- /dev/null +++ b/Common/ConsoleLogger.h @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2002,2003,2009,2011,2012,2019 by Jonathan Naylor G4KLX + * Copyright (C) 2020 by Adam Kolakowski SQ7LRX + * + * 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 + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef ConsoleLogger_H +#define ConsoleLogger_H + +#include + + +class CConsoleLogger : public wxLog { +public: + CConsoleLogger(); + virtual ~CConsoleLogger(); + + virtual void DoLogRecord(wxLogLevel level, const wxString& msg, const wxLogRecordInfo& info); + +private: + const static char S_LEVELS[]; + + wxMessageOutput *m_stdout; + wxMessageOutput *m_stderr; +}; + +#endif + diff --git a/Common/Makefile b/Common/Makefile index e215ea2..e403ae5 100644 --- a/Common/Makefile +++ b/Common/Makefile @@ -1,5 +1,5 @@ OBJECTS = AMBEData.o AnnouncementUnit.o APRSCollector.o APRSWriter.o APRSWriterThread.o AudioUnit.o CacheManager.o CallsignList.o \ - CallsignServer.o CCITTChecksum.o CCSData.o CCSHandler.o CCSProtocolHandler.o ConnectData.o DCSHandler.o DCSProtocolHandler.o \ + CallsignServer.o CCITTChecksum.o CCSData.o CCSHandler.o CCSProtocolHandler.o ConnectData.o ConsoleLogger.o DCSHandler.o DCSProtocolHandler.o \ DCSProtocolHandlerPool.o DDData.o DDHandler.o DExtraHandler.o DExtraProtocolHandler.o DExtraProtocolHandlerPool.o \ DPlusAuthenticator.o DPlusHandler.o DPlusProtocolHandler.o DPlusProtocolHandlerPool.o DRATSServer.o DTMF.o \ DummyRepeaterProtocolHandler.o DVTOOLFileReader.o EchoUnit.o G2Handler.o G2ProtocolHandler.o GatewayCache.o \ diff --git a/ircDDBGateway/IRCDDBGatewayAppD.cpp b/ircDDBGateway/IRCDDBGatewayAppD.cpp index 4ea6d25..ce6ed87 100644 --- a/ircDDBGateway/IRCDDBGatewayAppD.cpp +++ b/ircDDBGateway/IRCDDBGatewayAppD.cpp @@ -26,6 +26,7 @@ #include "APRSWriter.h" #include "Version.h" #include "Logger.h" +#include "ConsoleLogger.h" #include "IRCDDB.h" #include "IRCDDBClient.h" #include "IRCDDBMultiClient.h" @@ -48,6 +49,7 @@ const wxChar* DEBUG_SWITCH = wxT("debug"); const wxChar* LOGDIR_OPTION = wxT("logdir"); const wxChar* CONFDIR_OPTION = wxT("confdir"); const wxChar* DAEMON_SWITCH = wxT("daemon"); +const wxChar* FGROUND_SWITCH = wxT("foreground"); const wxString LOG_BASE_NAME = wxT("ircDDBGateway"); @@ -70,6 +72,7 @@ int main(int argc, char** argv) parser.AddSwitch(NOLOGGING_SWITCH, wxEmptyString, wxEmptyString, wxCMD_LINE_PARAM_OPTIONAL); parser.AddSwitch(DEBUG_SWITCH, wxEmptyString, wxEmptyString, wxCMD_LINE_PARAM_OPTIONAL); parser.AddSwitch(DAEMON_SWITCH, wxEmptyString, wxEmptyString, wxCMD_LINE_PARAM_OPTIONAL); + parser.AddSwitch(FGROUND_SWITCH, wxEmptyString, wxEmptyString, wxCMD_LINE_PARAM_OPTIONAL); parser.AddOption(LOGDIR_OPTION, wxEmptyString, wxEmptyString, wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL); parser.AddOption(CONFDIR_OPTION, wxEmptyString, wxEmptyString, wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL); parser.AddParam(NAME_PARAM, wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL); @@ -80,9 +83,10 @@ int main(int argc, char** argv) return 0; } - bool nolog = parser.Found(NOLOGGING_SWITCH); - bool debug = parser.Found(DEBUG_SWITCH); - bool daemon = parser.Found(DAEMON_SWITCH); + bool nolog = parser.Found(NOLOGGING_SWITCH); + bool debug = parser.Found(DEBUG_SWITCH); + bool daemon = parser.Found(DAEMON_SWITCH); + bool foreground = parser.Found(FGROUND_SWITCH); wxString logDir; bool found = parser.Found(LOGDIR_OPTION, &logDir); @@ -98,6 +102,12 @@ int main(int argc, char** argv) if (parser.GetParamCount() > 0U) name = parser.GetParam(0U); + if (daemon && foreground) { + ::fprintf(stderr, "ircddbgatewayd: -daemon and -foreground are mutually exclusive, exiting\n"); + ::wxUninitialize(); + return 1; + } + if (daemon) { pid_t pid = ::fork(); @@ -138,7 +148,7 @@ int main(int argc, char** argv) ::fclose(fp); } - m_gateway = new CIRCDDBGatewayAppD(nolog, debug, logDir, confDir, name); + m_gateway = new CIRCDDBGatewayAppD(nolog, debug, foreground, logDir, confDir, name); if (!m_gateway->init()) { ::wxUninitialize(); return 1; @@ -157,10 +167,11 @@ int main(int argc, char** argv) return 0; } -CIRCDDBGatewayAppD::CIRCDDBGatewayAppD(bool nolog, bool debug, const wxString& logDir, const wxString& confDir, const wxString& name) : +CIRCDDBGatewayAppD::CIRCDDBGatewayAppD(bool nolog, bool debug, bool foreground, const wxString& logDir, const wxString& confDir, const wxString& name) : m_name(name), m_nolog(nolog), m_debug(debug), +m_foreground(foreground), m_logDir(logDir), m_confDir(confDir), m_thread(NULL), @@ -174,7 +185,9 @@ CIRCDDBGatewayAppD::~CIRCDDBGatewayAppD() bool CIRCDDBGatewayAppD::init() { - if (!m_nolog) { + if (m_foreground) { + initLogging(new CConsoleLogger()); + } else if (!m_nolog) { wxString logBaseName = LOG_BASE_NAME; if (!m_name.IsEmpty()) { logBaseName.Append(wxT("_")); @@ -184,16 +197,7 @@ bool CIRCDDBGatewayAppD::init() if (m_logDir.IsEmpty()) m_logDir = wxT(LOG_DIR); - wxLog* log = new CLogger(m_logDir, logBaseName); - wxLog::SetActiveTarget(log); - - if (m_debug) { - wxLog::SetVerbose(true); - wxLog::SetLogLevel(wxLOG_Debug); - } else { - wxLog::SetVerbose(false); - wxLog::SetLogLevel(wxLOG_Message); - } + initLogging(new CLogger(m_logDir, logBaseName)); } else { new wxLogNull; } @@ -212,14 +216,31 @@ bool CIRCDDBGatewayAppD::init() return false; } - wxLogInfo(wxT("Starting ") + APPLICATION_NAME + wxT(" daemon - ") + VERSION); + wxLogMessage(wxT("Starting ") + APPLICATION_NAME + wxT(" daemon - ") + VERSION); // Log the version of wxWidgets and the Operating System wxLogInfo(wxT("Using wxWidgets %d.%d.%d on %s"), wxMAJOR_VERSION, wxMINOR_VERSION, wxRELEASE_NUMBER, ::wxGetOsDescription().c_str()); + if (!m_nolog && m_foreground) { + wxLogWarning(wxT("Running in foreground, logging to file disabled. Use -nolog when running this application in foreground to suppress this ")); + } + return createThread(); } +void CIRCDDBGatewayAppD::initLogging(wxLog *logger) +{ + wxLog::SetActiveTarget(logger); + + if (m_debug) { + wxLog::SetVerbose(true); + wxLog::SetLogLevel(wxLOG_Debug); + } else { + wxLog::SetVerbose(false); + wxLog::SetLogLevel(wxLOG_Message); + } +} + void CIRCDDBGatewayAppD::run() { m_thread->run(); @@ -878,7 +899,7 @@ bool CIRCDDBGatewayAppD::createThread() bool xlxEnabled; wxString xlxHostsFileUrl; config.getXLX(xlxEnabled, xlxHostsFileUrl); - wxLogInfo(wxT("XLX enabled: %d, Override Local %d, Hosts file url: %s"), int(xlxEnabled), xlxHostsFileUrl.c_str()); + wxLogInfo(wxT("XLX enabled: %d, Hosts file url: %s"), int(xlxEnabled), xlxHostsFileUrl.c_str()); if (repeaterBand1.Len() > 1U || repeaterBand2.Len() > 1U || repeaterBand3.Len() > 1U || repeaterBand4.Len() > 1U) { diff --git a/ircDDBGateway/IRCDDBGatewayAppD.h b/ircDDBGateway/IRCDDBGatewayAppD.h index 5fd1d40..359d975 100644 --- a/ircDDBGateway/IRCDDBGatewayAppD.h +++ b/ircDDBGateway/IRCDDBGatewayAppD.h @@ -28,7 +28,7 @@ class CIRCDDBGatewayAppD { public: - CIRCDDBGatewayAppD(bool nolog, bool debug, const wxString& logDir, const wxString& confDir, const wxString& name); + CIRCDDBGatewayAppD(bool nolog, bool debug, bool foreground, const wxString& logDir, const wxString& confDir, const wxString& name); ~CIRCDDBGatewayAppD(); bool init(); @@ -41,12 +41,14 @@ private: wxString m_name; bool m_nolog; bool m_debug; + bool m_foreground; wxString m_logDir; wxString m_confDir; CIRCDDBGatewayThread* m_thread; wxSingleInstanceChecker* m_checker; bool createThread(); + void initLogging(wxLog *logger); }; #endif From 9dc023d9479eb77bbf27abcf2ae774348906c391 Mon Sep 17 00:00:00 2001 From: Adam Kolakowski Date: Thu, 28 May 2020 21:13:16 +0200 Subject: [PATCH 154/166] Adds BUILD make variable for debug/release builds Introduces a `BUILD` make parameter to allow for building both debug and release variants from the same Makefile. This also makes the Makefile-defined preprocessor macros more in line with those from Visual Studio build. Minor changes: * allows for overwriting LOGDIR, CONFDIR, BINDIR and DATADIR from command line (make parameter) * converts BUILD to Markdown for better visibility on Github * improves Linux build instructions in BUILD.md --- BUILD.txt => BUILD.md | 47 ++++++++++++++++++++++++++++++++++--------- Makefile | 24 ++++++++++++++-------- 2 files changed, 54 insertions(+), 17 deletions(-) rename BUILD.txt => BUILD.md (68%) diff --git a/BUILD.txt b/BUILD.md similarity index 68% rename from BUILD.txt rename to BUILD.md index 0a29863..6d22507 100644 --- a/BUILD.txt +++ b/BUILD.md @@ -1,8 +1,6 @@ -ircDDB Gateway - 20180627 -========================= +# Building ircDDBGateway -Windows -------- +## Windows To use the ircDDB Gateway software you will first need to build the latest version of wxWidgets (http://www.wxwidgets.org), the version I used was 3.0.4. @@ -39,12 +37,19 @@ on the same machine as the development/compilation was done on. You can find the latest versions at https://support.microsoft.com/en-gb/help/2977003/the-latest-supported-visual-c-downloads -Linux ------ +## Linux -You need to ensure that wxGTK is already installed on your machine, under -Ubuntu these are available from the standard repositories, the version of -wxWidgets is adequate. +You need to ensure that wxGTK is already installed on your machine. + +Debian, Ubuntu: +```sh +sudo apt install libwxgtk3.0-dev +``` + +Fedora, CentOS, RedHat: +```sh +sudo dnf install wxGTK3-devel +``` To install them from scratch, you need to get wxGTK from . If you do a "make install" on it then they'll @@ -53,3 +58,27 @@ be installed in the right places and nothing more needs to be done. To actually build the software, type "make" in the same directory as this file and all should build without errors, there may be a warning or two though. Once compiled log in as root or use the sudo command, and do "make install". + +You can optionally specify some make variables to alter the default behavior: + +| Parameter | Default | Description | +| --------- | --------- | --------------------------------- | +| BUILD | `debug` | `debug` or `release` | +| TARGET | _not set_ | when set to `opendv`, installs files in legacy locations | +| DATADIR | `/usr/share/ircddbgateway` | where AMBE voice and host lists are kept | +| LOGDIR | `/var/log` | location of log files | +| CONFDIR | `/etc` | location of configuration files | +| BINDIR | `/usr/bin` | program binaries installed here | + +### Example + +```sh +cd ircDDBGateway +make -j4 BUILD=release CONFDIR=/etc/dstar +sudo make install +``` + +This would build and install all the programs in this repo using 4 threads +(parallel build jobs), in release mode (no debug symbols) with a modified +configuration directory. + diff --git a/Makefile b/Makefile index 634093f..1f8f13c 100644 --- a/Makefile +++ b/Makefile @@ -1,20 +1,28 @@ +export BUILD?=debug ifeq ($(TARGET), opendv) -export DATADIR := "/usr/share/opendv" -export LOGDIR := "/var/log/opendv" -export CONFDIR := "/etc" -export BINDIR := "/usr/sbin" +export DATADIR ?= "/usr/share/opendv" +export LOGDIR ?= "/var/log/opendv" +export CONFDIR ?= "/etc" +export BINDIR ?= "/usr/sbin" else -export DATADIR := "/usr/share/ircddbgateway" -export LOGDIR := "/var/log" -export CONFDIR := "/etc" -export BINDIR := "/usr/bin" +export DATADIR ?= "/usr/share/ircddbgateway" +export LOGDIR ?= "/var/log" +export CONFDIR ?= "/etc" +export BINDIR ?= "/usr/bin" endif # Add -DDCS_LINK to the end of the CFLAGS line below to add DCS linking to StarNet # Add -DDEXTRA_LINK to the end of the CFLAGS line below to add DExtra linking to StarNet +DEBUGFLAGS := -g -D_DEBUG +RELEASEFLAGS := -DNDEBUG -DwxDEBUG_LEVEL=0 export CXX := $(shell wx-config --cxx) export CFLAGS := -O2 -Wall $(shell wx-config --cxxflags) -DLOG_DIR='$(LOGDIR)' -DCONF_DIR='$(CONFDIR)' -DDATA_DIR='$(DATADIR)' +ifeq ($(BUILD), debug) + export CFLAGS := $(CFLAGS) $(DEBUGFLAGS) +else ($(BUILD), release) + export CFLAGS := $(CFLAGS) $(RELEASEFLAGS) +endif export GUILIBS := $(shell wx-config --libs adv,core,base) export LIBS := $(shell wx-config --libs base,net) export LDFLAGS := From 41e01d4f34bb7eac9d3cba801c5f636d35e07806 Mon Sep 17 00:00:00 2001 From: Adam Kolakowski Date: Thu, 28 May 2020 23:13:19 +0200 Subject: [PATCH 155/166] Adds DESTDIR build variable Setting DESTDIR on `make install` allows for installing artefacts in staging location for automated build, packaging etc. --- APRSTransmit/Makefile | 2 +- BUILD.md | 1 + Data/Makefile | 70 ++++++++++++++++++------------------ Makefile | 26 ++++++++------ RemoteControl/Makefile | 2 +- StarNetServer/Makefile | 2 +- TextTransmit/Makefile | 2 +- TimeServer/Makefile | 2 +- TimerControl/Makefile | 2 +- VoiceTransmit/Makefile | 2 +- ircDDBGateway/Makefile | 6 ++-- ircDDBGatewayConfig/Makefile | 2 +- 12 files changed, 62 insertions(+), 57 deletions(-) diff --git a/APRSTransmit/Makefile b/APRSTransmit/Makefile index 17e82b4..c6d50c8 100644 --- a/APRSTransmit/Makefile +++ b/APRSTransmit/Makefile @@ -14,7 +14,7 @@ aprstransmitd: $(OBJECTS) ../Common/Common.a .PHONY: install install: - install -g bin -o root -m 0775 aprstransmitd $(BINDIR) + install -g root -o root -m 0755 aprstransmitd $(DESTDIR)$(BINDIR) .PHONY: clean clean: diff --git a/BUILD.md b/BUILD.md index 6d22507..a3b8623 100644 --- a/BUILD.md +++ b/BUILD.md @@ -69,6 +69,7 @@ You can optionally specify some make variables to alter the default behavior: | LOGDIR | `/var/log` | location of log files | | CONFDIR | `/etc` | location of configuration files | | BINDIR | `/usr/bin` | program binaries installed here | +| DESTDIR | _not set_ | destination for staged build | ### Example diff --git a/Data/Makefile b/Data/Makefile index c115445..7af396d 100644 --- a/Data/Makefile +++ b/Data/Makefile @@ -1,37 +1,37 @@ .PHONY: install install: - install -d -g bin -o root -m 0775 $(DATADIR) - install -g bin -o root -m 0664 CCS_Hosts.txt $(DATADIR) - install -g bin -o root -m 0664 DCS_Hosts.txt $(DATADIR) - install -g bin -o root -m 0664 DExtra_Hosts.txt $(DATADIR) - install -g bin -o root -m 0664 DPlus_Hosts.txt $(DATADIR) - install -g bin -o root -m 0664 TIME_de_DE.ambe $(DATADIR) - install -g bin -o root -m 0664 TIME_de_DE.indx $(DATADIR) - install -g bin -o root -m 0664 TIME_en_GB.ambe $(DATADIR) - install -g bin -o root -m 0664 TIME_en_GB.indx $(DATADIR) - install -g bin -o root -m 0664 TIME_en_US.ambe $(DATADIR) - install -g bin -o root -m 0664 TIME_en_US.indx $(DATADIR) - install -g bin -o root -m 0664 TIME_fr_FR.ambe $(DATADIR) - install -g bin -o root -m 0664 TIME_fr_FR.indx $(DATADIR) - install -g bin -o root -m 0664 TIME_se_SE.ambe $(DATADIR) - install -g bin -o root -m 0664 TIME_se_SE.indx $(DATADIR) - install -g bin -o root -m 0664 de_DE.ambe $(DATADIR) - install -g bin -o root -m 0664 de_DE.indx $(DATADIR) - install -g bin -o root -m 0664 dk_DK.ambe $(DATADIR) - install -g bin -o root -m 0664 dk_DK.indx $(DATADIR) - install -g bin -o root -m 0664 en_GB.ambe $(DATADIR) - install -g bin -o root -m 0664 en_GB.indx $(DATADIR) - install -g bin -o root -m 0664 en_US.ambe $(DATADIR) - install -g bin -o root -m 0664 en_US.indx $(DATADIR) - install -g bin -o root -m 0664 es_ES.ambe $(DATADIR) - install -g bin -o root -m 0664 es_ES.indx $(DATADIR) - install -g bin -o root -m 0664 fr_FR.ambe $(DATADIR) - install -g bin -o root -m 0664 fr_FR.indx $(DATADIR) - install -g bin -o root -m 0664 it_IT.ambe $(DATADIR) - install -g bin -o root -m 0664 it_IT.indx $(DATADIR) - install -g bin -o root -m 0664 no_NO.ambe $(DATADIR) - install -g bin -o root -m 0664 no_NO.indx $(DATADIR) - install -g bin -o root -m 0664 pl_PL.ambe $(DATADIR) - install -g bin -o root -m 0664 pl_PL.indx $(DATADIR) - install -g bin -o root -m 0664 se_SE.ambe $(DATADIR) - install -g bin -o root -m 0664 se_SE.indx $(DATADIR) + install -d -g root -o root -m 0755 $(DESTDIR)$(DATADIR) + install -g root -o root -m 0644 CCS_Hosts.txt $(DESTDIR)$(DATADIR) + install -g root -o root -m 0644 DCS_Hosts.txt $(DESTDIR)$(DATADIR) + install -g root -o root -m 0644 DExtra_Hosts.txt $(DESTDIR)$(DATADIR) + install -g root -o root -m 0644 DPlus_Hosts.txt $(DESTDIR)$(DATADIR) + install -g root -o root -m 0644 TIME_de_DE.ambe $(DESTDIR)$(DATADIR) + install -g root -o root -m 0644 TIME_de_DE.indx $(DESTDIR)$(DATADIR) + install -g root -o root -m 0644 TIME_en_GB.ambe $(DESTDIR)$(DATADIR) + install -g root -o root -m 0644 TIME_en_GB.indx $(DESTDIR)$(DATADIR) + install -g root -o root -m 0644 TIME_en_US.ambe $(DESTDIR)$(DATADIR) + install -g root -o root -m 0644 TIME_en_US.indx $(DESTDIR)$(DATADIR) + install -g root -o root -m 0644 TIME_fr_FR.ambe $(DESTDIR)$(DATADIR) + install -g root -o root -m 0644 TIME_fr_FR.indx $(DESTDIR)$(DATADIR) + install -g root -o root -m 0644 TIME_se_SE.ambe $(DESTDIR)$(DATADIR) + install -g root -o root -m 0644 TIME_se_SE.indx $(DESTDIR)$(DATADIR) + install -g root -o root -m 0644 de_DE.ambe $(DESTDIR)$(DATADIR) + install -g root -o root -m 0644 de_DE.indx $(DESTDIR)$(DATADIR) + install -g root -o root -m 0644 dk_DK.ambe $(DESTDIR)$(DATADIR) + install -g root -o root -m 0644 dk_DK.indx $(DESTDIR)$(DATADIR) + install -g root -o root -m 0644 en_GB.ambe $(DESTDIR)$(DATADIR) + install -g root -o root -m 0644 en_GB.indx $(DESTDIR)$(DATADIR) + install -g root -o root -m 0644 en_US.ambe $(DESTDIR)$(DATADIR) + install -g root -o root -m 0644 en_US.indx $(DESTDIR)$(DATADIR) + install -g root -o root -m 0644 es_ES.ambe $(DESTDIR)$(DATADIR) + install -g root -o root -m 0644 es_ES.indx $(DESTDIR)$(DATADIR) + install -g root -o root -m 0644 fr_FR.ambe $(DESTDIR)$(DATADIR) + install -g root -o root -m 0644 fr_FR.indx $(DESTDIR)$(DATADIR) + install -g root -o root -m 0644 it_IT.ambe $(DESTDIR)$(DATADIR) + install -g root -o root -m 0644 it_IT.indx $(DESTDIR)$(DATADIR) + install -g root -o root -m 0644 no_NO.ambe $(DESTDIR)$(DATADIR) + install -g root -o root -m 0644 no_NO.indx $(DESTDIR)$(DATADIR) + install -g root -o root -m 0644 pl_PL.ambe $(DESTDIR)$(DATADIR) + install -g root -o root -m 0644 pl_PL.indx $(DESTDIR)$(DATADIR) + install -g root -o root -m 0644 se_SE.ambe $(DESTDIR)$(DATADIR) + install -g root -o root -m 0644 se_SE.indx $(DESTDIR)$(DATADIR) diff --git a/Makefile b/Makefile index 1f8f13c..53d5d84 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,14 @@ -export BUILD?=debug +export BUILD ?= debug ifeq ($(TARGET), opendv) -export DATADIR ?= "/usr/share/opendv" -export LOGDIR ?= "/var/log/opendv" -export CONFDIR ?= "/etc" -export BINDIR ?= "/usr/sbin" +export DATADIR ?= /usr/share/opendv +export LOGDIR ?= /var/log/opendv +export CONFDIR ?= /etc +export BINDIR ?= /usr/sbin else -export DATADIR ?= "/usr/share/ircddbgateway" -export LOGDIR ?= "/var/log" -export CONFDIR ?= "/etc" -export BINDIR ?= "/usr/bin" +export DATADIR ?= /usr/share/ircddbgateway +export LOGDIR ?= /var/log +export CONFDIR ?= /etc +export BINDIR ?= /usr/bin endif # Add -DDCS_LINK to the end of the CFLAGS line below to add DCS linking to StarNet @@ -20,7 +20,7 @@ export CXX := $(shell wx-config --cxx) export CFLAGS := -O2 -Wall $(shell wx-config --cxxflags) -DLOG_DIR='$(LOGDIR)' -DCONF_DIR='$(CONFDIR)' -DDATA_DIR='$(DATADIR)' ifeq ($(BUILD), debug) export CFLAGS := $(CFLAGS) $(DEBUGFLAGS) -else ($(BUILD), release) +else ifeq ($(BUILD), release) export CFLAGS := $(CFLAGS) $(RELEASEFLAGS) endif export GUILIBS := $(shell wx-config --libs adv,core,base) @@ -67,8 +67,12 @@ Common/Common.a: force ircDDB/IRCDDB.a: force $(MAKE) -C ircDDB +.PHONY: installdirs +installdirs: force + /bin/mkdir -p $(DESTDIR)$(DATADIR) $(DESTDIR)$(LOGDIR) $(DESTDIR)$(CONFDIR) $(DESTDIR)$(BINDIR) + .PHONY: install -install: all +install: all installdirs ifeq ($(TARGET), opendv) useradd --user-group -M --system opendv --shell /bin/false || true diff --git a/RemoteControl/Makefile b/RemoteControl/Makefile index a4c399a..f5382c2 100644 --- a/RemoteControl/Makefile +++ b/RemoteControl/Makefile @@ -15,7 +15,7 @@ remotecontrold: $(OBJECTS) ../Common/Common.a .PHONY: install install: - install -g bin -o root -m 0775 remotecontrold $(BINDIR) + install -g root -o root -m 0755 remotecontrold $(DESTDIR)$(BINDIR) .PHONY: clean clean: diff --git a/StarNetServer/Makefile b/StarNetServer/Makefile index a08a3b6..a12de40 100644 --- a/StarNetServer/Makefile +++ b/StarNetServer/Makefile @@ -14,7 +14,7 @@ starnetserverd: $(OBJECTS) ../Common/Common.a ../ircDDB/IRCDDB.a .PHONY: install install: - install -g bin -o root -m 0775 starnetserverd $(BINDIR) + install -g root -o root -m 0755 starnetserverd $(DESTDIR)$(BINDIR) .PHONY: clean clean: diff --git a/TextTransmit/Makefile b/TextTransmit/Makefile index a059e2e..c1212cb 100644 --- a/TextTransmit/Makefile +++ b/TextTransmit/Makefile @@ -14,7 +14,7 @@ texttransmitd: $(OBJECTS) ../Common/Common.a .PHONY: install install: - install -g bin -o root -m 0775 texttransmitd $(BINDIR) + install -g root -o root -m 0755 texttransmitd $(DESTDIR)$(BINDIR) .PHONY: clean clean: diff --git a/TimeServer/Makefile b/TimeServer/Makefile index eca5c6a..d5f5a74 100644 --- a/TimeServer/Makefile +++ b/TimeServer/Makefile @@ -14,7 +14,7 @@ timeserverd: $(OBJECTS) ../Common/Common.a .PHONY: install install: - install -g bin -o root -m 0775 timeserverd $(BINDIR) + install -g root -o root -m 0755 timeserverd $(DESTDIR)$(BINDIR) .PHONY: clean clean: diff --git a/TimerControl/Makefile b/TimerControl/Makefile index 823e32c..9cd2b99 100644 --- a/TimerControl/Makefile +++ b/TimerControl/Makefile @@ -15,7 +15,7 @@ timercontrold: $(OBJECTS) ../Common/Common.a .PHONY: install install: - install -g bin -o root -m 0775 timercontrold $(BINDIR) + install -g root -o root -m 0755 timercontrold $(DESTDIR)$(BINDIR) .PHONY: clean clean: diff --git a/VoiceTransmit/Makefile b/VoiceTransmit/Makefile index a81f4be..0733fc6 100644 --- a/VoiceTransmit/Makefile +++ b/VoiceTransmit/Makefile @@ -14,7 +14,7 @@ voicetransmitd: $(OBJECTS) ../Common/Common.a .PHONY: install install: - install -g bin -o root -m 0775 voicetransmitd $(BINDIR) + install -g root -o root -m 0755 voicetransmitd $(DESTDIR)$(BINDIR) .PHONY: clean clean: diff --git a/ircDDBGateway/Makefile b/ircDDBGateway/Makefile index 73efe6a..6118f46 100644 --- a/ircDDBGateway/Makefile +++ b/ircDDBGateway/Makefile @@ -14,10 +14,10 @@ ircddbgatewayd: $(OBJECTS) ../ircDDB/IRCDDB.a ../Common/Common.a .PHONY: install install: - install -g bin -o root -m 0775 ircddbgatewayd $(BINDIR) - cp ircddbgateway-emptyconfig $(CONFDIR)/ircddbgateway + install -g root -o root -m 0755 ircddbgatewayd $(DESTDIR)$(BINDIR) + cp ircddbgateway-emptyconfig $(DESTDIR)$(CONFDIR)/ircddbgateway ifeq ($(TARGET), opendv) - cp ../debian/ircddbgatewayd.ircddbgatewayd.service /lib/systemd/system/ircddbgatewayd.service + cp ../debian/ircddbgatewayd.ircddbgatewayd.service $(DESTDIR)/etc/systemd/system/ircddbgatewayd.service endif .PHONY: clean diff --git a/ircDDBGatewayConfig/Makefile b/ircDDBGatewayConfig/Makefile index 7aff717..3bff41c 100644 --- a/ircDDBGatewayConfig/Makefile +++ b/ircDDBGatewayConfig/Makefile @@ -15,7 +15,7 @@ ircddbgatewayconfig: $(OBJECTS) ../GUICommon/GUICommon.a ../Common/Common.a .PHONY: install install: - install -g bin -o root -m 0775 ircddbgatewayconfig $(BINDIR) + install -g root -o root -m 0755 ircddbgatewayconfig $(DESTDIR)$(BINDIR) .PHONY: clean clean: From 5769416fbe86aa670e741ce23bd7422c4cd3d50c Mon Sep 17 00:00:00 2001 From: Christoph Kottke Date: Fri, 29 May 2020 07:30:45 +0200 Subject: [PATCH 156/166] update for PR #53 - the quotes need to preserve, i think compile tested on x86_64 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 53d5d84..58ba78d 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ endif DEBUGFLAGS := -g -D_DEBUG RELEASEFLAGS := -DNDEBUG -DwxDEBUG_LEVEL=0 export CXX := $(shell wx-config --cxx) -export CFLAGS := -O2 -Wall $(shell wx-config --cxxflags) -DLOG_DIR='$(LOGDIR)' -DCONF_DIR='$(CONFDIR)' -DDATA_DIR='$(DATADIR)' +export CFLAGS := -O2 -Wall $(shell wx-config --cxxflags) -DLOG_DIR='"$(LOGDIR)"' -DCONF_DIR='"$(CONFDIR)"' -DDATA_DIR='"$(DATADIR)"' ifeq ($(BUILD), debug) export CFLAGS := $(CFLAGS) $(DEBUGFLAGS) else ifeq ($(BUILD), release) From ae842aad077fd1b0a7e284707c9b6c3a2ad9a893 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Mon, 1 Jun 2020 13:57:10 +0100 Subject: [PATCH 157/166] Use the new APRSGateway for APRS data. --- Common/APRSWriter.cpp | 92 +++--- Common/APRSWriter.h | 17 +- Common/APRSWriterThread.cpp | 281 ------------------ Common/APRSWriterThread.h | 67 ----- Common/Common.vcxproj | 2 - Common/Common.vcxproj.filters | 6 - Common/IRCDDBGatewayConfig.cpp | 54 ++-- Common/IRCDDBGatewayConfig.h | 9 +- Common/Makefile | 2 +- Common/Version.h | 6 +- GUICommon/DPRSSet.cpp | 38 +-- GUICommon/DPRSSet.h | 10 +- Makefile | 2 +- MakefileGUI | 2 +- ircDDBGateway/IRCDDBGatewayApp.cpp | 12 +- ircDDBGateway/IRCDDBGatewayAppD.cpp | 12 +- ircDDBGateway/IRCDDBGatewayFrame.cpp | 4 +- ircDDBGateway/IRCDDBGatewayThread.cpp | 4 +- .../IRCDDBGatewayConfigFrame.cpp | 15 +- 19 files changed, 110 insertions(+), 525 deletions(-) delete mode 100644 Common/APRSWriterThread.cpp delete mode 100644 Common/APRSWriterThread.h diff --git a/Common/APRSWriter.cpp b/Common/APRSWriter.cpp index 28cab71..cd942ee 100644 --- a/Common/APRSWriter.cpp +++ b/Common/APRSWriter.cpp @@ -118,25 +118,26 @@ bool CAPRSEntry::isOK() } } -CAPRSWriter::CAPRSWriter(const wxString& hostname, unsigned int port, const wxString& gateway, const wxString& password, const wxString& address) : -m_thread(NULL), +CAPRSWriter::CAPRSWriter(const wxString& address, unsigned int port, const wxString& gateway) : m_idTimer(1000U), m_gateway(), m_array(), -m_address(), -m_port(0U), -m_socket(NULL) +m_aprsAddress(), +m_aprsPort(port), +m_aprsSocket(), +m_mobileAddress(), +m_mobilePort(0U), +m_mobileSocket(NULL) { - wxASSERT(!hostname.IsEmpty()); + wxASSERT(!address.IsEmpty()); wxASSERT(port > 0U); wxASSERT(!gateway.IsEmpty()); - wxASSERT(!password.IsEmpty()); - - m_thread = new CAPRSWriterThread(gateway, password, address, hostname, port); m_gateway = gateway; m_gateway.Truncate(LONG_CALLSIGN_LENGTH - 1U); m_gateway.Trim(); + + m_aprsAddress = CUDPReaderWriter::lookup(address); } CAPRSWriter::~CAPRSWriter() @@ -164,21 +165,21 @@ void CAPRSWriter::setPortMobile(const wxString& callsign, const wxString& band, m_array[temp] = new CAPRSEntry(callsign, band, frequency, offset, range, 0.0, 0.0, 0.0); - if (m_socket == NULL) { - m_address = CUDPReaderWriter::lookup(address); - m_port = port; + if (m_mobileSocket == NULL) { + m_mobileAddress = CUDPReaderWriter::lookup(address); + m_mobilePort = port; - m_socket = new CUDPReaderWriter; + m_mobileSocket = new CUDPReaderWriter; } } bool CAPRSWriter::open() { - if (m_socket != NULL) { - bool ret = m_socket->open(); + if (m_mobileSocket != NULL) { + bool ret = m_mobileSocket->open(); if (!ret) { - delete m_socket; - m_socket = NULL; + delete m_mobileSocket; + m_mobileSocket = NULL; return false; } @@ -190,7 +191,7 @@ bool CAPRSWriter::open() m_idTimer.start(); - return m_thread->start(); + return m_aprsSocket.open(); } void CAPRSWriter::writeHeader(const wxString& callsign, const CHeaderData& header) @@ -233,11 +234,6 @@ void CAPRSWriter::writeData(const wxString& callsign, const CAMBEData& data) if (!complete) return; - if (!m_thread->isConnected()) { - collector->reset(); - return; - } - // Check the transmission timer bool ok = entry->isOK(); if (!ok) { @@ -268,14 +264,14 @@ void CAPRSWriter::writeData(const wxString& callsign, const CAMBEData& data) body = body.Left(n); wxString output; - output.Printf(wxT("%s,qAR,%s-%s:%s"), header.c_str(), entry->getCallsign().c_str(), entry->getBand().c_str(), body.c_str()); + output.Printf(wxT("%s,qAR,%s-%s:%s\r\n"), header.c_str(), entry->getCallsign().c_str(), entry->getBand().c_str(), body.c_str()); char ascii[500U]; ::memset(ascii, 0x00, 500U); for (unsigned int i = 0U; i < output.Len(); i++) ascii[i] = output.GetChar(i); - m_thread->write(ascii); + m_aprsSocket.write((unsigned char*)ascii, (unsigned int)::strlen(ascii), m_aprsAddress, m_aprsPort); collector->reset(); } @@ -284,9 +280,7 @@ void CAPRSWriter::clock(unsigned int ms) { m_idTimer.clock(ms); - m_thread->clock(ms); - - if (m_socket != NULL) { + if (m_mobileSocket != NULL) { if (m_idTimer.hasExpired()) { pollGPS(); m_idTimer.start(); @@ -304,33 +298,25 @@ void CAPRSWriter::clock(unsigned int ms) it->second->clock(ms); } -bool CAPRSWriter::isConnected() const -{ - return m_thread->isConnected(); -} - void CAPRSWriter::close() { - if (m_socket != NULL) { - m_socket->close(); - delete m_socket; - } + m_aprsSocket.close(); - m_thread->stop(); + if (m_mobileSocket != NULL) { + m_mobileSocket->close(); + delete m_mobileSocket; + } } bool CAPRSWriter::pollGPS() { - assert(m_socket != NULL); + assert(m_mobileSocket != NULL); - return m_socket->write((unsigned char*)"ircDDBGateway", 13U, m_address, m_port); + return m_mobileSocket->write((unsigned char*)"ircDDBGateway", 13U, m_mobileAddress, m_mobilePort); } void CAPRSWriter::sendIdFramesFixed() { - if (!m_thread->isConnected()) - return; - time_t now; ::time(&now); struct tm* tm = ::gmtime(&now); @@ -408,7 +394,7 @@ void CAPRSWriter::sendIdFramesFixed() lon.Replace(wxT(","), wxT(".")); wxString output; - output.Printf(wxT("%s-S>APDG01,TCPIP*,qAC,%s-GS:;%-7s%-2s*%02d%02d%02dz%s%cD%s%caRNG%04.0lf/A=%06.0lf %s %s"), + output.Printf(wxT("%s-S>APDG01,TCPIP*,qAC,%s-GS:;%-7s%-2s*%02d%02d%02dz%s%cD%s%caRNG%04.0lf/A=%06.0lf %s %s\r\n"), m_gateway.c_str(), m_gateway.c_str(), entry->getCallsign().c_str(), entry->getBand().c_str(), tm->tm_mday, tm->tm_hour, tm->tm_min, lat.c_str(), (entry->getLatitude() < 0.0F) ? wxT('S') : wxT('N'), @@ -420,10 +406,10 @@ void CAPRSWriter::sendIdFramesFixed() for (unsigned int i = 0U; i < output.Len(); i++) ascii[i] = output.GetChar(i); - m_thread->write(ascii); + m_aprsSocket.write((unsigned char*)ascii, (unsigned int)::strlen(ascii), m_aprsAddress, m_aprsPort); if (entry->getBand().Len() == 1U) { - output.Printf(wxT("%s-%s>APDG02,TCPIP*,qAC,%s-%sS:!%s%cD%s%c&RNG%04.0lf/A=%06.0lf %s %s"), + output.Printf(wxT("%s-%s>APDG02,TCPIP*,qAC,%s-%sS:!%s%cD%s%c&RNG%04.0lf/A=%06.0lf %s %s\r\n"), entry->getCallsign().c_str(), entry->getBand().c_str(), entry->getCallsign().c_str(), entry->getBand().c_str(), lat.c_str(), (entry->getLatitude() < 0.0F) ? wxT('S') : wxT('N'), lon.c_str(), (entry->getLongitude() < 0.0F) ? wxT('W') : wxT('E'), @@ -433,7 +419,7 @@ void CAPRSWriter::sendIdFramesFixed() for (unsigned int i = 0U; i < output.Len(); i++) ascii[i] = output.GetChar(i); - m_thread->write(ascii); + m_aprsSocket.write((unsigned char*)ascii, (unsigned int)::strlen(ascii), m_aprsAddress, m_aprsPort); } } } @@ -444,13 +430,10 @@ void CAPRSWriter::sendIdFramesMobile() unsigned char buffer[200U]; in_addr address; unsigned int port; - int ret = m_socket->read(buffer, 200U, address, port); + int ret = m_mobileSocket->read(buffer, 200U, address, port); if (ret <= 0) return; - if (!m_thread->isConnected()) - return; - buffer[ret] = '\0'; // Parse the GPS data @@ -556,7 +539,7 @@ void CAPRSWriter::sendIdFramesMobile() } wxString output3; - output3.Printf(wxT("RNG%04.0lf %s %s"), entry->getRange() * 0.6214, band.c_str(), desc.c_str()); + output3.Printf(wxT("RNG%04.0lf %s %s\r\n"), entry->getRange() * 0.6214, band.c_str(), desc.c_str()); char ascii[300U]; ::memset(ascii, 0x00, 300U); @@ -568,7 +551,7 @@ void CAPRSWriter::sendIdFramesMobile() for (unsigned int i = 0U; i < output3.Len(); i++, n++) ascii[n] = output3.GetChar(i); - m_thread->write(ascii); + m_aprsSocket.write((unsigned char*)ascii, (unsigned int)::strlen(ascii), m_aprsAddress, m_aprsPort); if (entry->getBand().Len() == 1U) { output1.Printf(wxT("%s-%s>APDG02,TCPIP*,qAC,%s-%sS:!%s%cD%s%c&/A=%06.0lf"), @@ -586,8 +569,7 @@ void CAPRSWriter::sendIdFramesMobile() for (unsigned int i = 0U; i < output3.Len(); i++, n++) ascii[n] = output3.GetChar(i); - m_thread->write(ascii); + m_aprsSocket.write((unsigned char*)ascii, (unsigned int)::strlen(ascii), m_aprsAddress, m_aprsPort); } } } - diff --git a/Common/APRSWriter.h b/Common/APRSWriter.h index 9b54760..6efde75 100644 --- a/Common/APRSWriter.h +++ b/Common/APRSWriter.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010,2011,2012,2018 by Jonathan Naylor G4KLX + * Copyright (C) 2010,2011,2012,2018,2020 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 @@ -19,7 +19,6 @@ #ifndef APRSWriter_H #define APRSWriter_H -#include "APRSWriterThread.h" #include "UDPReaderWriter.h" #include "APRSCollector.h" #include "DStarDefines.h" @@ -68,7 +67,7 @@ WX_DECLARE_STRING_HASH_MAP(CAPRSEntry*, CEntry_t); class CAPRSWriter { public: - CAPRSWriter(const wxString& hostname, unsigned int port, const wxString& gateway, const wxString& password, const wxString& address); + CAPRSWriter(const wxString& address, unsigned int port, const wxString& gateway); ~CAPRSWriter(); bool open(); @@ -81,20 +80,20 @@ public: void writeData(const wxString& callsign, const CAMBEData& data); - bool isConnected() const; - void clock(unsigned int ms); void close(); private: - CAPRSWriterThread* m_thread; CTimer m_idTimer; wxString m_gateway; CEntry_t m_array; - in_addr m_address; - unsigned int m_port; - CUDPReaderWriter* m_socket; + in_addr m_aprsAddress; + unsigned int m_aprsPort; + CUDPReaderWriter m_aprsSocket; + in_addr m_mobileAddress; + unsigned int m_mobilePort; + CUDPReaderWriter* m_mobileSocket; bool pollGPS(); void sendIdFramesFixed(); diff --git a/Common/APRSWriterThread.cpp b/Common/APRSWriterThread.cpp deleted file mode 100644 index 84112b3..0000000 --- a/Common/APRSWriterThread.cpp +++ /dev/null @@ -1,281 +0,0 @@ -/* - * Copyright (C) 2010-2014,2018,2020 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 - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include "APRSWriterThread.h" -#include "DStarDefines.h" -#include "Utils.h" -#include "Defs.h" - -// #define DUMP_TX - -const unsigned int APRS_TIMEOUT = 10U; - -CAPRSWriterThread::CAPRSWriterThread(const wxString& callsign, const wxString& password, const wxString& address, const wxString& hostname, unsigned int port) : -wxThread(wxTHREAD_JOINABLE), -m_username(callsign), -m_password(password), -m_ssid(callsign), -m_socket(hostname, port, address), -m_queue(20U), -m_exit(false), -m_connected(false), -m_reconnectTimer(1000U), -m_tries(0U), -m_APRSReadCallback(NULL), -m_filter(wxT("")), -m_clientName(wxT("ircDDBGateway")) -{ - wxASSERT(!callsign.IsEmpty()); - wxASSERT(!password.IsEmpty()); - wxASSERT(!hostname.IsEmpty()); - wxASSERT(port > 0U); - - m_username.SetChar(LONG_CALLSIGN_LENGTH - 1U, wxT(' ')); - m_username.Trim(); - m_username.MakeUpper(); - - m_ssid = m_ssid.SubString(LONG_CALLSIGN_LENGTH - 1U, 1); -} - -CAPRSWriterThread::CAPRSWriterThread(const wxString& callsign, const wxString& password, const wxString& address, const wxString& hostname, unsigned int port, const wxString& filter, const wxString& clientName) : -wxThread(wxTHREAD_JOINABLE), -m_username(callsign), -m_password(password), -m_ssid(callsign), -m_socket(hostname, port, address), -m_queue(20U), -m_exit(false), -m_connected(false), -m_reconnectTimer(1000U), -m_tries(0U), -m_APRSReadCallback(NULL), -m_filter(filter), -m_clientName(clientName) -{ - wxASSERT(!callsign.IsEmpty()); - wxASSERT(!password.IsEmpty()); - wxASSERT(!hostname.IsEmpty()); - wxASSERT(port > 0U); - - m_username.SetChar(LONG_CALLSIGN_LENGTH - 1U, wxT(' ')); - m_username.Trim(); - m_username.MakeUpper(); - - m_ssid = m_ssid.SubString(LONG_CALLSIGN_LENGTH - 1U, 1); -} - -CAPRSWriterThread::~CAPRSWriterThread() -{ - m_username.Clear(); - m_password.Clear(); -} - -bool CAPRSWriterThread::start() -{ - Create(); - Run(); - - return true; -} - -void* CAPRSWriterThread::Entry() -{ - wxLogMessage(wxT("Starting the APRS Writer thread")); - - m_connected = connect(); - if (!m_connected) { - wxLogError(wxT("Connect attempt to the APRS server has failed")); - startReconnectionTimer(); - } - - try { - while (!m_exit) { - if (!m_connected) { - if (m_reconnectTimer.isRunning() && m_reconnectTimer.hasExpired()) { - m_reconnectTimer.stop(); - - m_connected = connect(); - if (!m_connected) { - wxLogError(wxT("Reconnect attempt to the APRS server has failed")); - startReconnectionTimer(); - } - } - } - - if (m_connected) { - m_tries = 0U; - - if(!m_queue.isEmpty()){ - char* p = m_queue.getData(); - - wxString text(p, wxConvLocal); - wxLogMessage(wxT("APRS ==> %s"), text.c_str()); - - ::strcat(p, "\r\n"); - - bool ret = m_socket.write((unsigned char*)p, ::strlen(p)); - if (!ret) { - m_connected = false; - m_socket.close(); - wxLogError(wxT("Connection to the APRS thread has failed")); - startReconnectionTimer(); - } - - delete[] p; - } - { - wxString line; - int length = m_socket.readLine(line, APRS_TIMEOUT); - - /*if (length == 0) - wxLogWarning(wxT("No response from the APRS server after %u seconds"), APRS_TIMEOUT);*/ - - if (length < 0) { - m_connected = false; - m_socket.close(); - wxLogError(wxT("Error when reading from the APRS server")); - startReconnectionTimer(); - } - - if(length > 0 && line.GetChar(0) != '#'//check if we have something and if that something is an APRS frame - && m_APRSReadCallback != NULL)//do we have someone wanting an APRS Frame? - { - //wxLogMessage(wxT("Received APRS Frame : ") + line); - m_APRSReadCallback(wxString(line)); - } - } - - } - } - - if (m_connected) - m_socket.close(); - - while (!m_queue.isEmpty()) { - char* p = m_queue.getData(); - delete[] p; - } - } - catch (std::exception& e) { - wxString message(e.what(), wxConvLocal); - wxLogError(wxT("Exception raised in the APRS Writer thread - \"%s\""), message.c_str()); - } - catch (...) { - wxLogError(wxT("Unknown exception raised in the APRS Writer thread")); - } - - wxLogMessage(wxT("Stopping the APRS Writer thread")); - - return NULL; -} - -void CAPRSWriterThread::setReadAPRSCallback(ReadAPRSFrameCallback cb) -{ - m_APRSReadCallback = cb; -} - -void CAPRSWriterThread::write(const char* data) -{ - wxASSERT(data != NULL); - - if (!m_connected) - return; - - unsigned int len = ::strlen(data); - - char* p = new char[len + 5U]; - ::strcpy(p, data); - - m_queue.addData(p); -} - -bool CAPRSWriterThread::isConnected() const -{ - return m_connected; -} - -void CAPRSWriterThread::stop() -{ - m_exit = true; - - Wait(); -} - -void CAPRSWriterThread::clock(unsigned int ms) -{ - m_reconnectTimer.clock(ms); -} - -bool CAPRSWriterThread::connect() -{ - bool ret = m_socket.open(); - if (!ret) - return false; - - //wait for lgin banner - int length; - wxString serverResponse(wxT("")); - length = m_socket.readLine(serverResponse, APRS_TIMEOUT); - if (length == 0) { - wxLogError(wxT("No reply from the APRS server after %u seconds"), APRS_TIMEOUT); - m_socket.close(); - return false; - } - wxLogMessage(wxT("Received login banner : %s"), serverResponse.c_str()); - - wxString filter(m_filter); - if (filter.Length() > 0) filter.Prepend(wxT(" filter ")); - wxString connectString = wxString::Format(wxT("user %s-%s pass %s vers %s%s\n"), m_username.c_str(), m_ssid.c_str(), m_password.c_str(), - (m_clientName.Length() ? m_clientName : wxT("ircDDBGateway")).c_str(), - filter.c_str()); - //wxLogMessage(wxT("Connect String : ") + connectString); - ret = m_socket.writeLine(connectString); - if (!ret) { - m_socket.close(); - return false; - } - - length = m_socket.readLine(serverResponse, APRS_TIMEOUT); - if (length == 0) { - wxLogError(wxT("No reply from the APRS server after %u seconds"), APRS_TIMEOUT); - m_socket.close(); - return false; - } - if (length < 0) { - wxLogError(wxT("Error when reading from the APRS server")); - m_socket.close(); - return false; - } - - wxLogMessage(wxT("Response from APRS server: %s"), serverResponse.c_str()); - - wxLogMessage(wxT("Connected to the APRS server")); - - return true; -} - -void CAPRSWriterThread::startReconnectionTimer() -{ - // Clamp at a ten minutes reconnect time - m_tries++; - if (m_tries > 10U) - m_tries = 10U; - - m_reconnectTimer.setTimeout(m_tries * 60U); - m_reconnectTimer.start(); -} diff --git a/Common/APRSWriterThread.h b/Common/APRSWriterThread.h deleted file mode 100644 index f93e35b..0000000 --- a/Common/APRSWriterThread.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (C) 2010,2011,2012,2018,2020 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 - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef APRSWriterThread_H -#define APRSWriterThread_H - -#include "TCPReaderWriterClient.h" -#include "RingBuffer.h" -#include "Timer.h" - -#include -typedef void (*ReadAPRSFrameCallback)(const wxString&); - -class CAPRSWriterThread : public wxThread { -public: - CAPRSWriterThread(const wxString& callsign, const wxString& password, const wxString& address, const wxString& hostname, unsigned int port); - CAPRSWriterThread(const wxString& callsign, const wxString& password, const wxString& address, const wxString& hostname, unsigned int port, const wxString& filter, const wxString& clientName); - virtual ~CAPRSWriterThread(); - - virtual bool start(); - - virtual bool isConnected() const; - - virtual void write(const char* data); - - virtual void* Entry(); - - virtual void stop(); - - void clock(unsigned int ms); - - void setReadAPRSCallback(ReadAPRSFrameCallback cb); - -private: - wxString m_username; - wxString m_password; - wxString m_ssid; - CTCPReaderWriterClient m_socket; - CRingBuffer m_queue; - bool m_exit; - bool m_connected; - CTimer m_reconnectTimer; - unsigned int m_tries; - ReadAPRSFrameCallback m_APRSReadCallback; - wxString m_filter; - wxString m_clientName; - - bool connect(); - void startReconnectionTimer(); -}; - -#endif diff --git a/Common/Common.vcxproj b/Common/Common.vcxproj index 7e565ee..e4a94e4 100644 --- a/Common/Common.vcxproj +++ b/Common/Common.vcxproj @@ -154,7 +154,6 @@ - @@ -223,7 +222,6 @@ - diff --git a/Common/Common.vcxproj.filters b/Common/Common.vcxproj.filters index 441f132..3dbcf6d 100644 --- a/Common/Common.vcxproj.filters +++ b/Common/Common.vcxproj.filters @@ -23,9 +23,6 @@ Source Files - - Source Files - Source Files @@ -229,9 +226,6 @@ Header Files - - Header Files - Header Files diff --git a/Common/IRCDDBGatewayConfig.cpp b/Common/IRCDDBGatewayConfig.cpp index e796555..6a1d00c 100644 --- a/Common/IRCDDBGatewayConfig.cpp +++ b/Common/IRCDDBGatewayConfig.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2015,2018 by Jonathan Naylor G4KLX + * Copyright (C) 2010-2015,2018,2020 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 @@ -129,8 +129,7 @@ const wxString KEY_IRCDDB_HOSTNAME4 = wxT("ircddbHostname4"); const wxString KEY_IRCDDB_USERNAME4 = wxT("ircddbUsername4"); const wxString KEY_IRCDDB_PASSWORD4 = wxT("ircddbPassword4"); const wxString KEY_APRS_ENABLED = wxT("aprsEnabled"); -const wxString KEY_APRS_PASSWORD = wxT("aprsPassword"); -const wxString KEY_APRS_HOSTNAME = wxT("aprsHostname"); +const wxString KEY_APRS_ADDRESS = wxT("aprsAddress"); const wxString KEY_APRS_PORT = wxT("aprsPort"); const wxString KEY_DEXTRA_ENABLED = wxT("dextraEnabled"); const wxString KEY_DEXTRA_MAXDONGLES = wxT("dextraMaxDongles"); @@ -254,9 +253,8 @@ const wxString DEFAULT_IRCDDB_HOSTNAME4 = wxEmptyString; const wxString DEFAULT_IRCDDB_USERNAME4 = wxEmptyString; const wxString DEFAULT_IRCDDB_PASSWORD4 = wxEmptyString; const bool DEFAULT_APRS_ENABLED = false; -const wxString DEFAULT_APRS_PASSWORD = wxT("00000"); -const wxString DEFAULT_APRS_HOSTNAME = wxT("rotate.aprs2.net"); -const unsigned int DEFAULT_APRS_PORT = 14580U; +const wxString DEFAULT_APRS_ADDRESS = wxT("127.0.0.1"); +const unsigned int DEFAULT_APRS_PORT = 8673U; const bool DEFAULT_DEXTRA_ENABLED = true; const unsigned int DEFAULT_DEXTRA_MAXDONGLES = 5U; const bool DEFAULT_DPLUS_ENABLED = false; @@ -408,8 +406,7 @@ m_ircddbHostname4(DEFAULT_IRCDDB_HOSTNAME4), m_ircddbUsername4(DEFAULT_IRCDDB_USERNAME4), m_ircddbPassword4(DEFAULT_IRCDDB_PASSWORD4), m_aprsEnabled(DEFAULT_APRS_ENABLED), -m_aprsPassword(DEFAULT_APRS_PASSWORD), -m_aprsHostname(DEFAULT_APRS_HOSTNAME), +m_aprsAddress(DEFAULT_APRS_ADDRESS), m_aprsPort(DEFAULT_APRS_PORT), m_dextraEnabled(DEFAULT_DEXTRA_ENABLED), m_dextraMaxDongles(DEFAULT_DEXTRA_MAXDONGLES), @@ -732,9 +729,7 @@ m_y(DEFAULT_WINDOW_Y) m_config->Read(m_name + KEY_APRS_ENABLED, &m_aprsEnabled, DEFAULT_APRS_ENABLED); - m_config->Read(m_name + KEY_APRS_PASSWORD, &m_aprsPassword, DEFAULT_APRS_PASSWORD); - - m_config->Read(m_name + KEY_APRS_HOSTNAME, &m_aprsHostname, DEFAULT_APRS_HOSTNAME); + m_config->Read(m_name + KEY_APRS_ADDRESS, &m_aprsAddress, DEFAULT_APRS_ADDRESS); m_config->Read(m_name + KEY_APRS_PORT, &temp, long(DEFAULT_APRS_PORT)); m_aprsPort = (unsigned int)temp; @@ -1030,8 +1025,7 @@ m_ircddbHostname4(DEFAULT_IRCDDB_HOSTNAME4), m_ircddbUsername4(DEFAULT_IRCDDB_USERNAME4), m_ircddbPassword4(DEFAULT_IRCDDB_PASSWORD4), m_aprsEnabled(DEFAULT_APRS_ENABLED), -m_aprsPassword(DEFAULT_APRS_PASSWORD), -m_aprsHostname(DEFAULT_APRS_HOSTNAME), +m_aprsAddress(DEFAULT_APRS_ADDRESS), m_aprsPort(DEFAULT_APRS_PORT), m_dextraEnabled(DEFAULT_DEXTRA_ENABLED), m_dextraMaxDongles(DEFAULT_DEXTRA_MAXDONGLES), @@ -1402,10 +1396,8 @@ m_y(DEFAULT_WINDOW_Y) } else if (key.IsSameAs(KEY_APRS_ENABLED)) { val.ToLong(&temp1); m_aprsEnabled = temp1 == 1L; - } else if (key.IsSameAs(KEY_APRS_PASSWORD)) { - m_aprsPassword = val; - } else if (key.IsSameAs(KEY_APRS_HOSTNAME)) { - m_aprsHostname = val; + } else if (key.IsSameAs(KEY_APRS_ADDRESS)) { + m_aprsAddress = val; } else if (key.IsSameAs(KEY_APRS_PORT)) { val.ToULong(&temp2); m_aprsPort = (unsigned int)temp2; @@ -1854,14 +1846,6 @@ void CIRCDDBGatewayConfig::getIrcDDB2(bool& enabled, wxString& hostname, wxStrin enabled = m_ircddbEnabled2; hostname = m_ircddbHostname2; username = m_ircddbUsername2; - - /*if(username.IsEmpty()){ - //no user specified for openquad? use the one from the default network ! - username = m_ircddbUsername; - if(username[0] >= '0' && username[0] <= '9') - username = wxT("r") + username; - }*/ - password = m_ircddbPassword2; } @@ -1905,19 +1889,17 @@ void CIRCDDBGatewayConfig::setIrcDDB4(bool enabled, const wxString& hostname, co m_ircddbPassword4 = password; } -void CIRCDDBGatewayConfig::getDPRS(bool& enabled, wxString& password, wxString& hostname, unsigned int& port) const +void CIRCDDBGatewayConfig::getDPRS(bool& enabled, wxString& address, unsigned int& port) const { - enabled = m_aprsEnabled; - password = m_aprsPassword; - hostname = m_aprsHostname; - port = m_aprsPort; + enabled = m_aprsEnabled; + address = m_aprsAddress; + port = m_aprsPort; } -void CIRCDDBGatewayConfig::setDPRS(bool enabled, const wxString& password, const wxString& hostname, unsigned int port) +void CIRCDDBGatewayConfig::setDPRS(bool enabled, const wxString& address, unsigned int port) { m_aprsEnabled = enabled; - m_aprsPassword = password; - m_aprsHostname = hostname; + m_aprsAddress = address; m_aprsPort = port; } @@ -2398,8 +2380,7 @@ bool CIRCDDBGatewayConfig::write() m_config->Write(m_name + KEY_IRCDDB_USERNAME4, m_ircddbUsername4); m_config->Write(m_name + KEY_IRCDDB_PASSWORD4, m_ircddbPassword4); m_config->Write(m_name + KEY_APRS_ENABLED, m_aprsEnabled); - m_config->Write(m_name + KEY_APRS_PASSWORD, m_aprsPassword); - m_config->Write(m_name + KEY_APRS_HOSTNAME, m_aprsHostname); + m_config->Write(m_name + KEY_APRS_ADDRESS, m_aprsAddress); m_config->Write(m_name + KEY_APRS_PORT, long(m_aprsPort)); m_config->Write(m_name + KEY_DEXTRA_ENABLED, m_dextraEnabled); m_config->Write(m_name + KEY_DEXTRA_MAXDONGLES, long(m_dextraMaxDongles)); @@ -2608,8 +2589,7 @@ bool CIRCDDBGatewayConfig::write() buffer.Printf("%s=%s", KEY_IRCDDB_USERNAME4.c_str(), m_ircddbUsername4.c_str()); file.AddLine(buffer); buffer.Printf("%s=%s", KEY_IRCDDB_PASSWORD4.c_str(), m_ircddbPassword4.c_str()); file.AddLine(buffer); buffer.Printf(wxT("%s=%d"), KEY_APRS_ENABLED.c_str(), m_aprsEnabled ? 1 : 0); file.AddLine(buffer); - buffer.Printf(wxT("%s=%s"), KEY_APRS_PASSWORD.c_str(), m_aprsPassword.c_str()); file.AddLine(buffer); - buffer.Printf(wxT("%s=%s"), KEY_APRS_HOSTNAME.c_str(), m_aprsHostname.c_str()); file.AddLine(buffer); + buffer.Printf(wxT("%s=%s"), KEY_APRS_ADDRESS.c_str(), m_aprsAddress.c_str()); file.AddLine(buffer); buffer.Printf(wxT("%s=%u"), KEY_APRS_PORT.c_str(), m_aprsPort); file.AddLine(buffer); buffer.Printf(wxT("%s=%d"), KEY_DEXTRA_ENABLED.c_str(), m_dextraEnabled ? 1 : 0); file.AddLine(buffer); buffer.Printf(wxT("%s=%u"), KEY_DEXTRA_MAXDONGLES.c_str(), m_dextraMaxDongles); file.AddLine(buffer); diff --git a/Common/IRCDDBGatewayConfig.h b/Common/IRCDDBGatewayConfig.h index 962ae31..202eca0 100644 --- a/Common/IRCDDBGatewayConfig.h +++ b/Common/IRCDDBGatewayConfig.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2014,2018 by Jonathan Naylor G4KLX + * Copyright (C) 2010-2014,2018,2020 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 @@ -59,8 +59,8 @@ public: void setIrcDDB3(bool enabled, const wxString& hostname, const wxString& username, const wxString& password); void setIrcDDB4(bool enabled, const wxString& hostname, const wxString& username, const wxString& password); - void getDPRS(bool& enabled, wxString& password, wxString& hostname, unsigned int& port) const; - void setDPRS(bool enabled, const wxString& password, const wxString& hostname, unsigned int port); + void getDPRS(bool& enabled, wxString& address, unsigned int& port) const; + void setDPRS(bool enabled, const wxString& address, unsigned int port); void getDExtra(bool& enabled, unsigned int& maxDongles) const; void setDExtra(bool enabled, unsigned int maxDongles); @@ -235,8 +235,7 @@ private: wxString m_ircddbUsername4; wxString m_ircddbPassword4; bool m_aprsEnabled; - wxString m_aprsPassword; - wxString m_aprsHostname; + wxString m_aprsAddress; unsigned int m_aprsPort; bool m_dextraEnabled; unsigned int m_dextraMaxDongles; diff --git a/Common/Makefile b/Common/Makefile index e403ae5..b684c8d 100644 --- a/Common/Makefile +++ b/Common/Makefile @@ -1,4 +1,4 @@ -OBJECTS = AMBEData.o AnnouncementUnit.o APRSCollector.o APRSWriter.o APRSWriterThread.o AudioUnit.o CacheManager.o CallsignList.o \ +OBJECTS = AMBEData.o AnnouncementUnit.o APRSCollector.o APRSWriter.o AudioUnit.o CacheManager.o CallsignList.o \ CallsignServer.o CCITTChecksum.o CCSData.o CCSHandler.o CCSProtocolHandler.o ConnectData.o ConsoleLogger.o DCSHandler.o DCSProtocolHandler.o \ DCSProtocolHandlerPool.o DDData.o DDHandler.o DExtraHandler.o DExtraProtocolHandler.o DExtraProtocolHandlerPool.o \ DPlusAuthenticator.o DPlusHandler.o DPlusProtocolHandler.o DPlusProtocolHandlerPool.o DRATSServer.o DTMF.o \ diff --git a/Common/Version.h b/Common/Version.h index 36c6527..cfe767d 100644 --- a/Common/Version.h +++ b/Common/Version.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2015,2018,2019 by Jonathan Naylor G4KLX + * Copyright (C) 2010-2015,2018,2019,2020 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 @@ -24,9 +24,9 @@ const wxString VENDOR_NAME = wxT("G4KLX"); #if defined(__WXDEBUG__) -const wxString VERSION = wxT("20190402 - DEBUG"); +const wxString VERSION = wxT("20200601 - DEBUG"); #else -const wxString VERSION = wxT("20190402"); +const wxString VERSION = wxT("20190601"); #endif #endif diff --git a/GUICommon/DPRSSet.cpp b/GUICommon/DPRSSet.cpp index d300a2e..be2a8b4 100644 --- a/GUICommon/DPRSSet.cpp +++ b/GUICommon/DPRSSet.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010,2018 by Jonathan Naylor G4KLX + * Copyright (C) 2010,2018,2020 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 @@ -25,12 +25,11 @@ const unsigned int CONTROL_WIDTH2 = 80U; const unsigned int PORT_LENGTH = 5U; const unsigned int PASSWORD_LENGTH = 5U; -CDPRSSet::CDPRSSet(wxWindow* parent, int id, const wxString& title, bool enabled, const wxString& password, const wxString& hostname, unsigned int port) : +CDPRSSet::CDPRSSet(wxWindow* parent, int id, const wxString& title, bool enabled, const wxString& address, unsigned int port) : wxPanel(parent, id), m_title(title), m_enabled(NULL), -m_password(NULL), -m_hostname(NULL), +m_address(NULL), m_port(NULL) { wxFlexGridSizer* sizer = new wxFlexGridSizer(2); @@ -44,17 +43,11 @@ m_port(NULL) sizer->Add(m_enabled, 0, wxALL | wxALIGN_LEFT, BORDER_SIZE); m_enabled->SetSelection(enabled ? 1 : 0); - wxStaticText* passwordLabel = new wxStaticText(this, -1, _("Password")); - sizer->Add(passwordLabel, 0, wxALL | wxALIGN_LEFT, BORDER_SIZE); + wxStaticText* addressLabel = new wxStaticText(this, -1, _("Address")); + sizer->Add(addressLabel, 0, wxALL | wxALIGN_LEFT, BORDER_SIZE); - m_password = new wxTextCtrl(this, -1, password, wxDefaultPosition, wxSize(CONTROL_WIDTH1, -1)); - sizer->Add(m_password, 0, wxALL | wxALIGN_LEFT, BORDER_SIZE); - - wxStaticText* hostnameLabel = new wxStaticText(this, -1, _("Hostname")); - sizer->Add(hostnameLabel, 0, wxALL | wxALIGN_LEFT, BORDER_SIZE); - - m_hostname = new wxTextCtrl(this, -1, hostname, wxDefaultPosition, wxSize(CONTROL_WIDTH1, -1)); - sizer->Add(m_hostname, 0, wxALL | wxALIGN_LEFT, BORDER_SIZE); + m_address = new wxTextCtrl(this, -1, address, wxDefaultPosition, wxSize(CONTROL_WIDTH1, -1)); + sizer->Add(m_address, 0, wxALL | wxALIGN_LEFT, BORDER_SIZE); wxStaticText* portLabel = new wxStaticText(this, -1, _("Port")); sizer->Add(portLabel, 0, wxALL | wxALIGN_LEFT, BORDER_SIZE); @@ -82,12 +75,8 @@ bool CDPRSSet::Validate() if (n == wxNOT_FOUND) return false; - wxString password = m_password->GetValue(); - if (password.IsEmpty()) - return true; - - wxString hostname = m_hostname->GetValue(); - if (hostname.IsEmpty()) + wxString address = m_address->GetValue(); + if (address.IsEmpty()) return true; unsigned int port = getPort(); @@ -110,14 +99,9 @@ bool CDPRSSet::getEnabled() const return c == 1; } -wxString CDPRSSet::getPassword() const +wxString CDPRSSet::getAddress() const { - return m_password->GetValue(); -} - -wxString CDPRSSet::getHostname() const -{ - return m_hostname->GetValue(); + return m_address->GetValue(); } unsigned int CDPRSSet::getPort() const diff --git a/GUICommon/DPRSSet.h b/GUICommon/DPRSSet.h index 56764f5..78185c8 100644 --- a/GUICommon/DPRSSet.h +++ b/GUICommon/DPRSSet.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010,2018 by Jonathan Naylor G4KLX + * Copyright (C) 2010,2018,2020 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 @@ -25,21 +25,19 @@ class CDPRSSet : public wxPanel { public: - CDPRSSet(wxWindow* parent, int id, const wxString& title, bool enabled, const wxString& password, const wxString& hostname, unsigned int port); + CDPRSSet(wxWindow* parent, int id, const wxString& title, bool enabled, const wxString& address, unsigned int port); virtual ~CDPRSSet(); virtual bool Validate(); virtual bool getEnabled() const; - virtual wxString getPassword() const; - virtual wxString getHostname() const; + virtual wxString getAddress() const; virtual unsigned int getPort() const; private: wxString m_title; wxChoice* m_enabled; - wxTextCtrl* m_password; - wxTextCtrl* m_hostname; + wxTextCtrl* m_address; CPortTextCtrl* m_port; }; diff --git a/Makefile b/Makefile index 58ba78d..066b409 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,7 @@ export LIBS := $(shell wx-config --libs base,net) export LDFLAGS := .PHONY: all -all: ircDDBGateway/ircddbgatewayd ircDDBGatewayConfig/ircddbgatewayconfig APRSTransmit/aprstransmitd RemoteControl/remotecontrold \ +all: ircDDBGateway/ircddbgatewayd ircDDBGatewayConfig/ircddbgatewayconfig RemoteControl/remotecontrold \ StarNetServer/starnetserverd TextTransmit/texttransmitd TimerControl/timercontrold TimeServer/timeserverd VoiceTransmit/voicetransmitd ircDDBGateway/ircddbgatewayd: Common/Common.a ircDDB/IRCDDB.a force diff --git a/MakefileGUI b/MakefileGUI index ca8a81b..05aa28a 100644 --- a/MakefileGUI +++ b/MakefileGUI @@ -20,7 +20,7 @@ export LIBS := $(shell wx-config --libs base,net) export LDFLAGS := .PHONY: all -all: ircDDBGateway/ircddbgateway ircDDBGatewayConfig/ircddbgatewayconfig APRSTransmit/aprstransmitd RemoteControl/remotecontrol \ +all: ircDDBGateway/ircddbgateway ircDDBGatewayConfig/ircddbgatewayconfig RemoteControl/remotecontrol \ StarNetServer/starnetserver TextTransmit/texttransmitd TimerControl/timercontrol TimeServer/timeserver VoiceTransmit/voicetransmitd ircDDBGateway/ircddbgateway: GUICommon/GUICommon.a Common/Common.a ircDDB/IRCDDB.a force diff --git a/ircDDBGateway/IRCDDBGatewayApp.cpp b/ircDDBGateway/IRCDDBGatewayApp.cpp index 1101563..2f210d6 100644 --- a/ircDDBGateway/IRCDDBGatewayApp.cpp +++ b/ircDDBGateway/IRCDDBGatewayApp.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2015,2018 by Jonathan Naylor G4KLX + * Copyright (C) 2010-2015,2018,2020 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 @@ -268,15 +268,15 @@ void CIRCDDBGatewayApp::createThread() thread->setGateway(gatewayType, gatewayCallsign, gatewayAddress); - wxString aprsHostname, aprsPassword; + wxString aprsAddress; unsigned int aprsPort; bool aprsEnabled; - m_config->getDPRS(aprsEnabled, aprsPassword, aprsHostname, aprsPort); - wxLogInfo(wxT("APRS enabled: %d, host: %s:%u"), int(aprsEnabled), aprsHostname.c_str(), aprsPort); + m_config->getDPRS(aprsEnabled, aprsAddress, aprsPort); + wxLogInfo(wxT("APRS enabled: %d, host: %s:%u"), int(aprsEnabled), aprsAddress.c_str(), aprsPort); CAPRSWriter* aprs = NULL; - if (aprsEnabled && !gatewayCallsign.IsEmpty() && !aprsHostname.IsEmpty() && aprsPort != 0U) { - aprs = new CAPRSWriter(aprsHostname, aprsPort, gatewayCallsign, aprsPassword, gatewayAddress); + if (aprsEnabled && !aprsAddress.IsEmpty() && aprsPort != 0U) { + aprs = new CAPRSWriter(aprsAddress, aprsPort, gatewayCallsign); bool res = aprs->open(); if (!res) diff --git a/ircDDBGateway/IRCDDBGatewayAppD.cpp b/ircDDBGateway/IRCDDBGatewayAppD.cpp index ce6ed87..5008394 100644 --- a/ircDDBGateway/IRCDDBGatewayAppD.cpp +++ b/ircDDBGateway/IRCDDBGatewayAppD.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2013,2015,2018 by Jonathan Naylor G4KLX + * Copyright (C) 2010-2013,2015,2018,2020 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 @@ -275,15 +275,15 @@ bool CIRCDDBGatewayAppD::createThread() m_thread->setGateway(gatewayType, gatewayCallsign, gatewayAddress); - wxString aprsHostname, aprsPassword; + wxString aprsAddress; unsigned int aprsPort; bool aprsEnabled; - config.getDPRS(aprsEnabled, aprsPassword, aprsHostname, aprsPort); - wxLogInfo(wxT("APRS enabled: %d, host: %s:%u"), int(aprsEnabled), aprsHostname.c_str(), aprsPort); + config.getDPRS(aprsEnabled, aprsAddress, aprsPort); + wxLogInfo(wxT("APRS enabled: %d, host: %s:%u"), int(aprsEnabled), aprsAddress.c_str(), aprsPort); CAPRSWriter* aprs = NULL; - if (aprsEnabled && !gatewayCallsign.IsEmpty() && !aprsHostname.IsEmpty() && aprsPort != 0U) { - aprs = new CAPRSWriter(aprsHostname, aprsPort, gatewayCallsign, aprsPassword, gatewayAddress); + if (aprsEnabled && !aprsAddress.IsEmpty() && aprsPort != 0U) { + aprs = new CAPRSWriter(aprsAddress, aprsPort, gatewayCallsign); bool res = aprs->open(); if (!res) diff --git a/ircDDBGateway/IRCDDBGatewayFrame.cpp b/ircDDBGateway/IRCDDBGatewayFrame.cpp index bb01e68..ce1af9f 100644 --- a/ircDDBGateway/IRCDDBGatewayFrame.cpp +++ b/ircDDBGateway/IRCDDBGatewayFrame.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2015,2018 by Jonathan Naylor G4KLX + * Copyright (C) 2010-2015,2018,2020 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 @@ -199,7 +199,7 @@ void CIRCDDBGatewayFrame::onAbout(wxCommandEvent&) wxAboutDialogInfo info; info.AddDeveloper(wxT("Jonathan Naylor, G4KLX")); info.AddDeveloper(wxT("Michael Dirska, DL1BFF")); - info.SetCopyright(wxT("(C) 2010-2018 using GPL v2 or later")); + info.SetCopyright(wxT("(C) 2010-2020 using GPL v2 or later")); info.SetName(APPLICATION_NAME); info.SetVersion(VERSION); info.SetDescription(_("This program allows a computer running homebrew repeaters\nto access the ircDDB network for G2 callsign and repeater routing,\nas well as D-Plus and DExtra reflectors. It includes a StarNet\nDigital server.")); diff --git a/ircDDBGateway/IRCDDBGatewayThread.cpp b/ircDDBGateway/IRCDDBGatewayThread.cpp index 37b8b59..ef6faf0 100644 --- a/ircDDBGateway/IRCDDBGatewayThread.cpp +++ b/ircDDBGateway/IRCDDBGatewayThread.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2015,2018 by Jonathan Naylor G4KLX + * Copyright (C) 2010-2015,2018,2020 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 @@ -1324,7 +1324,7 @@ CIRCDDBGatewayStatusData* CIRCDDBGatewayThread::getStatus() const { bool aprsStatus = false; if (m_aprsWriter != NULL) - aprsStatus = m_aprsWriter->isConnected(); + aprsStatus = true; CIRCDDBGatewayStatusData* status = new CIRCDDBGatewayStatusData(m_lastStatus, aprsStatus); diff --git a/ircDDBGatewayConfig/IRCDDBGatewayConfigFrame.cpp b/ircDDBGatewayConfig/IRCDDBGatewayConfigFrame.cpp index 80907cd..c880252 100644 --- a/ircDDBGatewayConfig/IRCDDBGatewayConfigFrame.cpp +++ b/ircDDBGatewayConfig/IRCDDBGatewayConfigFrame.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2015,2018 by Jonathan Naylor G4KLX + * Copyright (C) 2010-2015,2018,2020 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 @@ -194,12 +194,12 @@ m_miscellaneous(NULL) m_ircDDB4 = new CIRCDDBGatewayConfigIrcDDBSet(noteBook, -1, APPLICATION_NAME, ircDDBEnabled, ircDDBHostname, ircDDBUsername, ircDDBPassword); noteBook->AddPage(m_ircDDB4, wxT("ircDDB 4th Network"), false); - wxString aprsHostname, aprsPassword; + wxString aprsAddress; unsigned int aprsPort; bool aprsEnabled; - m_config->getDPRS(aprsEnabled, aprsPassword, aprsHostname, aprsPort); + m_config->getDPRS(aprsEnabled, aprsAddress, aprsPort); - m_dprs = new CDPRSSet(noteBook, -1, APPLICATION_NAME, aprsEnabled, aprsPassword, aprsHostname, aprsPort); + m_dprs = new CDPRSSet(noteBook, -1, APPLICATION_NAME, aprsEnabled, aprsAddress, aprsPort); noteBook->AddPage(m_dprs, wxT("D-PRS"), false); m_dextra = new CDExtraSet(noteBook, -1, APPLICATION_NAME, dextraEnabled, maxDExtraDongles, MAX_DEXTRA_LINKS); @@ -505,10 +505,9 @@ void CIRCDDBGatewayConfigFrame::onSave(wxCommandEvent&) m_config->setIrcDDB4(ircDDBEnabled, ircDDBHostname, ircDDBUsername, ircDDBPassword); bool aprsEnabled = m_dprs->getEnabled(); - wxString aprsPassword = m_dprs->getPassword(); - wxString aprsHostname = m_dprs->getHostname(); + wxString aprsAddress = m_dprs->getAddress(); unsigned int aprsPort = m_dprs->getPort(); - m_config->setDPRS(aprsEnabled, aprsPassword, aprsHostname, aprsPort); + m_config->setDPRS(aprsEnabled, aprsAddress, aprsPort); bool dextraEnabled = m_dextra->getEnabled(); unsigned int maxDExtraDongles = m_dextra->getMaxDongles(); @@ -640,7 +639,7 @@ void CIRCDDBGatewayConfigFrame::onAbout(wxCommandEvent&) { wxAboutDialogInfo info; info.AddDeveloper(wxT("Jonathan Naylor, G4KLX")); - info.SetCopyright(wxT("(C) 2010-2018 using GPL v2 or later")); + info.SetCopyright(wxT("(C) 2010-2020 using GPL v2 or later")); info.SetName(APPLICATION_NAME); info.SetVersion(VERSION); info.SetDescription(_("This program configures the ircDDB Gateway.")); From a34abeeaee790daac803e506a76ce3f2c5d3013f Mon Sep 17 00:00:00 2001 From: Adam Kolakowski Date: Tue, 2 Jun 2020 17:25:26 +0200 Subject: [PATCH 158/166] Remove GUICommon dependency from Makefile Removes any GUI related dependencies from the Makefile that is intended to build only console (GUI-less) applications. As a result developers can just install wxGTK-base-dev to compile a solution on embedded devies instead of a full wxGTK-dev that weights a ton. --- Makefile | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 58ba78d..01afa9d 100644 --- a/Makefile +++ b/Makefile @@ -23,20 +23,16 @@ ifeq ($(BUILD), debug) else ifeq ($(BUILD), release) export CFLAGS := $(CFLAGS) $(RELEASEFLAGS) endif -export GUILIBS := $(shell wx-config --libs adv,core,base) export LIBS := $(shell wx-config --libs base,net) export LDFLAGS := .PHONY: all -all: ircDDBGateway/ircddbgatewayd ircDDBGatewayConfig/ircddbgatewayconfig APRSTransmit/aprstransmitd RemoteControl/remotecontrold \ +all: ircDDBGateway/ircddbgatewayd APRSTransmit/aprstransmitd RemoteControl/remotecontrold \ StarNetServer/starnetserverd TextTransmit/texttransmitd TimerControl/timercontrold TimeServer/timeserverd VoiceTransmit/voicetransmitd ircDDBGateway/ircddbgatewayd: Common/Common.a ircDDB/IRCDDB.a force $(MAKE) -C ircDDBGateway -ircDDBGatewayConfig/ircddbgatewayconfig: GUICommon/GUICommon.a Common/Common.a force - $(MAKE) -C ircDDBGatewayConfig - APRSTransmit/aprstransmitd: Common/Common.a force $(MAKE) -C APRSTransmit @@ -49,18 +45,15 @@ StarNetServer/starnetserverd: Common/Common.a ircDDB/IRCDDB.a force TextTransmit/texttransmitd: Common/Common.a force $(MAKE) -C TextTransmit -TimerControl/timercontrold: Common/Common.a GUICommon/GUICommon.a force +TimerControl/timercontrold: Common/Common.a force $(MAKE) -C TimerControl -TimeServer/timeserverd: Common/Common.a GUICommon/GUICommon.a force +TimeServer/timeserverd: Common/Common.a force $(MAKE) -C TimeServer VoiceTransmit/voicetransmitd: Common/Common.a force $(MAKE) -C VoiceTransmit -GUICommon/GUICommon.a: force - $(MAKE) -C GUICommon - Common/Common.a: force $(MAKE) -C Common @@ -100,7 +93,6 @@ endif clean: $(MAKE) -C Common clean $(MAKE) -C ircDDB clean - $(MAKE) -C GUICommon clean $(MAKE) -C APRSTransmit clean $(MAKE) -C ircDDBGateway clean $(MAKE) -C RemoteControl clean From f3811bcaa2a92d72ef43ad56cbaca2a318366ea2 Mon Sep 17 00:00:00 2001 From: Adam Kolakowski Date: Tue, 2 Jun 2020 21:49:00 +0200 Subject: [PATCH 159/166] Remove ircDDBGatewayConfig from make install Do not attempt to install ircDDBGatewayConfig when using GUI-less Makefile. ircDDBGatewayConfig is a GUI application and regular Makefile does not build it. --- Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/Makefile b/Makefile index 01afa9d..13e21e6 100644 --- a/Makefile +++ b/Makefile @@ -87,7 +87,6 @@ endif $(MAKE) -C TimerControl install $(MAKE) -C TimeServer install $(MAKE) -C VoiceTransmit install - $(MAKE) -C ircDDBGatewayConfig install .PHONY: clean clean: From d6f04c3bc2c7e39b12234f966177523feb4b8ef7 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Wed, 3 Jun 2020 13:47:34 +0100 Subject: [PATCH 160/166] Replace MobileGPS with GPSD. --- Common/APRSWriter.cpp | 127 +++++++++--------- Common/APRSWriter.h | 16 ++- Common/IRCDDBGatewayConfig.cpp | 74 +++++----- Common/IRCDDBGatewayConfig.h | 10 +- Common/Version.h | 4 +- GUICommon/{MobileGPSSet.cpp => GPSDSet.cpp} | 32 ++--- GUICommon/{MobileGPSSet.h => GPSDSet.h} | 18 +-- GUICommon/Makefile | 2 +- Makefile | 2 +- MakefileGUI | 4 +- ircDDBGateway/IRCDDBGatewayApp.cpp | 41 +++--- ircDDBGateway/IRCDDBGatewayAppD.cpp | 41 +++--- .../IRCDDBGatewayConfigFrame.cpp | 23 ++-- .../IRCDDBGatewayConfigFrame.h | 6 +- 14 files changed, 203 insertions(+), 197 deletions(-) rename GUICommon/{MobileGPSSet.cpp => GPSDSet.cpp} (79%) rename GUICommon/{MobileGPSSet.h => GPSDSet.h} (71%) diff --git a/Common/APRSWriter.cpp b/Common/APRSWriter.cpp index cd942ee..089c0a0 100644 --- a/Common/APRSWriter.cpp +++ b/Common/APRSWriter.cpp @@ -124,10 +124,13 @@ m_gateway(), m_array(), m_aprsAddress(), m_aprsPort(port), -m_aprsSocket(), -m_mobileAddress(), -m_mobilePort(0U), -m_mobileSocket(NULL) +m_aprsSocket() +#if !defined(_WIN32) && !defined(_WIN64) +,m_gpsdEnabled(false), +m_gpsdAddress(), +m_gpsdPort(), +m_gpsdData() +#endif { wxASSERT(!address.IsEmpty()); wxASSERT(port > 0U); @@ -157,38 +160,44 @@ void CAPRSWriter::setPortFixed(const wxString& callsign, const wxString& band, d m_array[temp] = new CAPRSEntry(callsign, band, frequency, offset, range, latitude, longitude, agl); } -void CAPRSWriter::setPortMobile(const wxString& callsign, const wxString& band, double frequency, double offset, double range, const wxString& address, unsigned int port) +void CAPRSWriter::setPortGPSD(const wxString& callsign, const wxString& band, double frequency, double offset, double range, const wxString& address, const wxString& port) { +#if !defined(_WIN32) && !defined(_WIN64) + wxASSERT(!address.IsEmpty()); + wxASSERT(!port.IsEmpty()); + wxString temp = callsign; temp.resize(LONG_CALLSIGN_LENGTH - 1U, wxT(' ')); temp.Append(band); m_array[temp] = new CAPRSEntry(callsign, band, frequency, offset, range, 0.0, 0.0, 0.0); - if (m_mobileSocket == NULL) { - m_mobileAddress = CUDPReaderWriter::lookup(address); - m_mobilePort = port; - - m_mobileSocket = new CUDPReaderWriter; - } + m_gpsdEnabled = true; + m_gpsdAddress = address; + m_gpsdPort = port; +#endif } bool CAPRSWriter::open() { - if (m_mobileSocket != NULL) { - bool ret = m_mobileSocket->open(); - if (!ret) { - delete m_mobileSocket; - m_mobileSocket = NULL; +#if !defined(_WIN32) && !defined(_WIN64) + if (m_gpsdEnabled) { + int ret = ::gps_open(m_gpsdAddress.mb_str(), m_gpsdPort.mb_str(), &m_gpsdData); + if (ret != 0) { + wxLogError(wxT("Error when opening access to gpsd - %d - %s"), errno, ::gps_errstr(errno)); return false; } + ::gps_stream(&m_gpsdData, WATCH_ENABLE | WATCH_JSON, NULL); + // Poll the GPS every minute m_idTimer.setTimeout(60U); } else { m_idTimer.setTimeout(20U * 60U); } - +#else + m_idTimer.setTimeout(20U * 60U); +#endif m_idTimer.start(); return m_aprsSocket.open(); @@ -280,20 +289,22 @@ void CAPRSWriter::clock(unsigned int ms) { m_idTimer.clock(ms); - if (m_mobileSocket != NULL) { +#if !defined(_WIN32) && !defined(_WIN64) + if (m_gpsdEnabled) { if (m_idTimer.hasExpired()) { - pollGPS(); + sendIdFramesMobile(); m_idTimer.start(); } - sendIdFramesMobile(); } else { +#endif if (m_idTimer.hasExpired()) { sendIdFramesFixed(); m_idTimer.start(); } +#if !defined(_WIN32) && !defined(_WIN64) } - +#endif for (CEntry_t::iterator it = m_array.begin(); it != m_array.end(); ++it) it->second->clock(ms); } @@ -302,17 +313,12 @@ void CAPRSWriter::close() { m_aprsSocket.close(); - if (m_mobileSocket != NULL) { - m_mobileSocket->close(); - delete m_mobileSocket; +#if !defined(_WIN32) && !defined(_WIN64) + if (m_gpsdEnabled) { + ::gps_stream(&m_gpsdData, WATCH_DISABLE, NULL); + ::gps_close(&m_gpsdData); } -} - -bool CAPRSWriter::pollGPS() -{ - assert(m_mobileSocket != NULL); - - return m_mobileSocket->write((unsigned char*)"ircDDBGateway", 13U, m_mobileAddress, m_mobilePort); +#endif } void CAPRSWriter::sendIdFramesFixed() @@ -426,29 +432,28 @@ void CAPRSWriter::sendIdFramesFixed() void CAPRSWriter::sendIdFramesMobile() { - // Grab GPS data if it's available - unsigned char buffer[200U]; - in_addr address; - unsigned int port; - int ret = m_mobileSocket->read(buffer, 200U, address, port); - if (ret <= 0) + if (!m_gpsdEnabled) return; - buffer[ret] = '\0'; - - // Parse the GPS data - char* pLatitude = ::strtok((char*)buffer, ",\n"); // Latitude - char* pLongitude = ::strtok(NULL, ",\n"); // Longitude - char* pAltitude = ::strtok(NULL, ",\n"); // Altitude (m) - char* pVelocity = ::strtok(NULL, ",\n"); // Velocity (kms/h) - char* pBearing = ::strtok(NULL, "\n"); // Bearing - - if (pLatitude == NULL || pLongitude == NULL || pAltitude == NULL) + if (!::gps_waiting(&m_gpsdData, 0)) return; - double rawLatitude = ::atof(pLatitude); - double rawLongitude = ::atof(pLongitude); - double rawAltitude = ::atof(pAltitude); + if (::gps_read(&m_gpsdData, NULL, 0) <= 0) + return; + + bool latlonSet = (m_gpsdData.set & LATLON_SET) == LATLON_SET; + bool altitudeSet = (m_gpsdData.set & ALTITUDE_SET) == ALTITUDE_SET; + bool velocitySet = (m_gpsdData.set & SPEED_SET) == SPEED_SET; + bool bearingSet = (m_gpsdData.set & TRACK_SET) == TRACK_SET; + + if (!latlonSet) + return; + + float rawLatitude = float(m_gpsdData.fix.latitude); + float rawLongitude = float(m_gpsdData.fix.longitude); + float rawAltitude = float(m_gpsdData.fix.altMSL); + float rawVelocity = float(m_gpsdData.fix.speed); + float rawBearing = float(m_gpsdData.fix.track); time_t now; ::time(&now); @@ -531,12 +536,8 @@ void CAPRSWriter::sendIdFramesMobile() rawAltitude * 3.28); wxString output2; - if (pBearing != NULL && pVelocity != NULL) { - double rawBearing = ::atof(pBearing); - double rawVelocity = ::atof(pVelocity); - + if (bearingSet && velocitySet) output2.Printf(wxT("%03.0lf/%03.0lf"), rawBearing, rawVelocity * 0.539957F); - } wxString output3; output3.Printf(wxT("RNG%04.0lf %s %s\r\n"), entry->getRange() * 0.6214, band.c_str(), desc.c_str()); @@ -554,11 +555,17 @@ void CAPRSWriter::sendIdFramesMobile() m_aprsSocket.write((unsigned char*)ascii, (unsigned int)::strlen(ascii), m_aprsAddress, m_aprsPort); if (entry->getBand().Len() == 1U) { - output1.Printf(wxT("%s-%s>APDG02,TCPIP*,qAC,%s-%sS:!%s%cD%s%c&/A=%06.0lf"), - entry->getCallsign().c_str(), entry->getBand().c_str(), entry->getCallsign().c_str(), entry->getBand().c_str(), - lat.c_str(), (rawLatitude < 0.0) ? wxT('S') : wxT('N'), - lon.c_str(), (rawLongitude < 0.0) ? wxT('W') : wxT('E'), - rawAltitude * 3.28); + if (altitudeSet) + output1.Printf(wxT("%s-%s>APDG02,TCPIP*,qAC,%s-%sS:!%s%cD%s%c&/A=%06.0lf"), + entry->getCallsign().c_str(), entry->getBand().c_str(), entry->getCallsign().c_str(), entry->getBand().c_str(), + lat.c_str(), (rawLatitude < 0.0) ? wxT('S') : wxT('N'), + lon.c_str(), (rawLongitude < 0.0) ? wxT('W') : wxT('E'), + rawAltitude * 3.28); + else + output1.Printf(wxT("%s-%s>APDG02,TCPIP*,qAC,%s-%sS:!%s%cD%s%c&"), + entry->getCallsign().c_str(), entry->getBand().c_str(), entry->getCallsign().c_str(), entry->getBand().c_str(), + lat.c_str(), (rawLatitude < 0.0) ? wxT('S') : wxT('N'), + lon.c_str(), (rawLongitude < 0.0) ? wxT('W') : wxT('E')); ::memset(ascii, 0x00, 300U); unsigned int n = 0U; diff --git a/Common/APRSWriter.h b/Common/APRSWriter.h index 6efde75..6c9b016 100644 --- a/Common/APRSWriter.h +++ b/Common/APRSWriter.h @@ -27,6 +27,10 @@ #include "Timer.h" #include "Defs.h" +#if !defined(_WIN32) && !defined(_WIN64) +#include +#endif + #include class CAPRSEntry { @@ -74,7 +78,7 @@ public: void setPortFixed(const wxString& callsign, const wxString& band, double frequency, double offset, double range, double latitude, double longitude, double agl); - void setPortMobile(const wxString& callsign, const wxString& band, double frequency, double offset, double range, const wxString& address, unsigned int port); + void setPortGPSD(const wxString& callsign, const wxString& band, double frequency, double offset, double range, const wxString& address, const wxString& port); void writeHeader(const wxString& callsign, const CHeaderData& header); @@ -91,11 +95,13 @@ private: in_addr m_aprsAddress; unsigned int m_aprsPort; CUDPReaderWriter m_aprsSocket; - in_addr m_mobileAddress; - unsigned int m_mobilePort; - CUDPReaderWriter* m_mobileSocket; +#if !defined(_WIN32) && !defined(_WIN64) + bool m_gpsdEnabled; + wxString m_gpsdAddress; + wxString m_gpsdPort; + struct gps_data_t m_gpsdData; +#endif - bool pollGPS(); void sendIdFramesFixed(); void sendIdFramesMobile(); }; diff --git a/Common/IRCDDBGatewayConfig.cpp b/Common/IRCDDBGatewayConfig.cpp index 6a1d00c..4931656 100644 --- a/Common/IRCDDBGatewayConfig.cpp +++ b/Common/IRCDDBGatewayConfig.cpp @@ -200,9 +200,9 @@ const wxString KEY_ECHO_ENABLED = wxT("echoEnabled"); const wxString KEY_LOG_ENABLED = wxT("logEnabled"); const wxString KEY_DRATS_ENABLED = wxT("dratsEnabled"); const wxString KEY_DTMF_ENABLED = wxT("dtmfEnabled"); -const wxString KEY_MOBILE_GPS_ENABLED = wxT("mobileGPSEnabled"); -const wxString KEY_MOBILE_GPS_ADDRESS = wxT("mobileGPSAddress"); -const wxString KEY_MOBILE_GPS_PORT = wxT("mobileGPSPort"); +const wxString KEY_GPSD_ENABLED = wxT("gpsdEnabled"); +const wxString KEY_GPSD_ADDRESS = wxT("gpsdAddress"); +const wxString KEY_GPSD_PORT = wxT("gpsdPort"); const wxString KEY_WINDOW_X = wxT("windowX"); const wxString KEY_WINDOW_Y = wxT("windowY"); @@ -284,9 +284,9 @@ const bool DEFAULT_INFO_ENABLED = true; const bool DEFAULT_ECHO_ENABLED = true; const bool DEFAULT_DRATS_ENABLED = false; const bool DEFAULT_DTMF_ENABLED = true; -const bool DEFAULT_MOBILE_GPS_ENABLED = false; -const wxString DEFAULT_MOBILE_GPS_ADDRESS = wxT("127.0.0.1"); -const unsigned int DEFAULT_MOBILE_GPS_PORT = 7834U; +const bool DEFAULT_GPSD_ENABLED = false; +const wxString DEFAULT_GPSD_ADDRESS = wxT("127.0.0.1"); +const wxString DEFAULT_GPSD_PORT = wxT("2947"); const int DEFAULT_WINDOW_X = -1; const int DEFAULT_WINDOW_Y = -1; @@ -477,9 +477,9 @@ m_echoEnabled(DEFAULT_ECHO_ENABLED), m_logEnabled(DEFAULT_LOG_ENABLED), m_dratsEnabled(DEFAULT_DRATS_ENABLED), m_dtmfEnabled(DEFAULT_DTMF_ENABLED), -m_mobileGPSEnabled(DEFAULT_MOBILE_GPS_ENABLED), -m_mobileGPSAddress(DEFAULT_MOBILE_GPS_ADDRESS), -m_mobileGPSPort(DEFAULT_MOBILE_GPS_PORT), +m_gpsdEnabled(DEFAULT_GPSD_ENABLED), +m_gpsdAddress(DEFAULT_GPSD_ADDRESS), +m_gpsdPort(DEFAULT_GPSD_PORT), m_x(DEFAULT_WINDOW_X), m_y(DEFAULT_WINDOW_Y) { @@ -893,12 +893,12 @@ m_y(DEFAULT_WINDOW_Y) m_config->Read(m_name + KEY_DTMF_ENABLED, &m_dtmfEnabled, DEFAULT_DTMF_ENABLED); - m_config->Read(m_name + KEY_MOBILE_GPS_ENABLED, &m_mobileGPSEnabled, DEFAULT_MOBILE_GPS_ENABLED); + m_config->Read(m_name + KEY_GPSD_ENABLED, &m_gpsdEnabled, DEFAULT_GPSD_ENABLED); - m_config->Read(m_name + KEY_MOBILE_GPS_ADDRESS, &m_mobileGPSAddress, DEFAULT_MOBILE_GPS_ADDRESS); + m_config->Read(m_name + KEY_GPSD_ADDRESS, &m_gpsdAddress, DEFAULT_GPSD_ADDRESS); - m_config->Read(m_name + KEY_MOBILE_GPS_PORT, &temp, long(DEFAULT_MOBILE_GPS_PORT)); - m_mobileGPSPort = (unsigned int)temp; + m_config->Read(m_name + KEY_GPSD_PORT, &temp, long(DEFAULT_GPSD_PORT)); + m_gpsdPort = (unsigned int)temp; m_config->Read(m_name + KEY_WINDOW_X, &temp, long(DEFAULT_WINDOW_X)); m_x = int(temp); @@ -1096,9 +1096,9 @@ m_echoEnabled(DEFAULT_ECHO_ENABLED), m_logEnabled(DEFAULT_LOG_ENABLED), m_dratsEnabled(DEFAULT_DRATS_ENABLED), m_dtmfEnabled(DEFAULT_DTMF_ENABLED), -m_mobileGPSEnabled(DEFAULT_MOBILE_GPS_ENABLED), -m_mobileGPSAddress(DEFAULT_MOBILE_GPS_ADDRESS), -m_mobileGPSPort(DEFAULT_MOBILE_GPS_PORT), +m_gpsdEnabled(DEFAULT_GPSD_ENABLED), +m_gpsdAddress(DEFAULT_GPSD_ADDRESS), +m_gpsdPort(DEFAULT_GPSD_PORT), m_x(DEFAULT_WINDOW_X), m_y(DEFAULT_WINDOW_Y) { @@ -1574,14 +1574,13 @@ m_y(DEFAULT_WINDOW_Y) } else if (key.IsSameAs(KEY_DTMF_ENABLED)) { val.ToLong(&temp1); m_dtmfEnabled = temp1 == 1L; - } else if (key.IsSameAs(KEY_MOBILE_GPS_ENABLED)) { + } else if (key.IsSameAs(KEY_GPSD_ENABLED)) { val.ToLong(&temp1); - m_mobileGPSEnabled = temp1 == 1L; - } else if (key.IsSameAs(KEY_MOBILE_GPS_ADDRESS)) { - m_mobileGPSAddress = val; - } else if (key.IsSameAs(KEY_MOBILE_GPS_PORT)) { - val.ToULong(&temp2); - m_mobileGPSPort = (unsigned int)temp2; + m_gpsdEnabled = temp1 == 1L; + } else if (key.IsSameAs(KEY_GPSD_ADDRESS)) { + m_gpsdAddress = val; + } else if (key.IsSameAs(KEY_GPSD_PORT)) { + m_gpsdPort = val; } else if (key.IsSameAs(KEY_WINDOW_X)) { val.ToLong(&temp1); m_x = int(temp1); @@ -2199,18 +2198,18 @@ void CIRCDDBGatewayConfig::setMiscellaneous(TEXT_LANG language, bool infoEnabled m_dtmfEnabled = dtmfEnabled; } -void CIRCDDBGatewayConfig::getMobileGPS(bool& enabled, wxString& address, unsigned int& port) const +void CIRCDDBGatewayConfig::getGPSD(bool& enabled, wxString& address, wxString& port) const { - enabled = m_mobileGPSEnabled; - address = m_mobileGPSAddress; - port = m_mobileGPSPort; + enabled = m_gpsdEnabled; + address = m_gpsdAddress; + port = m_gpsdPort; } -void CIRCDDBGatewayConfig::setMobileGPS(bool enabled, const wxString& address, unsigned int port) +void CIRCDDBGatewayConfig::setGPSD(bool enabled, const wxString& address, const wxString& port) { - m_mobileGPSEnabled = enabled; - m_mobileGPSAddress = address; - m_mobileGPSPort = port; + m_gpsdEnabled = enabled; + m_gpsdAddress = address; + m_gpsdPort = port; } void CIRCDDBGatewayConfig::getPosition(int& x, int& y) const @@ -2451,9 +2450,9 @@ bool CIRCDDBGatewayConfig::write() m_config->Write(m_name + KEY_LOG_ENABLED, m_logEnabled); m_config->Write(m_name + KEY_DRATS_ENABLED, m_dratsEnabled); m_config->Write(m_name + KEY_DTMF_ENABLED, m_dtmfEnabled); - m_config->Write(m_name + KEY_MOBILE_GPS_ENABLED, m_mobileGPSEnabled); - m_config->Write(m_name + KEY_MOBILE_GPS_ADDRESS, m_mobileGPSAddress); - m_config->Write(m_name + KEY_MOBILE_GPS_PORT, long(m_mobileGPSPort)); + m_config->Write(m_name + KEY_GPSD_ENABLED, m_gpsdEnabled); + m_config->Write(m_name + KEY_GPSD_ADDRESS, m_gpsdAddress); + m_config->Write(m_name + KEY_GPSD_PORT, m_gpsdPort); m_config->Write(m_name + KEY_WINDOW_X, long(m_x)); m_config->Write(m_name + KEY_WINDOW_Y, long(m_y)); m_config->Flush(); @@ -2660,9 +2659,9 @@ bool CIRCDDBGatewayConfig::write() buffer.Printf(wxT("%s=%d"), KEY_LOG_ENABLED.c_str(), m_logEnabled ? 1 : 0); file.AddLine(buffer); buffer.Printf(wxT("%s=%d"), KEY_DRATS_ENABLED.c_str(), m_dratsEnabled ? 1 : 0); file.AddLine(buffer); buffer.Printf(wxT("%s=%d"), KEY_DTMF_ENABLED.c_str(), m_dtmfEnabled ? 1 : 0); file.AddLine(buffer); - buffer.Printf(wxT("%s=%d"), KEY_MOBILE_GPS_ENABLED.c_str(), m_mobileGPSEnabled ? 1 : 0); file.AddLine(buffer); - buffer.Printf(wxT("%s=%s"), KEY_MOBILE_GPS_ADDRESS.c_str(), m_mobileGPSAddress.c_str()); file.AddLine(buffer); - buffer.Printf(wxT("%s=%u"), KEY_MOBILE_GPS_PORT.c_str(), m_mobileGPSPort); file.AddLine(buffer); + buffer.Printf(wxT("%s=%d"), KEY_GPSD_ENABLED.c_str(), m_gpsdEnabled ? 1 : 0); file.AddLine(buffer); + buffer.Printf(wxT("%s=%s"), KEY_GPSD_ADDRESS.c_str(), m_gpsdAddress.c_str()); file.AddLine(buffer); + buffer.Printf(wxT("%s=%s"), KEY_GPSD_PORT.c_str(), m_gpsdPort.c_str()); file.AddLine(buffer); buffer.Printf(wxT("%s=%d"), KEY_WINDOW_X.c_str(), m_x); file.AddLine(buffer); buffer.Printf(wxT("%s=%d"), KEY_WINDOW_Y.c_str(), m_y); file.AddLine(buffer); @@ -2677,3 +2676,4 @@ bool CIRCDDBGatewayConfig::write() return true; } + diff --git a/Common/IRCDDBGatewayConfig.h b/Common/IRCDDBGatewayConfig.h index 202eca0..c97eab6 100644 --- a/Common/IRCDDBGatewayConfig.h +++ b/Common/IRCDDBGatewayConfig.h @@ -112,8 +112,8 @@ public: void getMiscellaneous(TEXT_LANG& language, bool& infoEnabled, bool& echoEnabled, bool& logEnabled, bool& dratsEnabled, bool& dtmfEnabled) const; void setMiscellaneous(TEXT_LANG language, bool infoEnabled, bool echoEnabled, bool logEnabled, bool dratsEnabled, bool dtmfEnabled); - void getMobileGPS(bool& enabled, wxString& address, unsigned int& port) const; - void setMobileGPS(bool enabled, const wxString& address, unsigned int port); + void getGPSD(bool& enabled, wxString& address, wxString& port) const; + void setGPSD(bool enabled, const wxString& address, const wxString& port); void getPosition(int& x, int& y) const; void setPosition(int x, int y); @@ -307,9 +307,9 @@ private: bool m_logEnabled; bool m_dratsEnabled; bool m_dtmfEnabled; - bool m_mobileGPSEnabled; - wxString m_mobileGPSAddress; - unsigned int m_mobileGPSPort; + bool m_gpsdEnabled; + wxString m_gpsdAddress; + wxString m_gpsdPort; int m_x; int m_y; }; diff --git a/Common/Version.h b/Common/Version.h index cfe767d..9e76233 100644 --- a/Common/Version.h +++ b/Common/Version.h @@ -24,9 +24,9 @@ const wxString VENDOR_NAME = wxT("G4KLX"); #if defined(__WXDEBUG__) -const wxString VERSION = wxT("20200601 - DEBUG"); +const wxString VERSION = wxT("20200603 - DEBUG"); #else -const wxString VERSION = wxT("20190601"); +const wxString VERSION = wxT("20190603"); #endif #endif diff --git a/GUICommon/MobileGPSSet.cpp b/GUICommon/GPSDSet.cpp similarity index 79% rename from GUICommon/MobileGPSSet.cpp rename to GUICommon/GPSDSet.cpp index ce67cb4..b95838a 100644 --- a/GUICommon/MobileGPSSet.cpp +++ b/GUICommon/GPSDSet.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018 by Jonathan Naylor G4KLX + * Copyright (C) 2018,2020 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 @@ -16,7 +16,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include "MobileGPSSet.h" +#include "GPSDSet.h" const unsigned int CONTROL_WIDTH1 = 130U; const unsigned int CONTROL_WIDTH2 = 80U; @@ -26,7 +26,7 @@ const unsigned int PORT_LENGTH = 5U; const unsigned int BORDER_SIZE = 5U; -CMobileGPSSet::CMobileGPSSet(wxWindow* parent, int id, const wxString& title, bool enabled, const wxString& address, unsigned int port) : +CGPSDSet::CGPSDSet(wxWindow* parent, int id, const wxString& title, bool enabled, const wxString& address, const wxString& port) : wxPanel(parent, id), m_title(title), m_enabled(NULL), @@ -54,10 +54,7 @@ m_port(NULL) wxStaticText* portLabel = new wxStaticText(this, -1, _("Port")); sizer->Add(portLabel, 0, wxALL | wxALIGN_RIGHT, BORDER_SIZE); - wxString buffer; - buffer.Printf(wxT("%u"), port); - - m_port = new CPortTextCtrl(this, -1, buffer, wxDefaultPosition, wxSize(CONTROL_WIDTH2, -1)); + m_port = new CPortTextCtrl(this, -1, port, wxDefaultPosition, wxSize(CONTROL_WIDTH2, -1)); m_port->SetMaxLength(PORT_LENGTH); sizer->Add(m_port, 0, wxALL | wxALIGN_LEFT, BORDER_SIZE); @@ -67,11 +64,11 @@ m_port(NULL) } -CMobileGPSSet::~CMobileGPSSet() +CGPSDSet::~CGPSDSet() { } -bool CMobileGPSSet::Validate() +bool CGPSDSet::Validate() { if (m_enabled->GetCurrentSelection() == wxNOT_FOUND) return false; @@ -84,9 +81,10 @@ bool CMobileGPSSet::Validate() return false; } - unsigned int port = getPort(); + unsigned long port; + getPort().ToULong(&port); - if (port == 0U || port > 65535U) { + if (port == 0UL || port > 65535UL) { wxMessageDialog dialog(this, _("The Mobile GPS Port is not valid"), m_title + _(" Error"), wxICON_ERROR); dialog.ShowModal(); return false; @@ -95,7 +93,7 @@ bool CMobileGPSSet::Validate() return true; } -bool CMobileGPSSet::getEnabled() const +bool CGPSDSet::getEnabled() const { int c = m_enabled->GetCurrentSelection(); if (c == wxNOT_FOUND) @@ -104,15 +102,13 @@ bool CMobileGPSSet::getEnabled() const return c == 1; } -wxString CMobileGPSSet::getAddress() const +wxString CGPSDSet::getAddress() const { return m_address->GetValue(); } -unsigned int CMobileGPSSet::getPort() const +wxString CGPSDSet::getPort() const { - unsigned long n; - m_port->GetValue().ToULong(&n); - - return n; + return m_port->GetValue(); } + diff --git a/GUICommon/MobileGPSSet.h b/GUICommon/GPSDSet.h similarity index 71% rename from GUICommon/MobileGPSSet.h rename to GUICommon/GPSDSet.h index b9813e1..85e7e5e 100644 --- a/GUICommon/MobileGPSSet.h +++ b/GUICommon/GPSDSet.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018 by Jonathan Naylor G4KLX + * Copyright (C) 2018,2020 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 @@ -16,8 +16,8 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifndef MobileGPSSet_H -#define MobileGPSSet_H +#ifndef GPSDSet_H +#define GPSDSet_H #include "AddressTextCtrl.h" #include "PortTextCtrl.h" @@ -25,16 +25,16 @@ #include -class CMobileGPSSet: public wxPanel { +class CGPSDSet: public wxPanel { public: - CMobileGPSSet(wxWindow* parent, int id, const wxString& title, bool enabled, const wxString& address, unsigned int port); - virtual ~CMobileGPSSet(); + CGPSDSet(wxWindow* parent, int id, const wxString& title, bool enabled, const wxString& address, const wxString& port); + virtual ~CGPSDSet(); virtual bool Validate(); - virtual bool getEnabled() const; - virtual wxString getAddress() const; - virtual unsigned int getPort() const; + virtual bool getEnabled() const; + virtual wxString getAddress() const; + virtual wxString getPort() const; private: wxString m_title; diff --git a/GUICommon/Makefile b/GUICommon/Makefile index c3cb0a0..4c3524e 100644 --- a/GUICommon/Makefile +++ b/GUICommon/Makefile @@ -1,4 +1,4 @@ -OBJECTS = AddressTextCtrl.o CallsignTextCtrl.o DCSSet.o DescriptionTextCtrl.o DExtraSet.o DPlusSet.o DPRSSet.o MobileGPSSet.o PortTextCtrl.o RemoteSet.o \ +OBJECTS = AddressTextCtrl.o CallsignTextCtrl.o DCSSet.o DescriptionTextCtrl.o DExtraSet.o DPlusSet.o DPRSSet.o GPSDSet.o PortTextCtrl.o RemoteSet.o \ RepeaterDataSet.o RepeaterInfoSet.o RestrictedTextCtrl.o StarNetSet.o XLXSet.o .PHONY: all diff --git a/Makefile b/Makefile index 3849880..cf5bae5 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,7 @@ ifeq ($(BUILD), debug) else ifeq ($(BUILD), release) export CFLAGS := $(CFLAGS) $(RELEASEFLAGS) endif -export LIBS := $(shell wx-config --libs base,net) +export LIBS := $(shell wx-config --libs base,net) -lgps export LDFLAGS := .PHONY: all diff --git a/MakefileGUI b/MakefileGUI index 05aa28a..15fd13d 100644 --- a/MakefileGUI +++ b/MakefileGUI @@ -15,8 +15,8 @@ endif export CXX := $(shell wx-config --cxx) export CFLAGS := -O2 -Wall $(shell wx-config --cxxflags) -DLOG_DIR='$(LOGDIR)' -DCONF_DIR='$(CONFDIR)' -DDATA_DIR='$(DATADIR)' -export GUILIBS := $(shell wx-config --libs adv,core,base) -export LIBS := $(shell wx-config --libs base,net) +export GUILIBS := $(shell wx-config --libs adv,core,base) -lgps +export LIBS := $(shell wx-config --libs base,net) -lgps export LDFLAGS := .PHONY: all diff --git a/ircDDBGateway/IRCDDBGatewayApp.cpp b/ircDDBGateway/IRCDDBGatewayApp.cpp index 2f210d6..930b1d5 100644 --- a/ircDDBGateway/IRCDDBGatewayApp.cpp +++ b/ircDDBGateway/IRCDDBGatewayApp.cpp @@ -290,11 +290,10 @@ void CIRCDDBGatewayApp::createThread() m_config->getMiscellaneous(language, infoEnabled, echoEnabled, logEnabled, dratsEnabled, dtmfEnabled); wxLogInfo(wxT("Language: %d, info enabled: %d, echo enabled: %d, log enabled : %d, D-RATS enabled: %d, DTMF control enabled: %d"), int(language), int(infoEnabled), int(echoEnabled), int(logEnabled), int(dratsEnabled), int(dtmfEnabled)); - bool mobileGPSEnabled; - wxString mobileGPSAddress; - unsigned int mobileGPSPort; - m_config->getMobileGPS(mobileGPSEnabled, mobileGPSAddress, mobileGPSPort); - wxLogInfo(wxT("Mobile GPS: %d, address: %s, port: %u"), int(mobileGPSEnabled), mobileGPSAddress.c_str(), mobileGPSPort); + bool gpsdEnabled; + wxString gpsdAddress, gpsdPort; + m_config->getGPSD(gpsdEnabled, gpsdAddress, gpsdPort); + wxLogInfo(wxT("GPSD: %d, address: %s, port: %s"), int(gpsdEnabled), gpsdAddress.c_str(), gpsdPort.c_str()); CIcomRepeaterProtocolHandler* icomRepeaterHandler = NULL; CHBRepeaterProtocolHandler* hbRepeaterHandler = NULL; @@ -372,8 +371,8 @@ void CIRCDDBGatewayApp::createThread() thread->addRepeater(callsign1, repeaterBand1, repeaterAddress1, repeaterPort1, repeaterType1, reflector1, atStartup1, reconnect1, dratsEnabled, frequency1, offset1, range1, latitude1, longitude1, agl1, description11, description12, url1, icomRepeaterHandler, band11, band12, band13); if (aprs != NULL) { - if (mobileGPSEnabled) - aprs->setPortMobile(callsign1, repeaterBand1, frequency1, offset1, range1, mobileGPSAddress, mobileGPSPort); + if (gpsdEnabled) + aprs->setPortGPSD(callsign1, repeaterBand1, frequency1, offset1, range1, gpsdAddress, gpsdPort); else aprs->setPortFixed(callsign1, repeaterBand1, frequency1, offset1, range1, latitude1, longitude1, agl1); } @@ -383,8 +382,8 @@ void CIRCDDBGatewayApp::createThread() thread->addRepeater(callsign1, repeaterBand1, repeaterAddress1, repeaterPort1, repeaterType1, reflector1, atStartup1, reconnect1, dratsEnabled, frequency1, offset1, range1, latitude1, longitude1, agl1, description11, description12, url1, hbRepeaterHandler); if (aprs != NULL) { - if (mobileGPSEnabled) - aprs->setPortMobile(callsign1, repeaterBand1, frequency1, offset1, range1, mobileGPSAddress, mobileGPSPort); + if (gpsdEnabled) + aprs->setPortGPSD(callsign1, repeaterBand1, frequency1, offset1, range1, gpsdAddress, gpsdPort); else aprs->setPortFixed(callsign1, repeaterBand1, frequency1, offset1, range1, latitude1, longitude1, agl1); } @@ -468,8 +467,8 @@ void CIRCDDBGatewayApp::createThread() thread->addRepeater(callsign2, repeaterBand2, repeaterAddress2, repeaterPort2, repeaterType2, reflector2, atStartup2, reconnect2, dratsEnabled, frequency2, offset2, range2, latitude2, longitude2, agl2, description21, description22, url2, icomRepeaterHandler, band21, band22, band23); if (aprs != NULL) { - if (mobileGPSEnabled) - aprs->setPortMobile(callsign2, repeaterBand2, frequency2, offset2, range2, mobileGPSAddress, mobileGPSPort); + if (gpsdEnabled) + aprs->setPortGPSD(callsign2, repeaterBand2, frequency2, offset2, range2, gpsdAddress, gpsdPort); else aprs->setPortFixed(callsign2, repeaterBand2, frequency2, offset2, range2, latitude2, longitude2, agl2); } @@ -479,8 +478,8 @@ void CIRCDDBGatewayApp::createThread() thread->addRepeater(callsign2, repeaterBand2, repeaterAddress2, repeaterPort2, repeaterType2, reflector2, atStartup2, reconnect2, dratsEnabled, frequency2, offset2, range2, latitude2, longitude2, agl2, description21, description22, url2, hbRepeaterHandler); if (aprs != NULL) { - if (mobileGPSEnabled) - aprs->setPortMobile(callsign2, repeaterBand2, frequency2, offset2, range2, mobileGPSAddress, mobileGPSPort); + if (gpsdEnabled) + aprs->setPortGPSD(callsign2, repeaterBand2, frequency2, offset2, range2, gpsdAddress, gpsdPort); else aprs->setPortFixed(callsign2, repeaterBand2, frequency2, offset2, range2, latitude2, longitude2, agl2); } @@ -568,8 +567,8 @@ void CIRCDDBGatewayApp::createThread() thread->addRepeater(callsign3, repeaterBand3, repeaterAddress3, repeaterPort3, repeaterType3, reflector3, atStartup3, reconnect3, dratsEnabled, frequency3, offset3, range3, latitude3, longitude3, agl3, description31, description32, url3, icomRepeaterHandler, band31, band32, band33); if (aprs != NULL) { - if (mobileGPSEnabled) - aprs->setPortMobile(callsign3, repeaterBand3, frequency3, offset3, range3, mobileGPSAddress, mobileGPSPort); + if (gpsdEnabled) + aprs->setPortGPSD(callsign3, repeaterBand3, frequency3, offset3, range3, gpsdAddress, gpsdPort); else aprs->setPortFixed(callsign3, repeaterBand3, frequency3, offset3, range3, latitude3, longitude3, agl3); } @@ -579,8 +578,8 @@ void CIRCDDBGatewayApp::createThread() thread->addRepeater(callsign3, repeaterBand3, repeaterAddress3, repeaterPort3, repeaterType3, reflector3, atStartup3, reconnect3, dratsEnabled, frequency3, offset3, range3, latitude3, longitude3, agl3, description31, description32, url3, hbRepeaterHandler); if (aprs != NULL) { - if (mobileGPSEnabled) - aprs->setPortMobile(callsign3, repeaterBand3, frequency3, offset3, range3, mobileGPSAddress, mobileGPSPort); + if (gpsdEnabled) + aprs->setPortGPSD(callsign3, repeaterBand3, frequency3, offset3, range3, gpsdAddress, gpsdPort); else aprs->setPortFixed(callsign3, repeaterBand3, frequency3, offset3, range3, latitude3, longitude3, agl3); } @@ -672,8 +671,8 @@ void CIRCDDBGatewayApp::createThread() thread->addRepeater(callsign4, repeaterBand4, repeaterAddress4, repeaterPort4, repeaterType4, reflector4, atStartup4, reconnect4, dratsEnabled, frequency4, offset4, range4, latitude4, longitude4, agl4, description41, description42, url4, icomRepeaterHandler, band41, band42, band43); if (aprs != NULL) { - if (mobileGPSEnabled) - aprs->setPortMobile(callsign4, repeaterBand4, frequency4, offset4, range4, mobileGPSAddress, mobileGPSPort); + if (gpsdEnabled) + aprs->setPortGPSD(callsign4, repeaterBand4, frequency4, offset4, range4, gpsdAddress, gpsdPort); else aprs->setPortFixed(callsign4, repeaterBand4, frequency4, offset4, range4, latitude4, longitude4, agl4); } @@ -683,8 +682,8 @@ void CIRCDDBGatewayApp::createThread() thread->addRepeater(callsign4, repeaterBand4, repeaterAddress4, repeaterPort4, repeaterType4, reflector4, atStartup4, reconnect4, dratsEnabled, frequency4, offset4, range4, latitude4, longitude4, agl4, description41, description42, url4, hbRepeaterHandler); if (aprs != NULL) { - if (mobileGPSEnabled) - aprs->setPortMobile(callsign4, repeaterBand4, frequency4, offset4, range4, mobileGPSAddress, mobileGPSPort); + if (gpsdEnabled) + aprs->setPortGPSD(callsign4, repeaterBand4, frequency4, offset4, range4, gpsdAddress, gpsdPort); else aprs->setPortFixed(callsign4, repeaterBand4, frequency4, offset4, range4, latitude4, longitude4, agl4); } diff --git a/ircDDBGateway/IRCDDBGatewayAppD.cpp b/ircDDBGateway/IRCDDBGatewayAppD.cpp index 5008394..4a3c900 100644 --- a/ircDDBGateway/IRCDDBGatewayAppD.cpp +++ b/ircDDBGateway/IRCDDBGatewayAppD.cpp @@ -297,11 +297,10 @@ bool CIRCDDBGatewayAppD::createThread() config.getMiscellaneous(language, infoEnabled, echoEnabled, logEnabled, dratsEnabled, dtmfEnabled); wxLogInfo(wxT("Language: %d, info enabled: %d, echo enabled: %d, log enabled : %d, D-RATS enabled: %d, DTMF control enabled: %d"), int(language), int(infoEnabled), int(echoEnabled), int(logEnabled), int(dratsEnabled), int(dtmfEnabled)); - bool mobileGPSEnabled; - wxString mobileGPSAddress; - unsigned int mobileGPSPort; - config.getMobileGPS(mobileGPSEnabled, mobileGPSAddress, mobileGPSPort); - wxLogInfo(wxT("Mobile GPS: %d, address: %s, port: %u"), int(mobileGPSEnabled), mobileGPSAddress.c_str(), mobileGPSPort); + bool gpsdEnabled; + wxString gpsdAddress, gpsdPort; + config.getGPSD(gpsdEnabled, gpsdAddress, gpsdPort); + wxLogInfo(wxT("GPSD: %d, address: %s, port: %s"), int(gpsdEnabled), gpsdAddress.c_str(), gpsdPort.c_str()); CIcomRepeaterProtocolHandler* icomRepeaterHandler = NULL; CHBRepeaterProtocolHandler* hbRepeaterHandler = NULL; @@ -379,8 +378,8 @@ bool CIRCDDBGatewayAppD::createThread() m_thread->addRepeater(callsign1, repeaterBand1, repeaterAddress1, repeaterPort1, repeaterType1, reflector1, atStartup1, reconnect1, dratsEnabled, frequency1, offset1, range1, latitude1, longitude1, agl1, description11, description12, url1, icomRepeaterHandler, band11, band12, band13); if (aprs != NULL) { - if (mobileGPSEnabled) - aprs->setPortMobile(callsign1, repeaterBand1, frequency1, offset1, range1, mobileGPSAddress, mobileGPSPort); + if (gpsdEnabled) + aprs->setPortGPSD(callsign1, repeaterBand1, frequency1, offset1, range1, gpsdAddress, gpsdPort); else aprs->setPortFixed(callsign1, repeaterBand1, frequency1, offset1, range1, latitude1, longitude1, agl1); } @@ -390,8 +389,8 @@ bool CIRCDDBGatewayAppD::createThread() m_thread->addRepeater(callsign1, repeaterBand1, repeaterAddress1, repeaterPort1, repeaterType1, reflector1, atStartup1, reconnect1, dratsEnabled, frequency1, offset1, range1, latitude1, longitude1, agl1, description11, description12, url1, hbRepeaterHandler); if (aprs != NULL) { - if (mobileGPSEnabled) - aprs->setPortMobile(callsign1, repeaterBand1, frequency1, offset1, range1, mobileGPSAddress, mobileGPSPort); + if (gpsdEnabled) + aprs->setPortGPSD(callsign1, repeaterBand1, frequency1, offset1, range1, gpsdAddress, gpsdPort); else aprs->setPortFixed(callsign1, repeaterBand1, frequency1, offset1, range1, latitude1, longitude1, agl1); } @@ -475,8 +474,8 @@ bool CIRCDDBGatewayAppD::createThread() m_thread->addRepeater(callsign2, repeaterBand2, repeaterAddress2, repeaterPort2, repeaterType2, reflector2, atStartup2, reconnect2, dratsEnabled, frequency2, offset2, range2, latitude2, longitude2, agl2, description21, description22, url2, icomRepeaterHandler, band21, band22, band23); if (aprs != NULL) { - if (mobileGPSEnabled) - aprs->setPortMobile(callsign2, repeaterBand2, frequency2, offset2, range2, mobileGPSAddress, mobileGPSPort); + if (gpsdEnabled) + aprs->setPortGPSD(callsign2, repeaterBand2, frequency2, offset2, range2, gpsdAddress, gpsdPort); else aprs->setPortFixed(callsign2, repeaterBand2, frequency2, offset2, range2, latitude2, longitude2, agl2); } @@ -486,8 +485,8 @@ bool CIRCDDBGatewayAppD::createThread() m_thread->addRepeater(callsign2, repeaterBand2, repeaterAddress2, repeaterPort2, repeaterType2, reflector2, atStartup2, reconnect2, dratsEnabled, frequency2, offset2, range2, latitude2, longitude2, agl2, description21, description22, url2, hbRepeaterHandler); if (aprs != NULL) { - if (mobileGPSEnabled) - aprs->setPortMobile(callsign2, repeaterBand2, frequency2, offset2, range2, mobileGPSAddress, mobileGPSPort); + if (gpsdEnabled) + aprs->setPortGPSD(callsign2, repeaterBand2, frequency2, offset2, range2, gpsdAddress, gpsdPort); else aprs->setPortFixed(callsign2, repeaterBand2, frequency2, offset2, range2, latitude2, longitude2, agl1); } @@ -575,8 +574,8 @@ bool CIRCDDBGatewayAppD::createThread() m_thread->addRepeater(callsign3, repeaterBand3, repeaterAddress3, repeaterPort3, repeaterType3, reflector3, atStartup3, reconnect3, dratsEnabled, frequency3, offset3, range3, latitude3, longitude3, agl3, description31, description32, url3, icomRepeaterHandler, band31, band32, band33); if (aprs != NULL) { - if (mobileGPSEnabled) - aprs->setPortMobile(callsign3, repeaterBand3, frequency3, offset3, range3, mobileGPSAddress, mobileGPSPort); + if (gpsdEnabled) + aprs->setPortGPSD(callsign3, repeaterBand3, frequency3, offset3, range3, gpsdAddress, gpsdPort); else aprs->setPortFixed(callsign3, repeaterBand3, frequency3, offset3, range3, latitude3, longitude3, agl3); } @@ -586,8 +585,8 @@ bool CIRCDDBGatewayAppD::createThread() m_thread->addRepeater(callsign3, repeaterBand3, repeaterAddress3, repeaterPort3, repeaterType3, reflector3, atStartup3, reconnect3, dratsEnabled, frequency3, offset3, range3, latitude3, longitude3, agl3, description31, description32, url3, hbRepeaterHandler); if (aprs != NULL) { - if (mobileGPSEnabled) - aprs->setPortMobile(callsign3, repeaterBand3, frequency3, offset3, range3, mobileGPSAddress, mobileGPSPort); + if (gpsdEnabled) + aprs->setPortGPSD(callsign3, repeaterBand3, frequency3, offset3, range3, gpsdAddress, gpsdPort); else aprs->setPortFixed(callsign3, repeaterBand3, frequency3, offset3, range3, latitude3, longitude3, agl3); } @@ -679,8 +678,8 @@ bool CIRCDDBGatewayAppD::createThread() m_thread->addRepeater(callsign4, repeaterBand4, repeaterAddress4, repeaterPort4, repeaterType4, reflector4, atStartup4, reconnect4, dratsEnabled, frequency4, offset4, range4, latitude4, longitude4, agl4, description41, description42, url4, icomRepeaterHandler, band41, band42, band43); if (aprs != NULL) { - if (mobileGPSEnabled) - aprs->setPortMobile(callsign4, repeaterBand4, frequency4, offset4, range4, mobileGPSAddress, mobileGPSPort); + if (gpsdEnabled) + aprs->setPortGPSD(callsign4, repeaterBand4, frequency4, offset4, range4, gpsdAddress, gpsdPort); else aprs->setPortFixed(callsign4, repeaterBand4, frequency4, offset4, range4, latitude4, longitude4, agl4); } @@ -690,8 +689,8 @@ bool CIRCDDBGatewayAppD::createThread() m_thread->addRepeater(callsign4, repeaterBand4, repeaterAddress4, repeaterPort4, repeaterType4, reflector4, atStartup4, reconnect4, dratsEnabled, frequency4, offset4, range4, latitude4, longitude4, agl4, description41, description42, url4, hbRepeaterHandler); if (aprs != NULL) { - if (mobileGPSEnabled) - aprs->setPortMobile(callsign4, repeaterBand4, frequency4, offset4, range4, mobileGPSAddress, mobileGPSPort); + if (gpsdEnabled) + aprs->setPortGPSD(callsign4, repeaterBand4, frequency4, offset4, range4, gpsdAddress, gpsdPort); else aprs->setPortFixed(callsign4, repeaterBand4, frequency4, offset4, range4, latitude4, longitude4, agl4); } diff --git a/ircDDBGatewayConfig/IRCDDBGatewayConfigFrame.cpp b/ircDDBGatewayConfig/IRCDDBGatewayConfigFrame.cpp index c880252..2e11c32 100644 --- a/ircDDBGatewayConfig/IRCDDBGatewayConfigFrame.cpp +++ b/ircDDBGatewayConfig/IRCDDBGatewayConfigFrame.cpp @@ -65,7 +65,7 @@ m_starNet3(NULL), m_starNet4(NULL), m_starNet5(NULL), m_remote(NULL), -m_mobileGPS(NULL), +m_gpsd(NULL), m_miscellaneous(NULL) { SetMenuBar(createMenuBar()); @@ -314,13 +314,12 @@ m_miscellaneous(NULL) m_remote = new CRemoteSet(noteBook, -1, APPLICATION_NAME, remoteEnabled, remotePassword, remotePort); noteBook->AddPage(m_remote, wxT("Remote"), false); - bool mobileGPSEnabled; - wxString mobileGPSAddress; - unsigned int mobileGPSPort; - m_config->getMobileGPS(mobileGPSEnabled, mobileGPSAddress, mobileGPSPort); + bool gpsdEnabled; + wxString gpsdAddress, gpsdPort; + m_config->getGPSD(gpsdEnabled, gpsdAddress, gpsdPort); - m_mobileGPS = new CMobileGPSSet(noteBook, -1, APPLICATION_NAME, mobileGPSEnabled, mobileGPSAddress, mobileGPSPort); - noteBook->AddPage(m_mobileGPS, wxT("Mobile GPS"), false); + m_gpsd = new CGPSDSet(noteBook, -1, APPLICATION_NAME, gpsdEnabled, gpsdAddress, gpsdPort); + noteBook->AddPage(m_gpsd, wxT("GPSD"), false); TEXT_LANG language; bool infoEnabled, echoEnabled, logEnabled, dratsEnabled, dtmfEnabled; @@ -379,7 +378,7 @@ void CIRCDDBGatewayConfigFrame::onSave(wxCommandEvent&) !m_repeaterInfo4->Validate() || !m_ircDDB->Validate() || !m_ircDDB2->Validate() || !m_ircDDB3->Validate() || !m_ircDDB4->Validate() || !m_dprs->Validate() || !m_dplus->Validate() || !m_dcs->Validate() || !m_xlx->Validate() || !m_starNet1->Validate() || !m_starNet2->Validate() || !m_starNet3->Validate() || !m_starNet4->Validate() || - !m_starNet5->Validate() || !m_remote->Validate() || !m_mobileGPS->Validate() || !m_miscellaneous->Validate()) + !m_starNet5->Validate() || !m_remote->Validate() || !m_gpsd->Validate() || !m_miscellaneous->Validate()) return; GATEWAY_TYPE gatewayType = m_gateway->getType(); @@ -612,10 +611,10 @@ void CIRCDDBGatewayConfigFrame::onSave(wxCommandEvent&) unsigned int remotePort = m_remote->getPort(); m_config->setRemote(remoteEnabled, remotePassword, remotePort); - bool mobileGPSEnabled = m_mobileGPS->getEnabled(); - wxString mobileGPSAddress = m_mobileGPS->getAddress(); - unsigned int mobileGPSPort = m_mobileGPS->getPort(); - m_config->setMobileGPS(mobileGPSEnabled, mobileGPSAddress, mobileGPSPort); + bool gpsdEnabled = m_gpsd->getEnabled(); + wxString gpsdAddress = m_gpsd->getAddress(); + wxString gpsdPort = m_gpsd->getPort(); + m_config->setGPSD(gpsdEnabled, gpsdAddress, gpsdPort); TEXT_LANG language = m_miscellaneous->getLanguage(); bool infoEnabled = m_miscellaneous->getInfoEnabled(); diff --git a/ircDDBGatewayConfig/IRCDDBGatewayConfigFrame.h b/ircDDBGatewayConfig/IRCDDBGatewayConfigFrame.h index 2970aad..b32d972 100644 --- a/ircDDBGatewayConfig/IRCDDBGatewayConfigFrame.h +++ b/ircDDBGatewayConfig/IRCDDBGatewayConfigFrame.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2014,2018 by Jonathan Naylor G4KLX + * Copyright (C) 2010-2014,2018,2020 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 @@ -25,12 +25,12 @@ #include "IRCDDBGatewayConfig.h" #include "RepeaterInfoSet.h" #include "RepeaterDataSet.h" -#include "MobileGPSSet.h" #include "StarNetSet.h" #include "RemoteSet.h" #include "DExtraSet.h" #include "DPlusSet.h" #include "DPRSSet.h" +#include "GPSDSet.h" #include "DCSSet.h" #include "XLXSet.h" #include "Defs.h" @@ -73,7 +73,7 @@ private: CStarNetSet* m_starNet4; CStarNetSet* m_starNet5; CRemoteSet* m_remote; - CMobileGPSSet* m_mobileGPS; + CGPSDSet* m_gpsd; CIRCDDBGatewayConfigMiscellaneousSet* m_miscellaneous; DECLARE_EVENT_TABLE() From 1a83eb4f52365819568a4a8bfd28b444ee6362b3 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Thu, 4 Jun 2020 08:16:48 +0100 Subject: [PATCH 161/166] Fix up aprstransmit. --- APRSTransmit/APRSTransmit.cpp | 4 +- APRSTransmit/APRSTransmitAppD.cpp | 62 ++++++++--------------------- APRSTransmit/APRSTransmitAppD.h | 10 ++--- GUICommon/GUICommon.vcxproj | 6 +-- GUICommon/GUICommon.vcxproj.filters | 14 +++---- Makefile | 2 +- MakefileGUI | 2 +- 7 files changed, 36 insertions(+), 64 deletions(-) diff --git a/APRSTransmit/APRSTransmit.cpp b/APRSTransmit/APRSTransmit.cpp index e50393d..b5ae92f 100644 --- a/APRSTransmit/APRSTransmit.cpp +++ b/APRSTransmit/APRSTransmit.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014 by Jonathan Naylor G4KLX + * Copyright (C) 2014,2020 by Jonathan Naylor G4KLX * APRSTransmit Copyright (C) 2015 Geoffrey Merck F4FXL / KC3FRA * * This program is free software; you can redistribute it and/or modify @@ -24,7 +24,7 @@ CAPRSTransmit::CAPRSTransmit(const wxString& callsign, const wxString& text) : -m_socket(wxEmptyString, 0U), +m_socket(), m_repeaterCallsign(callsign), m_APRSCallsign(callsign), m_text(text) diff --git a/APRSTransmit/APRSTransmitAppD.cpp b/APRSTransmit/APRSTransmitAppD.cpp index 7d69438..272e0b2 100644 --- a/APRSTransmit/APRSTransmitAppD.cpp +++ b/APRSTransmit/APRSTransmitAppD.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014,2018 by Jonathan Naylor G4KLX + * Copyright (C) 2014,2018,2020 by Jonathan Naylor G4KLX * APRSTransmit Copyright (C) 2015 Geoffrey Merck F4FXL / KC3FRA * * This program is free software; you can redistribute it and/or modify @@ -20,7 +20,6 @@ #include "DStarDefines.h" #include "APRSTransmit.h" #include "APRSTransmitAppD.h" -#include "APRSWriterThread.h" #include #include @@ -33,10 +32,8 @@ #endif const wxChar* REPEATER_PARAM = wxT("Repeater"); -const wxChar* APRS_PASSWORD = wxT("password"); const wxChar* APRS_HOST = wxT("host"); const wxChar* APRS_PORT = wxT("port"); -const wxChar* APRS_FILTER = wxT("filter"); const wxChar* DAEMON_SWITCH = wxT("daemon"); static CAPRSTransmitAppD* m_aprsTransmit = NULL; @@ -46,12 +43,6 @@ static void handler(int signum) m_aprsTransmit->kill(); } -static void aprsFrameCallback(const wxString& aprsFrame) -{ - //wxLogMessage(wxT("Received APRS Frame : ") + aprsFrame); - m_aprsTransmit->m_aprsFramesQueue->addData(new wxString(aprsFrame.Clone())); -} - int main(int argc, char** argv) { bool res = ::wxInitialize(); @@ -62,10 +53,8 @@ int main(int argc, char** argv) wxCmdLineParser parser(argc, argv); parser.AddParam(REPEATER_PARAM, wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL); - parser.AddOption(APRS_PASSWORD, wxEmptyString, wxEmptyString, wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL); parser.AddOption(APRS_HOST, wxEmptyString, wxEmptyString, wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL); parser.AddOption(APRS_PORT, wxEmptyString, wxEmptyString, wxCMD_LINE_VAL_NUMBER, wxCMD_LINE_PARAM_OPTIONAL); - parser.AddOption(APRS_FILTER, wxEmptyString, wxEmptyString, wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL); parser.AddSwitch(DAEMON_SWITCH, wxEmptyString, wxEmptyString, wxCMD_LINE_PARAM_OPTIONAL); int cmd = parser.Parse(); @@ -75,7 +64,7 @@ int main(int argc, char** argv) } if (parser.GetParamCount() < 1U) { - ::fprintf(stderr, "aprstransmitd: invalid command line usage: aprstransmitd [-password ] [-host ] [-port ] [-filter [; [-host ] [-port ] [-daemon] exiting\n"); ::wxUninitialize(); return 1; } @@ -91,10 +80,6 @@ int main(int argc, char** argv) } repeater.Replace(wxT("_"), wxT(" ")); repeater.MakeUpper(); - - wxString aprsPassword; - if (!parser.Found(APRS_PASSWORD, &aprsPassword)) - aprsPassword = wxT("00000"); long aprsPort; if (!parser.Found(APRS_PORT, &aprsPort)) @@ -104,18 +89,10 @@ int main(int argc, char** argv) if (!parser.Found(APRS_HOST, &aprsHost)) aprsHost = wxT("rotate.aprs2.net"); - wxString aprsFilter; - if (!parser.Found(APRS_FILTER, &aprsFilter)) { - /* no filter specified on command line, - build one which will tell the APRS server to pass - us all stations 50km around our repeater */ - aprsFilter = wxT("m/50"); - } - bool daemon = parser.Found(DAEMON_SWITCH); #if defined(__WINDOWS__) - m_aprsTransmit = new CAPRSTransmitAppD(repeater, aprsPassword, aprsHost, aprsPort, aprsFilter, daemon); + m_aprsTransmit = new CAPRSTransmitAppD(repeater, aprsHost, aprsPort, daemon); if (!m_aprsTransmit->init()) { ::wxUninitialize(); return 1; @@ -148,7 +125,7 @@ int main(int argc, char** argv) ::fclose(fp); } - m_aprsTransmit = new CAPRSTransmitAppD(repeater, aprsPassword, aprsHost, aprsPort, aprsFilter, daemon); + m_aprsTransmit = new CAPRSTransmitAppD(repeater, aprsHost, aprsPort, daemon); if (!m_aprsTransmit->init()) { ::wxUninitialize(); return 1; @@ -167,14 +144,12 @@ int main(int argc, char** argv) -CAPRSTransmitAppD::CAPRSTransmitAppD(const wxString& repeater, const wxString& aprsPassword, const wxString& aprsHost, unsigned int aprsPort, const wxString& aprsFilter, bool daemon) : +CAPRSTransmitAppD::CAPRSTransmitAppD(const wxString& repeater, const wxString& aprsHost, unsigned int aprsPort, bool daemon) : m_aprsFramesQueue(NULL), m_repeater(repeater), -m_aprsPassword(aprsPassword), m_aprsHost(aprsHost), -m_aprsFilter(aprsFilter), m_aprsPort(aprsPort), -m_aprsThread(NULL), +m_aprsSocket(NULL), m_run(false), m_checker(NULL), m_daemon(daemon) @@ -226,9 +201,8 @@ void CAPRSTransmitAppD::run() if(m_run) return; m_aprsFramesQueue = new CRingBuffer(30U); - m_aprsThread = new CAPRSWriterThread(m_repeater, m_aprsPassword, wxT("0.0.0.0"), m_aprsHost, m_aprsPort, m_aprsFilter, wxT("APRSTransmit 1.1")); - m_aprsThread->setReadAPRSCallback(aprsFrameCallback); - m_aprsThread->start(); + m_aprsSocket = new CUDPReaderWriter; + m_aprsSocket->open(); wxString * aprsFrame; @@ -236,38 +210,36 @@ void CAPRSTransmitAppD::run() while(m_run){ wxMilliSleep(10U); aprsFrame = m_aprsFramesQueue->getData(); - if(aprsFrame){ + if (aprsFrame != NULL) { CAPRSTransmit aprsTransmit(m_repeater, wxString(*aprsFrame)); aprsTransmit.run(); delete aprsFrame; } } - m_aprsThread->stop(); - cleanup(); } void CAPRSTransmitAppD::cleanup() { - m_aprsThread->setReadAPRSCallback(NULL); - - if(m_aprsFramesQueue) + if (m_aprsFramesQueue != NULL) { - while(m_aprsFramesQueue->peek()) delete m_aprsFramesQueue->getData(); + while (m_aprsFramesQueue->peek()) delete m_aprsFramesQueue->getData(); delete m_aprsFramesQueue; m_aprsFramesQueue = NULL; } - if(m_checker) { + + if (m_checker != NULL) { delete m_checker; m_checker = NULL; } - if(m_aprsThread) + if (m_aprsSocket != NULL) { - delete m_aprsThread; - m_aprsThread = NULL; + m_aprsSocket->close(); + delete m_aprsSocket; + m_aprsSocket = NULL; } } diff --git a/APRSTransmit/APRSTransmitAppD.h b/APRSTransmit/APRSTransmitAppD.h index 0e0c160..80b0734 100644 --- a/APRSTransmit/APRSTransmitAppD.h +++ b/APRSTransmit/APRSTransmitAppD.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014,2018 by Jonathan Naylor G4KLX + * Copyright (C) 2014,2018,2020 by Jonathan Naylor G4KLX * APRSTransmit Copyright (C) 2015 Geoffrey Merck F4FXL / KC3FRA * * This program is free software; you can redistribute it and/or modify @@ -20,8 +20,8 @@ #ifndef APRSTransmitAppD_H #define APRSTransmitAppD_H +#include "UDPReaderWriter.h" #include "RingBuffer.h" -#include "APRSWriterThread.h" #include #include @@ -31,7 +31,7 @@ class CAPRSTransmitAppD { public: - CAPRSTransmitAppD(const wxString& repeater, const wxString& aprsPassword, const wxString& aprsHost, unsigned int aprsPort, const wxString& aprsFilter, bool daemon); + CAPRSTransmitAppD(const wxString& repeater, const wxString& aprsHost, unsigned int aprsPort, bool daemon); ~CAPRSTransmitAppD(); CRingBuffer * m_aprsFramesQueue; @@ -41,9 +41,9 @@ public: void kill(); private: - wxString m_repeater, m_aprsPassword, m_aprsHost, m_aprsFilter; + wxString m_repeater, m_aprsHost; unsigned int m_aprsPort; - CAPRSWriterThread * m_aprsThread; + CUDPReaderWriter * m_aprsSocket; bool m_run; wxSingleInstanceChecker * m_checker; bool m_daemon; diff --git a/GUICommon/GUICommon.vcxproj b/GUICommon/GUICommon.vcxproj index 3d02b78..832cc6d 100644 --- a/GUICommon/GUICommon.vcxproj +++ b/GUICommon/GUICommon.vcxproj @@ -143,7 +143,7 @@ - + @@ -160,7 +160,7 @@ - + @@ -172,4 +172,4 @@ - \ No newline at end of file + diff --git a/GUICommon/GUICommon.vcxproj.filters b/GUICommon/GUICommon.vcxproj.filters index 1e65ef7..69724e2 100644 --- a/GUICommon/GUICommon.vcxproj.filters +++ b/GUICommon/GUICommon.vcxproj.filters @@ -32,6 +32,9 @@ Source Files + + Source Files + Source Files @@ -53,9 +56,6 @@ Source Files - - Source Files - @@ -79,6 +79,9 @@ Header Files + + Header Files + Header Files @@ -100,8 +103,5 @@ Header Files - - Header Files - - \ No newline at end of file + diff --git a/Makefile b/Makefile index cf5bae5..041add6 100644 --- a/Makefile +++ b/Makefile @@ -27,7 +27,7 @@ export LIBS := $(shell wx-config --libs base,net) -lgps export LDFLAGS := .PHONY: all -all: ircDDBGateway/ircddbgatewayd RemoteControl/remotecontrold \ +all: ircDDBGateway/ircddbgatewayd APRSTransmit/aprstransmitd RemoteControl/remotecontrold \ StarNetServer/starnetserverd TextTransmit/texttransmitd TimerControl/timercontrold TimeServer/timeserverd VoiceTransmit/voicetransmitd ircDDBGateway/ircddbgatewayd: Common/Common.a ircDDB/IRCDDB.a force diff --git a/MakefileGUI b/MakefileGUI index 15fd13d..d208c0c 100644 --- a/MakefileGUI +++ b/MakefileGUI @@ -20,7 +20,7 @@ export LIBS := $(shell wx-config --libs base,net) -lgps export LDFLAGS := .PHONY: all -all: ircDDBGateway/ircddbgateway ircDDBGatewayConfig/ircddbgatewayconfig RemoteControl/remotecontrol \ +all: ircDDBGateway/ircddbgateway ircDDBGatewayConfig/ircddbgatewayconfig APRSTransmit/aprstransmitd RemoteControl/remotecontrol \ StarNetServer/starnetserver TextTransmit/texttransmitd TimerControl/timercontrol TimeServer/timeserver VoiceTransmit/voicetransmitd ircDDBGateway/ircddbgateway: GUICommon/GUICommon.a Common/Common.a ircDDB/IRCDDB.a force From 0d5dae1d294f572518cef503ba9f6b0460dfda25 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Thu, 4 Jun 2020 09:13:14 +0100 Subject: [PATCH 162/166] More sanity checking for gpsd. --- Common/APRSWriter.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Common/APRSWriter.cpp b/Common/APRSWriter.cpp index 089c0a0..16ee9e6 100644 --- a/Common/APRSWriter.cpp +++ b/Common/APRSWriter.cpp @@ -441,6 +441,9 @@ void CAPRSWriter::sendIdFramesMobile() if (::gps_read(&m_gpsdData, NULL, 0) <= 0) return; + if (m_gpsdData.status != STATUS_FIX) + return; + bool latlonSet = (m_gpsdData.set & LATLON_SET) == LATLON_SET; bool altitudeSet = (m_gpsdData.set & ALTITUDE_SET) == ALTITUDE_SET; bool velocitySet = (m_gpsdData.set & SPEED_SET) == SPEED_SET; From 8d62efeec3ef1334d246336783be60d12f9af0c4 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Thu, 4 Jun 2020 12:15:04 +0100 Subject: [PATCH 163/166] Add extra logging for APRS startup. --- Common/APRSWriter.cpp | 10 +++++++++- Common/Version.h | 4 ++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Common/APRSWriter.cpp b/Common/APRSWriter.cpp index 16ee9e6..7e3f92e 100644 --- a/Common/APRSWriter.cpp +++ b/Common/APRSWriter.cpp @@ -190,6 +190,8 @@ bool CAPRSWriter::open() ::gps_stream(&m_gpsdData, WATCH_ENABLE | WATCH_JSON, NULL); + wxLogMessage(wxT("Connected to GPSD")); + // Poll the GPS every minute m_idTimer.setTimeout(60U); } else { @@ -200,7 +202,13 @@ bool CAPRSWriter::open() #endif m_idTimer.start(); - return m_aprsSocket.open(); + bool ret = m_aprsSocket.open(); + if (!ret) + return false; + + wxLogMessage(wxT("Opened connection to the APRS Gateway")); + + return true; } void CAPRSWriter::writeHeader(const wxString& callsign, const CHeaderData& header) diff --git a/Common/Version.h b/Common/Version.h index 9e76233..cc157aa 100644 --- a/Common/Version.h +++ b/Common/Version.h @@ -24,9 +24,9 @@ const wxString VENDOR_NAME = wxT("G4KLX"); #if defined(__WXDEBUG__) -const wxString VERSION = wxT("20200603 - DEBUG"); +const wxString VERSION = wxT("20200604 - DEBUG"); #else -const wxString VERSION = wxT("20190603"); +const wxString VERSION = wxT("20190604"); #endif #endif From a87b3d83c0a53f0317b22910fa08438e1ec45c6c Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Fri, 5 Jun 2020 11:24:43 +0100 Subject: [PATCH 164/166] Change timings for fixed locations and add debugging for D-PRS. --- Common/APRSWriter.cpp | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/Common/APRSWriter.cpp b/Common/APRSWriter.cpp index 7e3f92e..24c8463 100644 --- a/Common/APRSWriter.cpp +++ b/Common/APRSWriter.cpp @@ -191,23 +191,17 @@ bool CAPRSWriter::open() ::gps_stream(&m_gpsdData, WATCH_ENABLE | WATCH_JSON, NULL); wxLogMessage(wxT("Connected to GPSD")); - - // Poll the GPS every minute - m_idTimer.setTimeout(60U); - } else { - m_idTimer.setTimeout(20U * 60U); } -#else - m_idTimer.setTimeout(20U * 60U); #endif - m_idTimer.start(); - bool ret = m_aprsSocket.open(); if (!ret) return false; wxLogMessage(wxT("Opened connection to the APRS Gateway")); + m_idTimer.setTimeout(60U); + m_idTimer.start(); + return true; } @@ -288,6 +282,8 @@ void CAPRSWriter::writeData(const wxString& callsign, const CAMBEData& data) for (unsigned int i = 0U; i < output.Len(); i++) ascii[i] = output.GetChar(i); + wxLogDebug(wxT("APRS ==> %s"), output.c_str()); + m_aprsSocket.write((unsigned char*)ascii, (unsigned int)::strlen(ascii), m_aprsAddress, m_aprsPort); collector->reset(); @@ -308,6 +304,7 @@ void CAPRSWriter::clock(unsigned int ms) #endif if (m_idTimer.hasExpired()) { sendIdFramesFixed(); + m_idTimer.setTimeout(20U * 60U); m_idTimer.start(); } #if !defined(_WIN32) && !defined(_WIN64) @@ -420,6 +417,8 @@ void CAPRSWriter::sendIdFramesFixed() for (unsigned int i = 0U; i < output.Len(); i++) ascii[i] = output.GetChar(i); + wxLogDebug(wxT("APRS ==> %s"), output.c_str()); + m_aprsSocket.write((unsigned char*)ascii, (unsigned int)::strlen(ascii), m_aprsAddress, m_aprsPort); if (entry->getBand().Len() == 1U) { @@ -433,6 +432,8 @@ void CAPRSWriter::sendIdFramesFixed() for (unsigned int i = 0U; i < output.Len(); i++) ascii[i] = output.GetChar(i); + wxLogDebug(wxT("APRS ==> %s"), output.c_str()); + m_aprsSocket.write((unsigned char*)ascii, (unsigned int)::strlen(ascii), m_aprsAddress, m_aprsPort); } } @@ -563,6 +564,8 @@ void CAPRSWriter::sendIdFramesMobile() for (unsigned int i = 0U; i < output3.Len(); i++, n++) ascii[n] = output3.GetChar(i); + wxLogDebug(wxT("APRS ==> %s%s%s"), output1.c_str(), output2.c_str(), output3.c_str()); + m_aprsSocket.write((unsigned char*)ascii, (unsigned int)::strlen(ascii), m_aprsAddress, m_aprsPort); if (entry->getBand().Len() == 1U) { @@ -587,7 +590,10 @@ void CAPRSWriter::sendIdFramesMobile() for (unsigned int i = 0U; i < output3.Len(); i++, n++) ascii[n] = output3.GetChar(i); + wxLogDebug(wxT("APRS ==> %s%s%s"), output1.c_str(), output2.c_str(), output3.c_str()); + m_aprsSocket.write((unsigned char*)ascii, (unsigned int)::strlen(ascii), m_aprsAddress, m_aprsPort); } } } + From 7f71576b5ffe2425eabfa8138b8d8403c32f5164 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Fri, 5 Jun 2020 11:27:50 +0100 Subject: [PATCH 165/166] Bump the version date. --- Common/Version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Common/Version.h b/Common/Version.h index cc157aa..1760cbc 100644 --- a/Common/Version.h +++ b/Common/Version.h @@ -24,9 +24,9 @@ const wxString VENDOR_NAME = wxT("G4KLX"); #if defined(__WXDEBUG__) -const wxString VERSION = wxT("20200604 - DEBUG"); +const wxString VERSION = wxT("20200605 - DEBUG"); #else -const wxString VERSION = wxT("20190604"); +const wxString VERSION = wxT("20190605"); #endif #endif From 94db475b2e90640ff38275b9fd75222491b63d95 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Sun, 21 Jun 2020 18:02:05 +0100 Subject: [PATCH 166/166] Make the use of gpsd optional. --- Common/APRSWriter.cpp | 15 ++++++++------- Common/APRSWriter.h | 4 ++-- Common/Version.h | 4 ++-- Makefile | 5 ++++- MakefileGUI | 7 +++++-- 5 files changed, 21 insertions(+), 14 deletions(-) diff --git a/Common/APRSWriter.cpp b/Common/APRSWriter.cpp index 24c8463..3fab725 100644 --- a/Common/APRSWriter.cpp +++ b/Common/APRSWriter.cpp @@ -125,7 +125,7 @@ m_array(), m_aprsAddress(), m_aprsPort(port), m_aprsSocket() -#if !defined(_WIN32) && !defined(_WIN64) +#if defined(USE_GPSD) ,m_gpsdEnabled(false), m_gpsdAddress(), m_gpsdPort(), @@ -162,7 +162,7 @@ void CAPRSWriter::setPortFixed(const wxString& callsign, const wxString& band, d void CAPRSWriter::setPortGPSD(const wxString& callsign, const wxString& band, double frequency, double offset, double range, const wxString& address, const wxString& port) { -#if !defined(_WIN32) && !defined(_WIN64) +#if defined(USE_GPSD) wxASSERT(!address.IsEmpty()); wxASSERT(!port.IsEmpty()); @@ -180,7 +180,7 @@ void CAPRSWriter::setPortGPSD(const wxString& callsign, const wxString& band, do bool CAPRSWriter::open() { -#if !defined(_WIN32) && !defined(_WIN64) +#if defined(USE_GPSD) if (m_gpsdEnabled) { int ret = ::gps_open(m_gpsdAddress.mb_str(), m_gpsdPort.mb_str(), &m_gpsdData); if (ret != 0) { @@ -293,7 +293,7 @@ void CAPRSWriter::clock(unsigned int ms) { m_idTimer.clock(ms); -#if !defined(_WIN32) && !defined(_WIN64) +#if defined(USE_GPSD) if (m_gpsdEnabled) { if (m_idTimer.hasExpired()) { sendIdFramesMobile(); @@ -307,7 +307,7 @@ void CAPRSWriter::clock(unsigned int ms) m_idTimer.setTimeout(20U * 60U); m_idTimer.start(); } -#if !defined(_WIN32) && !defined(_WIN64) +#if defined(USE_GPSD) } #endif for (CEntry_t::iterator it = m_array.begin(); it != m_array.end(); ++it) @@ -318,7 +318,7 @@ void CAPRSWriter::close() { m_aprsSocket.close(); -#if !defined(_WIN32) && !defined(_WIN64) +#if defined(USE_GPSD) if (m_gpsdEnabled) { ::gps_stream(&m_gpsdData, WATCH_DISABLE, NULL); ::gps_close(&m_gpsdData); @@ -439,6 +439,7 @@ void CAPRSWriter::sendIdFramesFixed() } } +#if defined(USE_GPSD) void CAPRSWriter::sendIdFramesMobile() { if (!m_gpsdEnabled) @@ -596,4 +597,4 @@ void CAPRSWriter::sendIdFramesMobile() } } } - +#endif diff --git a/Common/APRSWriter.h b/Common/APRSWriter.h index 6c9b016..b4d48c3 100644 --- a/Common/APRSWriter.h +++ b/Common/APRSWriter.h @@ -27,7 +27,7 @@ #include "Timer.h" #include "Defs.h" -#if !defined(_WIN32) && !defined(_WIN64) +#if defined(USE_GPSD) #include #endif @@ -95,7 +95,7 @@ private: in_addr m_aprsAddress; unsigned int m_aprsPort; CUDPReaderWriter m_aprsSocket; -#if !defined(_WIN32) && !defined(_WIN64) +#if defined(USE_GPSD) bool m_gpsdEnabled; wxString m_gpsdAddress; wxString m_gpsdPort; diff --git a/Common/Version.h b/Common/Version.h index 1760cbc..477d0c1 100644 --- a/Common/Version.h +++ b/Common/Version.h @@ -24,9 +24,9 @@ const wxString VENDOR_NAME = wxT("G4KLX"); #if defined(__WXDEBUG__) -const wxString VERSION = wxT("20200605 - DEBUG"); +const wxString VERSION = wxT("20200621 - DEBUG"); #else -const wxString VERSION = wxT("20190605"); +const wxString VERSION = wxT("20190621"); #endif #endif diff --git a/Makefile b/Makefile index 041add6..b3d02ec 100644 --- a/Makefile +++ b/Makefile @@ -14,6 +14,9 @@ endif # Add -DDCS_LINK to the end of the CFLAGS line below to add DCS linking to StarNet # Add -DDEXTRA_LINK to the end of the CFLAGS line below to add DExtra linking to StarNet +# Add -DUSE_GPS to the end of the CFLAGS line to enable the use of gpsd, and add -lgps to +# end of the LIBS line. + DEBUGFLAGS := -g -D_DEBUG RELEASEFLAGS := -DNDEBUG -DwxDEBUG_LEVEL=0 export CXX := $(shell wx-config --cxx) @@ -23,7 +26,7 @@ ifeq ($(BUILD), debug) else ifeq ($(BUILD), release) export CFLAGS := $(CFLAGS) $(RELEASEFLAGS) endif -export LIBS := $(shell wx-config --libs base,net) -lgps +export LIBS := $(shell wx-config --libs base,net) export LDFLAGS := .PHONY: all diff --git a/MakefileGUI b/MakefileGUI index d208c0c..7bec5e2 100644 --- a/MakefileGUI +++ b/MakefileGUI @@ -13,10 +13,13 @@ endif # Add -DDCS_LINK to the end of the CFLAGS line below to add DCS linking to StarNet # Add -DDEXTRA_LINK to the end of the CFLAGS line below to add DExtra linking to StarNet +# Add -DUSE_GPS to the end of the CFLAGS line to enable the use of gpsd, and add -lgps to +# end of the LIBS and GUILIBS lines. + export CXX := $(shell wx-config --cxx) export CFLAGS := -O2 -Wall $(shell wx-config --cxxflags) -DLOG_DIR='$(LOGDIR)' -DCONF_DIR='$(CONFDIR)' -DDATA_DIR='$(DATADIR)' -export GUILIBS := $(shell wx-config --libs adv,core,base) -lgps -export LIBS := $(shell wx-config --libs base,net) -lgps +export GUILIBS := $(shell wx-config --libs adv,core,base) +export LIBS := $(shell wx-config --libs base,net) export LDFLAGS := .PHONY: all