Code

Merge branch 'collectd-4.2' into collectd-4.3
authorFlorian Forster <octo@noris.net>
Tue, 1 Apr 2008 13:05:45 +0000 (15:05 +0200)
committerFlorian Forster <octo@noris.net>
Tue, 1 Apr 2008 13:05:45 +0000 (15:05 +0200)
Conflicts:

configure.in
src/plugin.c

1  2 
configure.in
src/common.c
src/hddtemp.c
src/plugin.c
src/unixsock.c

diff --cc configure.in
index 952f5c5d12bfd1966c7ce81e17fcd77a0125f63e,db344978d38a27dff2adecdc2f06f4c281176a16..766b6d6b554118ccd9311a9c80a05b1528c824c3
  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>])
diff --cc src/common.c
Simple merge
diff --cc src/hddtemp.c
Simple merge
diff --cc src/plugin.c
index 0570f0ee0dc37269ce66fb724fe7f6abd64ac7dc,7d2bb57f09e01c0b6746d0e1608e307839b4aae5..8b2803dfa49b345b95d4da9f586740e6105af69a
@@@ -671,16 -643,32 +674,29 @@@ int plugin_dispatch_values (const char 
        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;",
diff --cc src/unixsock.c
Simple merge