mirror of
https://github.com/g4klx/ircDDBGateway.git
synced 2026-04-07 07:14:09 +00:00
Add G2 port caching
This commit is contained in:
parent
21b1b967be
commit
bf4738c8a2
4 changed files with 48 additions and 13 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue