fi
if test "x$with_libupsclient" = "xyes"
then
- AC_CHECK_TYPES([UPSCONN_t, UPSCONN], [], [],
+ SAVE_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $with_upsclient_cflags"
+
+ AC_CHECK_TYPES([UPSCONN_t, UPSCONN], [], [],
[#include <stdlib.h>
#include <stdio.h>
#include <upsclient.h>])
data_set_t *ds;
llentry_t *le;
- if ((list_write == NULL) || (data_sets == 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)
++ if (data_sets == 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)
+ if (c_avl_get (data_sets, name, (void *) &ds) != 0)
{
- DEBUG ("No such dataset registered: %s", name);
+ INFO ("plugin_dispatch_values: Dataset not found: %s", name);
return (-1);
}
- DEBUG ("plugin: plugin_dispatch_values: time = %u; interval = %i; "
- ds = (data_set_t *) le->value;
-
+ DEBUG ("plugin_dispatch_values: time = %u; interval = %i; "
"host = %s; "
"plugin = %s; plugin_instance = %s; "
"type = %s; type_instance = %s;",