Prepare RsBanList for JSON API support

This commit is contained in:
Gioacchino Mazzurco 2019-05-05 14:54:46 +02:00
parent ebd55b2626
commit fb4be22f0e
No known key found for this signature in database
GPG key ID: A1FBCA3872E87051
6 changed files with 103 additions and 66 deletions

View file

@ -85,7 +85,10 @@ virtual int dhtInfoCallback(const bdId *id, uint32_t type, uint32_t flags, std::
return 0;
// now check the filter
if(rsBanList->isAddressAccepted(*(const sockaddr_storage*)addr, RSBANLIST_CHECKING_FLAGS_BLACKLIST, NULL)) {
if(rsBanList->isAddressAccepted(
*reinterpret_cast<const sockaddr_storage*>(addr),
RSBANLIST_CHECKING_FLAGS_BLACKLIST ))
{
*isBanned = false;
} else {
#ifdef DEBUG_BITDHT