From 42c56b58e385b7a45ab0d2287a4042e53ae22c07 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Tue, 15 May 2007 15:30:42 +0200 Subject: [PATCH] src/plugin.c: assert (ds->ds_num == vl->values_len); when debug is enabled. --- src/plugin.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/plugin.c b/src/plugin.c index 7dd7bd96..64dbf780 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -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) { -- 2.30.2