From 3284f365b29b46c14265cf88a59d776d464e8a6a Mon Sep 17 00:00:00 2001 From: Robert James Kaes Date: Sun, 28 Apr 2002 20:03:53 +0000 Subject: Check the return value of the write_message() function. --- src/utils.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/utils.c') 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); } -- cgit v1.2.3