Code

added rrd filename to illegal update message -- he at uninett.no
authoroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Sun, 29 Jun 2008 16:23:50 +0000 (16:23 +0000)
committeroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Sun, 29 Jun 2008 16:23:50 +0000 (16:23 +0000)
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1441 a5681a0c-68f1-0310-ab6d-d61299d08faa

program/src/rrd_update.c

index e135f16158f32738a8c07353aecbec06e1448549..fe6aea4e61a42789054f2bc4cf2bb0e5425a1343 100644 (file)
@@ -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;
         }