projects
/
rrdtool.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- encapsulate fd and mmap related variables within a private data
[rrdtool.git]
/
src
/
rrd_client.c
diff --git
a/src/rrd_client.c
b/src/rrd_client.c
index
5583bfe
..
8e60664
100644
(file)
--- a/
src/rrd_client.c
+++ b/
src/rrd_client.c
@@
-616,11
+616,21
@@
int rrdc_flush_if_daemon (const char *opt_daemon, const char *filename) /* {{{ *
if (rrdc_is_connected(opt_daemon))
{
if (rrdc_is_connected(opt_daemon))
{
+ rrd_clear_error();
status = rrdc_flush (filename);
status = rrdc_flush (filename);
- if (status != 0)
+
+ if (status != 0 && !rrd_test_error())
{
{
- rrd_set_error ("rrdc_flush (%s) failed with status %i.",
- filename, status);
+ 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(..)) */
}
} /* if (rrdc_is_connected(..)) */