]> arthur.barton.de Git - netdata.git/commitdiff
delete the host from the index and it is removed
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Sat, 18 Feb 2017 21:59:10 +0000 (23:59 +0200)
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Tue, 21 Feb 2017 23:00:24 +0000 (01:00 +0200)
src/rrdhost.c

index 67f16a73b4e413aeb44ca5fc8cdb674509420b00..560af2e38bd90be5c48c8d9db01d428a9e43fa23 100644 (file)
@@ -222,6 +222,9 @@ void rrdhost_free(RRDHOST *host) {
     }
     host->rrdset_root = NULL;
 
+    if(rrdhost_index_del(host) != host)
+        error("RRDHOST '%s' removed from index, deleted the wrong entry.", host->hostname);
+
     freez(host->cache_dir);
     freez(host->varlib_dir);
     freez(host->health_default_exec);