From caa30bd46d739c5527d59106e07568ad9056d99e Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Sat, 12 May 2007 20:00:16 +0200 Subject: [PATCH] unixsock plugin: Don't assert that `ds->ds_num == vl->values_num' when not built with debugging enabled. --- src/unixsock.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/unixsock.c b/src/unixsock.c index 8211bf46..a74e64e6 100644 --- a/src/unixsock.c +++ b/src/unixsock.c @@ -152,7 +152,17 @@ static int cache_insert (const data_set_t *ds, const value_list_t *vl) DEBUG ("unixsock plugin: cache_insert: ds->type = %s; ds->ds_num = %i;" " vl->values_len = %i;", ds->type, ds->ds_num, vl->values_len); +#if COLLECT_DEBUG assert (ds->ds_num == vl->values_len); +#else + if (ds->ds_num != vl->values_len) + { + ERROR ("unixsock plugin: ds->type = %s: (ds->ds_num = %i) != " + "(vl->values_len = %i)", + ds->type, ds->ds_num, vl->values_len); + return (-1); + } +#endif vc = (value_cache_t *) malloc (sizeof (value_cache_t)); if (vc == NULL) -- 2.30.2