X-Git-Url: http://www.privoxy.org/gitweb/show-status?a=blobdiff_plain;f=jcc.c;h=0e110a3cce814075bf49d092315bb467f12053e6;hb=de207b7461b11dce70902251c5a1cdc111f773e9;hp=61fc1ac965bb42502667a70dea965028422c1c90;hpb=6ae21e36dfb447cf33e9338fb8d13784bd8ef4c4;p=privoxy.git diff --git a/jcc.c b/jcc.c index 61fc1ac9..0e110a3c 100644 --- a/jcc.c +++ b/jcc.c @@ -5,7 +5,7 @@ * Purpose : Main file. Contains main() method, main loop, and * the main connection-handling function. * - * Copyright : Written by and Copyright (C) 2001-2022 the + * Copyright : Written by and Copyright (C) 2001-2023 the * Privoxy team. https://www.privoxy.org/ * * Based on the Internet Junkbuster originally written @@ -2345,9 +2345,8 @@ static int receive_and_send_encrypted_post_data(struct client_state *csp) { int content_length_known = csp->expected_client_content_length != 0; - while ((content_length_known && csp->expected_client_content_length != 0) || - (is_ssl_pending(&(csp->ssl_client_attr)) || - data_is_available(csp->cfd, csp->config->socket_timeout))) + while (is_ssl_pending(&(csp->ssl_client_attr)) + || (content_length_known && csp->expected_client_content_length != 0)) { unsigned char buf[BUFFER_SIZE]; int len; @@ -2511,12 +2510,12 @@ static jb_err receive_encrypted_request_headers(struct client_state *csp) do { - log_error(LOG_LEVEL_HEADER, "Waiting for encrypted client headers"); + log_error(LOG_LEVEL_HEADER, "Waiting for encrypted client headers."); if (!is_ssl_pending(&(csp->ssl_client_attr)) && !data_is_available(csp->cfd, csp->config->socket_timeout)) { log_error(LOG_LEVEL_CONNECT, - "Socket %d timed out while waiting for client headers", csp->cfd); + "Socket %d timed out while waiting for client headers.", csp->cfd); return JB_ERR_PARSE; } len = ssl_recv_data(&(csp->ssl_client_attr), @@ -2524,7 +2523,7 @@ static jb_err receive_encrypted_request_headers(struct client_state *csp) if (len == 0) { log_error(LOG_LEVEL_CONNECT, - "Socket %d closed while waiting for client headers", csp->cfd); + "Socket %d closed while waiting for client headers.", csp->cfd); return JB_ERR_PARSE; } if (len == -1) @@ -2538,7 +2537,7 @@ static jb_err receive_encrypted_request_headers(struct client_state *csp) p = strstr(csp->client_iob->cur, "\r\n\r\n"); } while (p == NULL); - log_error(LOG_LEVEL_HEADER, "Encrypted headers received completely"); + log_error(LOG_LEVEL_HEADER, "Encrypted headers received completely."); return JB_ERR_OK; } @@ -4175,7 +4174,7 @@ static void handle_established_connection(struct client_state *csp) else { log_error(LOG_LEVEL_CONNECT, - "Keeping chunk offset at %lu despite flushing %ld bytes", + "Keeping chunk offset at %lu despite flushing %ld bytes.", chunk_offset, len); /* * If we can't parse the chunk-encoded data we should @@ -6270,7 +6269,8 @@ static void listen_loop(void) if (!accept_connection(csp, bfds)) { - log_error(LOG_LEVEL_CONNECT, "accept failed: %E"); + log_error(LOG_LEVEL_CONNECT, + "Failed to accept() incoming connection: %E"); freez(csp_list); continue; }