summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6c6bd60)
raw | patch | inline | side by side (parent: 6c6bd60)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Fri, 17 Oct 2008 05:50:22 +0000 (05:50 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Fri, 17 Oct 2008 05:50:22 +0000 (05:50 +0000) |
src/rrd_client.c | patch | blob | history |
diff --git a/src/rrd_client.c b/src/rrd_client.c
index 5e22a988b20daab34c42ec1fd3da75fa82454773..8e606640455eaa01b47d6f4ff7c7771c2b746a34 100644 (file)
--- a/src/rrd_client.c
+++ b/src/rrd_client.c
@@ -615,8 +615,25 @@ int rrdc_flush_if_daemon (const char *opt_daemon, const char *filename) /* {{{ *
rrdc_connect(opt_daemon);
if (rrdc_is_connected(opt_daemon))
+ {
+ rrd_clear_error();
status = rrdc_flush (filename);
+ if (status != 0 && !rrd_test_error())
+ {
+ if (status > 0)
+ {
+ rrd_set_error("rrdc_flush (%s) failed: %s",
+ filename, rrd_strerror(status));
+ }
+ else if (status < 0)
+ {
+ rrd_set_error("rrdc_flush (%s) failed with status %i.",
+ filename, status);
+ }
+ }
+ } /* if (rrdc_is_connected(..)) */
+
return status;
} /* }}} int rrdc_flush_if_daemon */