summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRobert James Kaes <rjkaes@users.sourceforge.net>2002-04-28 20:03:53 +0000
committerRobert James Kaes <rjkaes@users.sourceforge.net>2002-04-28 20:03:53 +0000
commit3284f365b29b46c14265cf88a59d776d464e8a6a (patch)
treeb09ec973723f0f8abb849a896edca4d581435e15
parented90a4676f6bad4ab2b940f968082fa9f3b3d13c (diff)
Check the return value of the write_message() function.
-rw-r--r--src/utils.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/utils.c b/src/utils.c
index aa5eed0..d3df2c4 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -1,4 +1,4 @@
-/* $Id: utils.c,v 1.28 2002-04-18 17:59:21 rjkaes Exp $
+/* $Id: utils.c,v 1.29 2002-04-28 20:03:53 rjkaes Exp $
*
* Misc. routines which are used by the various functions to handle strings
* and memory allocation and pretty much anything else we can think of. Also,
@@ -129,10 +129,11 @@ send_http_message(struct conn_s *connptr, int http_code,
strftime(timebuf, sizeof(timebuf), "%a, %d %b %Y %H:%M:%S GMT",
gmtime(&global_time));
- write_message(connptr->client_fd,
- headers,
- http_code, error_title, PACKAGE, VERSION, timebuf,
- message_len);
+ if (write_message(connptr->client_fd,
+ headers,
+ http_code, error_title, PACKAGE, VERSION,
+ timebuf, message_len) < 0)
+ return -1;
return safe_write(connptr->client_fd, message, message_len);
}