mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 14:38:18 +00:00
Fix dnsbl initialization
Don't set dnsbl state to pending when we someone connects over ipv6 and the init will fail, leaving a null pointer in m_pDnsblLookup
This commit is contained in:
parent
d2dcb4fe84
commit
03098af933
|
@ -842,6 +842,7 @@ void CServer::InitDnsbl(int ClientID)
|
|||
|
||||
IEngine *pEngine = Kernel()->RequestInterface<IEngine>();
|
||||
pEngine->AddJob(m_aClients[ClientID].m_pDnsblLookup = std::make_shared<CHostLookup>(aBuf, NETTYPE_IPV4));
|
||||
m_aClients[ClientID].m_DnsblState = CClient::DNSBL_STATE_PENDING;
|
||||
}
|
||||
|
||||
#ifdef CONF_FAMILY_UNIX
|
||||
|
@ -1876,7 +1877,6 @@ int CServer::Run()
|
|||
if (m_aClients[ClientID].m_DnsblState == CClient::DNSBL_STATE_NONE)
|
||||
{
|
||||
// initiate dnsbl lookup
|
||||
m_aClients[ClientID].m_DnsblState = CClient::DNSBL_STATE_PENDING;
|
||||
InitDnsbl(ClientID);
|
||||
}
|
||||
else if (m_aClients[ClientID].m_DnsblState == CClient::DNSBL_STATE_PENDING &&
|
||||
|
|
Loading…
Reference in a new issue