From: oetiker Date: Sun, 29 Jun 2008 16:23:50 +0000 (+0000) Subject: added rrd filename to illegal update message -- he at uninett.no X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5c3b824e73337ebc150268f929246991b68d44f3;p=rrdtool.git added rrd filename to illegal update message -- he at uninett.no git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1441 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/src/rrd_update.c b/src/rrd_update.c index e135f16..fe6aea4 100644 --- a/src/rrd_update.c +++ b/src/rrd_update.c @@ -502,6 +502,15 @@ int _rrd_update( rra_step_cnt, updvals, tmpl_idx, tmpl_cnt, &pcdp_summary, version, skip_update, &schedule_smooth) == -1) { + if (rrd_test_error()) { /* Should have error string always here */ + char *save_error; + + /* Prepend file name to error message */ + if ((save_error = strdup(rrd_get_error())) != NULL) { + rrd_set_error("%s: %s", filename, save_error); + free(save_error); + } + } free(arg_copy); break; }