From: Fabian Keil Date: Sat, 12 Aug 2017 09:36:42 +0000 (+0000) Subject: Streamline handle_established_connection()'s parameter list X-Git-Tag: v_3_0_27~92 X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=commitdiff_plain;h=84ee09b204158e3b3e4062f5d4bb3faccf7a4e0c;hp=4e179d819e103967d36503691735dad6fe805e4c Streamline handle_established_connection()'s parameter list csp references fwd already so there's no need to pass it as separate parameter as well. --- diff --git a/jcc.c b/jcc.c index 76addcec..3bbacd15 100644 --- a/jcc.c +++ b/jcc.c @@ -1,4 +1,4 @@ -const char jcc_rcs[] = "$Id: jcc.c,v 1.467 2017/06/26 12:18:21 fabiankeil Exp $"; +const char jcc_rcs[] = "$Id: jcc.c,v 1.468 2017/08/12 09:33:25 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/jcc.c,v $ @@ -1964,8 +1964,7 @@ static int send_http_request(struct client_state *csp) * Returns : Nothing. * *********************************************************************/ -static void handle_established_connection(struct client_state *csp, - const struct forward_spec *fwd) +static void handle_established_connection(struct client_state *csp) { char *receive_buffer; char *hdr; @@ -2284,7 +2283,7 @@ static void handle_established_connection(struct client_state *csp, { log_error(LOG_LEVEL_ERROR, "read from: %s failed: %E", http->host); - if (http->ssl && (fwd->forward_host == NULL)) + if (http->ssl && (csp->fwd == NULL)) { /* * Just hang up. We already confirmed the client's CONNECT @@ -3032,7 +3031,7 @@ static void chat(struct client_state *csp) /* XXX: should the time start earlier for optimistically sent data? */ csp->server_connection.request_sent = time(NULL); - handle_established_connection(csp, fwd); + handle_established_connection(csp); } @@ -3069,6 +3068,7 @@ extern int fuzz_server_response(struct client_state *csp, char *fuzz_input_file) fuzz_input_file); } } + csp->fwd = &fwd; csp->content_type |= CT_GIF; csp->action->flags |= ACTION_DEANIMATE; csp->action->string[ACTION_STRING_DEANIMATE] = "last"; @@ -3089,7 +3089,7 @@ extern int fuzz_server_response(struct client_state *csp, char *fuzz_input_file) cgi_init_error_messages(); - handle_established_connection(csp, &fwd); + handle_established_connection(csp); return 0; }