From: Tobias Oetiker Date: Sat, 16 Mar 2013 17:09:38 +0000 (+0100) Subject: raise an error if part of an CDEF is unparsable X-Git-Tag: v1.5.0-rc1~187 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=43611a26200012b0638dd6fca073159a19b59782;p=thirdparty%2Frrdtool-1.x.git raise an error if part of an CDEF is unparsable --- diff --git a/src/rrd_rpncalc.c b/src/rrd_rpncalc.c index 491a8215..2587e444 100644 --- a/src/rrd_rpncalc.c +++ b/src/rrd_rpncalc.c @@ -331,6 +331,7 @@ rpnp_t *rpn_parse( rpnp[steps].op = VV; \ rpnp[steps].ptr = (*lookup)(key_hash,vname); \ if (rpnp[steps].ptr < 0) { \ + rrd_set_error("variable '%s' not found",vname);\ free(rpnp); \ return NULL; \ } else expr+=length; \ @@ -397,6 +398,7 @@ rpnp_t *rpn_parse( } else { + rrd_set_error("don't undestand '%s'",expr); setlocale(LC_NUMERIC, old_locale); free(rpnp); return NULL;