mirror of
https://github.com/pi-hole/FTL.git
synced 2024-10-26 16:52:18 +02:00
Merge branch 'development' into new/query_special_domain
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
@@ -659,7 +659,7 @@ static bool get_client_groupids(clientsData* client)
|
||||
}
|
||||
|
||||
// We use the default group and return early here
|
||||
// if aboves lookups didn't return any results
|
||||
// if above lookups didn't return any results
|
||||
// (the client is not configured through the client table)
|
||||
if(chosen_match_id < 0)
|
||||
{
|
||||
@@ -1160,7 +1160,7 @@ static enum db_result domain_in_list(const char *domain, sqlite3_stmt *stmt, con
|
||||
// Bind domain to prepared statement
|
||||
// SQLITE_STATIC: Use the string without first duplicating it internally.
|
||||
// We can do this as domain has dynamic scope that exceeds that of the binding.
|
||||
// We need to bind the domain onl once even to the prepared audit statement as:
|
||||
// We need to bind the domain only once even to the prepared audit statement as:
|
||||
// When the same named SQL parameter is used more than once, second and
|
||||
// subsequent occurrences have the same index as the first occurrence.
|
||||
// (https://www.sqlite.org/c3ref/bind_blob.html)
|
||||
|
||||
@@ -1256,7 +1256,7 @@ void parse_neighbor_cache(sqlite3* db)
|
||||
else
|
||||
text = "ERROR";
|
||||
|
||||
// dbquery() above already logs the reson for why the query failed
|
||||
// dbquery() above already logs the reason for why the query failed
|
||||
logg("%s: Storing devices in network table (\"%s\") failed", text, sql);
|
||||
pclose(arpfp);
|
||||
return;
|
||||
@@ -1448,7 +1448,7 @@ void parse_neighbor_cache(sqlite3* db)
|
||||
unmock_netDB_device(db, hwaddr, macVendor, dbID);
|
||||
|
||||
// Host name, count and last query timestamp will be set in the next
|
||||
// loop interation for the sake of simplicity
|
||||
// loop iteration for the sake of simplicity
|
||||
}
|
||||
|
||||
// Free allocated memory
|
||||
@@ -1545,7 +1545,7 @@ void parse_neighbor_cache(sqlite3* db)
|
||||
|
||||
// Finally, loop over the available interfaces to ensure we list the
|
||||
// IP addresses correctly (local addresses are NOT contained in the
|
||||
// ARP/neighor cache).
|
||||
// ARP/neighbor cache).
|
||||
if(!add_local_interfaces_to_network_table(db, now, &additional_entries))
|
||||
return;
|
||||
|
||||
|
||||
@@ -486,7 +486,7 @@ int DB_save_queries(sqlite3 *db)
|
||||
return DB_FAILED;
|
||||
}
|
||||
|
||||
// Store index for next loop interation round and update last time stamp
|
||||
// Store index for next loop iteration round and update last time stamp
|
||||
// in the database only if all queries have been saved successfully
|
||||
if(saved > 0 && !error)
|
||||
{
|
||||
@@ -935,7 +935,7 @@ void DB_read_queries(void)
|
||||
}
|
||||
else if(status == QUERY_REGEX)
|
||||
{
|
||||
// QUERY_REGEX: Set ID regex which was the reson for blocking
|
||||
// QUERY_REGEX: Set ID regex which was the reason for blocking
|
||||
const int cacheID = findCacheID(query->domainID, query->clientID, query->type);
|
||||
DNSCacheData *cache = getDNSCache(cacheID, true);
|
||||
// Only load if
|
||||
|
||||
Reference in New Issue
Block a user