From f04664dd162d09f6ef6f5fb5b6ac37f749e981d8 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@1441 a5681a0c-68f1-0310-ab6d-d61299d08faa --- program/src/rrd_update.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/program/src/rrd_update.c b/program/src/rrd_update.c index e135f161..fe6aea4e 100644 --- a/program/src/rrd_update.c +++ b/program/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