summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 964b6bd)
raw | patch | inline | side by side (parent: 964b6bd)
author | Florian Forster <ff@octo.it> | |
Mon, 14 Jun 2010 19:12:27 +0000 (21:12 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Mon, 14 Jun 2010 19:12:27 +0000 (21:12 +0200) |
graph_list.c | patch | blob | history |
diff --git a/graph_list.c b/graph_list.c
index 3edcb3284ca468a4df8b844e51e74ca56295f410..c9fbbaba72d72c011bd398520ce5bb0b7a7b8d7b 100644 (file)
--- a/graph_list.c
+++ b/graph_list.c
@@ -599,10 +599,25 @@ static int gl_instance_get_rrdargs_cb (graph_def_t *def, void *user_data) /* {{{
return (0);
} /* }}} int gl_instance_get_rrdargs_cb */
+static int gl_clear_instances (void) /* {{{ */
+{
+ graph_config_t *cfg;
+
+ for (cfg = graph_config_head; cfg != NULL; cfg = cfg->next)
+ {
+ instance_destroy (cfg->instances);
+ cfg->instances = NULL;
+ }
+
+ return (0);
+} /* }}} int gl_clear_instances */
+
+
/*
* Config functions
*/
-static int config_get_string (const oconfig_item_t *ci, char **ret_str)
+static int config_get_string (const oconfig_item_t *ci, /* {{{ */
+ char **ret_str)
{
char *tmp;
/*
* Global functions
*/
-int graph_config_add (const oconfig_item_t *ci)
+int graph_config_add (const oconfig_item_t *ci) /* {{{ */
{
char *host = NULL;
char *plugin = NULL;
return (ident_clone (inst->select));
} /* }}} graph_ident_t *gl_instance_get_selector */
-/* DELETEME */
-
int gl_update (void) /* {{{ */
{
time_t now;
gl.type = NULL;
gl.type_instance = NULL;
+ gl_clear_instances ();
status = foreach_host (callback_host, &gl);
gl_last_update = now;