From b0fcb6085b9d455585caa6e9bda3d26eae8355f0 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Mon, 14 Feb 2011 16:03:53 +0000 Subject: [PATCH] In load_file(), log a message if opening a file failed The CGI error message alone isn't too helpful. --- cgisimple.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cgisimple.c b/cgisimple.c index 46ffb151..a8c06a2e 100644 --- a/cgisimple.c +++ b/cgisimple.c @@ -1,4 +1,4 @@ -const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.98 2010/03/27 18:29:59 fabiankeil Exp $"; +const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.99 2010/03/28 18:02:22 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/cgisimple.c,v $ @@ -1861,6 +1861,7 @@ static jb_err load_file(const char *filename, char **buffer, size_t *length) fp = fopen(filename, "rb"); if (NULL == fp) { + log_error(LOG_LEVEL_ERROR, "Failed to open %s: %E", filename); return JB_ERR_FILE; } -- 2.39.2