summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c42a231)
raw | patch | inline | side by side (parent: c42a231)
author | Florian Forster <octo@huhu.verplant.org> | |
Mon, 31 Mar 2008 15:03:56 +0000 (17:03 +0200) | ||
committer | Florian Forster <octo@huhu.verplant.org> | |
Mon, 31 Mar 2008 15:03:56 +0000 (17:03 +0200) |
If no write plugin was loaded or no DS was defined, the
`plugin_dispatch_values' used to fail silently. This is of course not good, so
this commit introduces error messages for this case, so that users can see why
their setup is not working properly.
Also, the ``no such DS type'' message was promoted from DEBUG to INFO.
`plugin_dispatch_values' used to fail silently. This is of course not good, so
this commit introduces error messages for this case, so that users can see why
their setup is not working properly.
Also, the ``no such DS type'' message was promoted from DEBUG to INFO.
src/plugin.c | patch | blob | history |
diff --git a/src/plugin.c b/src/plugin.c
index acf7620e9596221c5b55ca3207be3ab155e04e25..7d2bb57f09e01c0b6746d0e1608e307839b4aae5 100644 (file)
--- a/src/plugin.c
+++ b/src/plugin.c
data_set_t *ds;
llentry_t *le;
- if ((list_write == NULL) || (list_data_set == NULL))
+ if (list_write == NULL)
+ {
+ ERROR ("plugin_dispatch_values: No write callback has been "
+ "registered. Please load at least one plugin "
+ "that provides a write function.");
+ return (-1);
+ }
+
+ if (list_data_set == NULL)
+ {
+ ERROR ("plugin_dispatch_values: No data sets registered. "
+ "Could the types database be read? Check "
+ "your `TypesDB' setting!");
return (-1);
+ }
le = llist_search (list_data_set, name);
if (le == NULL)
{
- DEBUG ("No such dataset registered: %s", name);
+ INFO ("plugin_dispatch_values: Dataset not found: %s", name);
return (-1);
}
ds = (data_set_t *) le->value;
- DEBUG ("plugin: plugin_dispatch_values: time = %u; interval = %i; "
+ DEBUG ("plugin_dispatch_values: time = %u; interval = %i; "
"host = %s; "
"plugin = %s; plugin_instance = %s; "
"type = %s; type_instance = %s;",
#else
if (ds->ds_num != vl->values_len)
{
- ERROR ("plugin: ds->type = %s: (ds->ds_num = %i) != "
+ ERROR ("plugin_dispatch_values: ds->type = %s: "
+ "(ds->ds_num = %i) != "
"(vl->values_len = %i)",
ds->type, ds->ds_num, vl->values_len);
return (-1);