Revert "Merge pull request #16 from F4FXL/UDPHolePunching"

This reverts commit cc2c68aff9, reversing
changes made to 05e66c15d1.
This commit is contained in:
Jonathan Naylor 2019-01-15 20:50:58 +00:00
parent fe42c30df0
commit d87d121c8d
16 changed files with 53 additions and 324 deletions

View file

@ -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;