Merge branch 'pull/collectd-4' into collectd-4
authorFlorian Forster <octo@leeloo.lan.home.verplant.org>
Thu, 17 May 2007 10:36:12 +0000 (12:36 +0200)
committerFlorian Forster <octo@leeloo.lan.home.verplant.org>
Thu, 17 May 2007 10:36:12 +0000 (12:36 +0200)
configure.in
src/collectd.h
src/common.c
src/perl.c
src/plugin.c
src/utils_ignorelist.c
src/utils_mount.c

index 23c7dd5..e2859f7 100644 (file)
@@ -7,6 +7,8 @@ AC_LANG(C)
 
 AC_PREFIX_DEFAULT("/opt/collectd")
 
+AC_SYS_LARGEFILE
+
 #
 # Checks for programs.
 #
index 3d44c51..ac75516 100644 (file)
@@ -23,7 +23,7 @@
 #define COLLECTD_H
 
 #if HAVE_CONFIG_H
-# include <config.h>
+# include "config.h"
 #endif
 
 #include <stdio.h>
index 6521a58..bcdf59a 100644 (file)
  *   Niki W. Waibel <niki.waibel@gmx.net>
 **/
 
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
+
 #include "common.h"
 #include "plugin.h"
 
index 021d309..3be3762 100644 (file)
@@ -26,7 +26,6 @@
 
 #include "collectd.h"
 #include "common.h"
-#include "plugin.h"
 
 #include "configfile.h"
 
 
 #include <XSUB.h>
 
+/* Some versions of Perl define their own version of DEBUG... :-/ */
+#ifdef DEBUG
+# undef DEBUG
+#endif /* DEBUG */
+
+/* ... while we want the definition found in plugin.h. */
+#include "plugin.h"
+
 #define PLUGIN_INIT     0
 #define PLUGIN_READ     1
 #define PLUGIN_WRITE    2
index 7dd7bd9..64dbf78 100644 (file)
@@ -638,6 +638,18 @@ int plugin_dispatch_values (const char *name, const value_list_t *vl)
                        vl->plugin, vl->plugin_instance,
                        ds->type, vl->type_instance);
 
+#if COLLECT_DEBUG
+       assert (ds->ds_num == vl->values_len);
+#else
+       if (ds->ds_num != vl->values_len)
+       {
+               ERROR ("plugin: ds->type = %s: (ds->ds_num = %i) != "
+                               "(vl->values_len = %i)",
+                               ds->type, ds->ds_num, vl->values_len);
+               return (-1);
+       }
+#endif
+
        le = llist_head (list_write);
        while (le != NULL)
        {
index f71ac1d..d2546aa 100644 (file)
  *     return;
  **/
 
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
+
 #include "common.h"
 #include "plugin.h"
 #include "utils_ignorelist.h"
index eee2eb6..67d2e33 100644 (file)
@@ -21,7 +21,9 @@
  *   Niki W. Waibel <niki.waibel@gmx.net>
 **/
 
-
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
 
 #include "common.h"
 #if HAVE_XFS_XQM_H