mirror of
https://github.com/g4klx/ircDDBGateway.git
synced 2026-04-06 06:43:52 +00:00
Constrain G2 stuff to specific functions
Code is much more lighter !
This commit is contained in:
parent
1f76e03cf5
commit
cda4300f34
5 changed files with 63 additions and 40 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue