summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c507642)
raw | patch | inline | side by side (parent: c507642)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Mon, 6 Apr 2009 14:08:16 +0000 (14:08 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Mon, 6 Apr 2009 14:08:16 +0000 (14:08 +0000) |
src/rrd_graph.c | patch | blob | history |
diff --git a/src/rrd_graph.c b/src/rrd_graph.c
index eb909522e50635ba19c2ff535afeb2d19a15b553..549e08c783d097e006af7335faf56f9414a86ba5 100644 (file)
--- a/src/rrd_graph.c
+++ b/src/rrd_graph.c
(*prdata)[prlines] = NULL;
strcpy((*prdata)[prlines - 1], walker->value.u_str);
} else if (strcmp(walker->key, "image") == 0) {
- fwrite(walker->value.u_blo.ptr, walker->value.u_blo.size, 1,
- (stream ? stream : stdout));
+ if ( fwrite(walker->value.u_blo.ptr, walker->value.u_blo.size, 1,
+ (stream ? stream : stdout)) == 0 && ferror(stream ? stream : stdout)){
+ rrd_set_error("writing image");
+ return 0;
+ }
}
/* skip anything else */
walker = walker->next;