Don't set regex status for domains read from database as we don't add them to the resolvers cache here (performance reasons)

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2018-05-19 17:40:34 +02:00
parent 7e31c8e797
commit 9b5eb62263
2 changed files with 3 additions and 6 deletions
+3 -2
View File
@@ -621,7 +621,7 @@ void getAllQueries(char *client_message, int *sock)
char *qtype = (queries[i].type == TYPE_A)? "A" : "AAAA";
// 1 = gravity.list, 5 = black.list
// 1 = gravity.list, 4 = wildcard, 5 = black.list
if((queries[i].status == QUERY_GRAVITY ||
queries[i].status == QUERY_WILDCARD ||
queries[i].status == QUERY_BLACKLIST) && !showblocked)
@@ -708,13 +708,14 @@ void getRecentBlocked(char *client_message, int *sock)
num = 0;
}
// Find most recent query with either status blocked
// Find most recently blocked query
int found = 0;
for(i = counters.queries - 1; i > 0 ; i--)
{
validate_access("queries", i, true, __LINE__, __FUNCTION__, __FILE__);
if(queries[i].status == QUERY_GRAVITY ||
queries[i].status == QUERY_WILDCARD ||
queries[i].status == QUERY_BLACKLIST)
{
found++;
-4
View File
@@ -690,10 +690,6 @@ void read_data_from_DB(void)
int timeidx = findOverTimeID(overTimeTimeStamp);
validate_access("overTime", timeidx, true, __LINE__, __FUNCTION__, __FILE__);
// Handle wildcard blocked entries read from database
if(status == QUERY_WILDCARD)
domains[domainID].regexmatch = REGEX_BLOCKED;
// Store this query in memory
validate_access("queries", queryID, false, __LINE__, __FUNCTION__, __FILE__);
queries[queryID].magic = MAGICBYTE;