From: Fabian Keil <fk@fabiankeil.de>
Date: Mon, 14 Feb 2011 16:03:53 +0000 (+0000)
Subject: In load_file(), log a message if opening a file failed
X-Git-Tag: v_3_0_18~336
X-Git-Url: http://www.privoxy.org/gitweb/%22https:/developer-manual/faq/@default-cgi@?a=commitdiff_plain;h=b0fcb6085b9d455585caa6e9bda3d26eae8355f0;p=privoxy.git

In load_file(), log a message if opening a file failed

The CGI error message alone isn't too helpful.
---

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;
    }