Reload gravity database when 'updated' property in table 'info' has changed

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2023-02-05 16:04:16 +01:00
parent ac4c9e789d
commit 9833fe1af0
9 changed files with 103 additions and 31 deletions
+14 -5
View File
@@ -9,25 +9,27 @@
* Please see LICENSE file for your rights under this license. */
#include "FTL.h"
#include "database-thread.h"
#include "common.h"
#include "database/database-thread.h"
#include "database/common.h"
// [un]lock_shm();
#include "shmem.h"
// parse_neighbor_cache()
#include "network-table.h"
#include "database/network-table.h"
// export_queries_to_disk()
#include "query-table.h"
#include "database/query-table.h"
#include "config/config.h"
#include "log.h"
#include "timers.h"
// global variable killed
#include "signals.h"
// reimport_aliasclients()
#include "aliasclients.h"
#include "database/aliasclients.h"
// Eventqueue routines
#include "events.h"
// get_FTL_db_filesize()
#include "files.h"
// gravity_updated()
#include "database/gravity-db.h"
#define TIME_T "%li"
@@ -137,6 +139,13 @@ void *DB_thread(void *val)
if(killed)
break;
// Check if we need to reload gravity
if(gravity_updated())
{
// Reload gravity
set_event(RELOAD_GRAVITY);
}
// Parse ARP cache if requested
if(get_and_clear_event(PARSE_NEIGHBOR_CACHE))
{