mirror of
https://github.com/pi-hole/FTL.git
synced 2024-10-26 16:52:18 +02:00
Ensure mock-devices which are not assigned to any addresses any more (they have been converted to "real" devices), are removed at this point
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
@@ -1135,6 +1135,12 @@ void parse_neighbor_cache(void)
|
||||
return;
|
||||
}
|
||||
|
||||
// Ensure mock-devices which are not assigned to any addresses any more
|
||||
// (they have been converted to "real" devices), are removed at this point
|
||||
dbquery("DELETE FROM network WHERE id NOT IN "
|
||||
"(SELECT network_id from network_addresses) "
|
||||
"AND hwaddr LIKE 'ip-%%';");
|
||||
|
||||
// Actually update the database
|
||||
if((rc = dbquery("END TRANSACTION")) != SQLITE_OK) {
|
||||
const char *text;
|
||||
|
||||
Reference in New Issue
Block a user