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 bc7da4b..28c2a60 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;
diff --git a/Common/G2ProtocolHandler.h b/Common/G2ProtocolHandler.h
index 38357e2..0a60896 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(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();
#if defined(ENABLE_NAT_TRAVERSAL)
void traverseNat(const wxString& addr);
@@ -63,8 +63,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/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/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
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 1b4c0e8..6ac8fda 100644
--- a/ircDDBGateway/IRCDDBGatewayThread.cpp
+++ b/ircDDBGateway/IRCDDBGatewayThread.cpp
@@ -744,6 +744,7 @@ 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);
@@ -753,9 +754,6 @@ 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;
@@ -1043,29 +1041,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;
@@ -1074,12 +1065,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 11ee4ec..a580a8e 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"
@@ -36,6 +35,9 @@
#include "IRCDDB.h"
#include "Timer.h"
#include "Defs.h"
+#if defined(ENABLE_NAT_TRAVERSAL)
+#include "NatTraversalHandler.h"
+#endif
#include