projects
/
rrdd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6e43a35
)
src/rrdd.c: Complain if write(2) fails.
author
Florian Forster
<octo@leeloo.home.verplant.org>
Sun, 22 Jun 2008 09:01:18 +0000
(11:01 +0200)
committer
Florian Forster
<octo@leeloo.home.verplant.org>
Sun, 22 Jun 2008 09:01:18 +0000
(11:01 +0200)
src/rrdd.c
patch
|
blob
|
history
diff --git
a/src/rrdd.c
b/src/rrdd.c
index
14543ce
..
94ddf40
100644
(file)
--- a/
src/rrdd.c
+++ b/
src/rrdd.c
@@
-188,6
+188,7
@@
static int handle_request_update (int fd, /* {{{ */
char *value;
char *buffer_ptr;
int values_num = 0;
+ int status;
time_t now;
@@
-305,7
+306,13
@@
static int handle_request_update (int fd, /* {{{ */
snprintf (answer, sizeof (answer), "0 Enqueued %i value(s)\n", values_num);
answer[sizeof (answer) - 1] = 0;
- write (fd, answer, sizeof (answer));
+ status = write (fd, answer, sizeof (answer));
+ if (status < 0)
+ {
+ status = errno;
+ RRDD_LOG (LOG_INFO, "handle_request_update: write(2) returned an error.");
+ return (status);
+ }
return (0);
} /* }}} int handle_request_update */