From 51d801d805fbf22b3cd2ea3cf413c70cb1e1797f Mon Sep 17 00:00:00 2001 From: DL6ER Date: Thu, 14 May 2020 18:23:05 +0200 Subject: [PATCH] Also remove too old host names from the database. Signed-off-by: DL6ER --- src/database/network-table.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/database/network-table.c b/src/database/network-table.c index 2165c7bf..37e7c6e5 100644 --- a/src/database/network-table.c +++ b/src/database/network-table.c @@ -403,8 +403,9 @@ void parse_neighbor_cache(void) return; } - // Remove IP addresses not seen for more than 24 hours to clean the network table from dead addresses + // Remove IP addresses and host names not seen for more than 24 hours dbquery("DELETE FROM network_addresses WHERE lastSeen < cast(strftime('%%s', 'now') as int)-86400;"); + dbquery("DELETE FROM network_names WHERE lastSeen < cast(strftime('%%s', 'now') as int)-86400;"); // Start collecting database commands lock_shm();