mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-06 08:05:18 -04:00
fixed early crash caused by calling rsBanList before it is initialized
This commit is contained in:
parent
60ed77461a
commit
b799f18df8
1 changed files with 6 additions and 0 deletions
|
@ -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)
|
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
|
// check whether ip filtering is enabled
|
||||||
// if not return 0 to signal that no filter is available
|
// if not return 0 to signal that no filter is available
|
||||||
if(!rsBanList->ipFilteringEnabled())
|
if(!rsBanList->ipFilteringEnabled())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue