Have BlacklistThreshold 0 disable the blacklist

This commit is contained in:
Lauri Kasanen 2022-03-04 10:48:19 +02:00
parent 6a9dfdc593
commit e6b4f40ed7

View File

@ -68,6 +68,9 @@ unsigned char bl_isBlacklisted(const char *addr) {
}
void bl_addFailure(const char *addr) {
if (!rfb::Blacklist::threshold)
return;
if (pthread_mutex_lock(&hitmutex))
abort();
const unsigned num = ++hits[addr];