mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-03-20 13:56:39 -04:00
fixed early crash caused by calling rsBanList before it is initialized
This commit is contained in:
parent
60ed77461a
commit
b799f18df8
@ -79,6 +79,12 @@ virtual int dhtInfoCallback(const bdId *id, uint32_t type, uint32_t flags, std::
|
||||
|
||||
virtual int dhtIsBannedCallback(const sockaddr_in *addr, bool *isBanned)
|
||||
{
|
||||
if(!rsBanList)
|
||||
{
|
||||
*isBanned = true; // rsBanList is not enabled yet. For security, default to banned.
|
||||
return 0;
|
||||
}
|
||||
|
||||
// check whether ip filtering is enabled
|
||||
// if not return 0 to signal that no filter is available
|
||||
if(!rsBanList->ipFilteringEnabled())
|
||||
|
Loading…
x
Reference in New Issue
Block a user