Handles inc/dec uses after new hash entries purging

This commit is contained in:
Simone Mainardi 2019-10-24 16:58:08 +02:00
parent 3882e2f26d
commit 249f804c4c
12 changed files with 51 additions and 37 deletions

View file

@ -40,10 +40,16 @@ AutonomousSystem::AutonomousSystem(NetworkInterface *_iface, IpAddress *ipa) : G
/* *************************************** */
AutonomousSystem::~AutonomousSystem() {
void AutonomousSystem::set_hash_entry_state_idle() {
if(ntop->getPrefs()->is_idle_local_host_cache_enabled())
serializeToRedis();
GenericHashEntry::set_hash_entry_state_idle();
}
/* *************************************** */
AutonomousSystem::~AutonomousSystem() {
if(asname) free(asname);
/* TODO: decide if it is useful to dump AS stats to redis */