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:
DL6ER
2020-08-18 23:00:40 +02:00
parent 15e3d66dad
commit 1dde00299b
+6
View File
@@ -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;