From: Florian Forster Date: Tue, 15 May 2007 13:30:42 +0000 (+0200) Subject: src/plugin.c: assert (ds->ds_num == vl->values_len); when debug is enabled. X-Git-Tag: collectd-4.0.0~42^2~1 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=42c56b58e385b7a45ab0d2287a4042e53ae22c07;p=collectd.git src/plugin.c: assert (ds->ds_num == vl->values_len); when debug is enabled. --- 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) {