diff options
author | Robert James Kaes <rjkaes@users.sourceforge.net> | 2002-04-28 20:03:53 +0000 |
---|---|---|
committer | Robert James Kaes <rjkaes@users.sourceforge.net> | 2002-04-28 20:03:53 +0000 |
commit | 3284f365b29b46c14265cf88a59d776d464e8a6a (patch) | |
tree | b09ec973723f0f8abb849a896edca4d581435e15 /src | |
parent | ed90a4676f6bad4ab2b940f968082fa9f3b3d13c (diff) | |
download | tinyproxy-3284f365b29b46c14265cf88a59d776d464e8a6a.tar.gz tinyproxy-3284f365b29b46c14265cf88a59d776d464e8a6a.zip |
Check the return value of the write_message() function.
Diffstat (limited to 'src')
-rw-r--r-- | src/utils.c | 11 |
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); } |