diff --git a/src/plugin.c b/src/plugin.c
index bed26f0feeb072b955665fe24d2c62ab9fab1b16..37c91a9ba2aa0d2fb79b5ec754d8d618ac0eb8f2 100644 (file)
--- a/src/plugin.c
+++ b/src/plugin.c
#include "plugin.h"
#include "configfile.h"
#include "utils_llist.h"
+#include "utils_cache.h"
/*
* Private structures
const char *error = lt_dlerror ();
ERROR ("lt_dlopen failed: %s", error);
- DEBUG ("lt_dlopen failed: %s", error);
+ fprintf (stderr, "lt_dlopen failed: %s\n", error);
return (1);
}
ret = 0;
break;
}
+ else
+ {
+ fprintf (stderr, "Unable to load plugin %s.\n", type);
+ }
}
closedir (dh);
start_threads ((num > 0) ? num : 5);
}
+ /* Init the value cache */
+ uc_init ();
+
if (list_init == NULL)
return;
ds = (data_set_t *) le->value;
- DEBUG ("plugin: plugin_dispatch_values: time = %u; host = %s; "
- "plugin = %s; plugin_instance = %s; type = %s; "
- "type_instance = %s;",
- (unsigned int) vl->time, vl->host,
+ DEBUG ("plugin: plugin_dispatch_values: time = %u; interval = %i; "
+ "host = %s; "
+ "plugin = %s; plugin_instance = %s; "
+ "type = %s; type_instance = %s;",
+ (unsigned int) vl->time, vl->interval,
+ vl->host,
vl->plugin, vl->plugin_instance,
ds->type, vl->type_instance);
escape_slashes (vl->plugin_instance, sizeof (vl->plugin_instance));
escape_slashes (vl->type_instance, sizeof (vl->type_instance));
+ /* Update the value cache */
+ uc_update (ds, vl);
+
le = llist_head (list_write);
while (le != NULL)
{