Remove error_response()'s third parameter. None of the templates use it.
authorFabian Keil <fk@fabiankeil.de>
Thu, 11 Jun 2009 11:44:25 +0000 (11:44 +0000)
committerFabian Keil <fk@fabiankeil.de>
Thu, 11 Jun 2009 11:44:25 +0000 (11:44 +0000)
cgi.c
cgi.h
jcc.c

diff --git a/cgi.c b/cgi.c
index 9b0f4e3..a470c2b 100644 (file)
--- a/cgi.c
+++ b/cgi.c
@@ -1,4 +1,4 @@
-const char cgi_rcs[] = "$Id: cgi.c,v 1.118 2009/05/28 17:07:42 fabiankeil Exp $";
+const char cgi_rcs[] = "$Id: cgi.c,v 1.119 2009/05/28 21:13:34 fabiankeil Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/cgi.c,v $
@@ -815,15 +815,13 @@ jb_err get_number_param(struct client_state *csp,
  * Parameters  :
  *          1  :  csp = Current client state (buffers, headers, etc...)
  *          2  :  templatename = Which template should be used for the answer
- *          3  :  sys_err = system error number
  *
  * Returns     :  A http_response.  If we run out of memory, this
  *                will be cgi_error_memory().
  *
  *********************************************************************/
 struct http_response *error_response(struct client_state *csp,
-                                     const char *templatename,
-                                     int sys_err)
+                                     const char *templatename)
 {
    jb_err err;
    struct http_response *rsp;
@@ -856,7 +854,6 @@ struct http_response *error_response(struct client_state *csp,
    if (!err) err = map(exports, "host", 1, html_encode(csp->http->host), 0);
    if (!err) err = map(exports, "hostport", 1, html_encode(csp->http->hostport), 0);
    if (!err) err = map(exports, "path", 1, html_encode_and_free_original(path), 0);
-   if (!err) err = map(exports, "error", 1, html_encode_and_free_original(safe_strerror(sys_err)), 0);
    if (!err) err = map(exports, "protocol", 1, csp->http->ssl ? "https://" : "http://", 1); 
    if (!err)
    {
diff --git a/cgi.h b/cgi.h
index aa7fb6f..1989386 100644 (file)
--- a/cgi.h
+++ b/cgi.h
@@ -1,6 +1,6 @@
 #ifndef CGI_H_INCLUDED
 #define CGI_H_INCLUDED
-#define CGI_H_VERSION "$Id: cgi.h,v 1.35 2008/05/21 15:24:37 fabiankeil Exp $"
+#define CGI_H_VERSION "$Id: cgi.h,v 1.36 2009/05/16 13:27:20 fabiankeil Exp $"
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/cgi.h,v $
@@ -11,7 +11,7 @@
  *                Functions declared include:
  * 
  *
- * Copyright   :  Written by and Copyright (C) 2001-2007 the SourceForge
+ * Copyright   :  Written by and Copyright (C) 2001-2009 the
  *                Privoxy team. http://www.privoxy.org/
  *
  *                Based on the Internet Junkbuster originally written
@@ -51,9 +51,8 @@ extern "C" {
 extern struct http_response *dispatch_cgi(struct client_state *csp);
 
 /* Not exactly a CGI */
-extern struct http_response * error_response(struct client_state *csp,
-                                             const char *templatename,
-                                             int err);
+extern struct http_response *error_response(struct client_state *csp,
+                                            const char *templatename);
 
 /*
  * CGI support functions
diff --git a/jcc.c b/jcc.c
index 121932c..336ce62 100644 (file)
--- a/jcc.c
+++ b/jcc.c
@@ -1,4 +1,4 @@
-const char jcc_rcs[] = "$Id: jcc.c,v 1.252 2009/06/08 16:48:50 fabiankeil Exp $";
+const char jcc_rcs[] = "$Id: jcc.c,v 1.253 2009/06/08 16:50:35 fabiankeil Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/jcc.c,v $
@@ -1635,15 +1635,15 @@ static void chat(struct client_state *csp)
          if (fwd->type != SOCKS_NONE)
          {
             /* Socks error. */
-            rsp = error_response(csp, "forwarding-failed", errno);
+            rsp = error_response(csp, "forwarding-failed");
          }
          else if (errno == EINVAL)
          {
-            rsp = error_response(csp, "no-such-domain", errno);
+            rsp = error_response(csp, "no-such-domain");
          }
          else
          {
-            rsp = error_response(csp, "connect-failed", errno);
+            rsp = error_response(csp, "connect-failed");
             log_error(LOG_LEVEL_CONNECT, "connect to: %s failed: %E",
                http->hostport);
          }
@@ -1682,7 +1682,7 @@ static void chat(struct client_state *csp)
          log_error(LOG_LEVEL_CONNECT,
             "write header to: %s failed: %E", http->hostport);
 
-         rsp = error_response(csp, "connect-failed", errno);
+         rsp = error_response(csp, "connect-failed");
          if (rsp)
          {
             send_crunch_response(csp, rsp);