From: Florian Forster Date: Wed, 14 Nov 2012 12:07:47 +0000 (+0100) Subject: src/plugin.c: Report an error if ctx.interval is not set. X-Git-Tag: collectd-5.2.0~20^2~8 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=cd35a6a4528cf78383266fbae770b9c7161fda25;p=collectd.git src/plugin.c: Report an error if ctx.interval is not set. --- diff --git a/src/plugin.c b/src/plugin.c index 9d10631d..22f89696 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -1544,13 +1544,25 @@ int plugin_dispatch_values (value_list_t *vl) if (vl->time == 0) vl->time = cdtime (); - if (vl->interval <= 0) { + if (vl->interval <= 0) + { plugin_ctx_t ctx = plugin_get_ctx (); if (ctx.interval != 0) vl->interval = ctx.interval; else + { + char name[6 * DATA_MAX_NAME_LEN]; + FORMAT_VL (name, sizeof (name), vl); + ERROR ("plugin_dispatch_values: Unable to determine " + "interval from context for " + "value list \"%s\". " + "This indicates a broken plugin. " + "Please report this problem to the " + "collectd mailing list or at " + ".", name); vl->interval = interval_g; + } } DEBUG ("plugin_dispatch_values: time = %.3f; interval = %.3f; "