From 5c3b824e73337ebc150268f929246991b68d44f3 Mon Sep 17 00:00:00 2001 From: oetiker Date: Sun, 29 Jun 2008 16:23:50 +0000 Subject: [PATCH] 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 --- src/rrd_update.c | 9 +++++++++ 1 file changed, 9 insertions(+) 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; } -- 2.30.2