Return-Path: Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: (qmail 13731 invoked from network); 11 Aug 2004 20:46:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 11 Aug 2004 20:46:59 -0000 Received: (qmail 84759 invoked by uid 500); 11 Aug 2004 20:46:34 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 84660 invoked by uid 500); 11 Aug 2004 20:46:33 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 84530 invoked by uid 500); 11 Aug 2004 20:46:32 -0000 Delivered-To: apmail-httpd-2.0-cvs@apache.org Received: (qmail 84511 invoked by uid 99); 11 Aug 2004 20:46:31 -0000 X-ASF-Spam-Status: No, hits=-2.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.27.1) with SMTP; Wed, 11 Aug 2004 13:46:31 -0700 Received: (qmail 13477 invoked by uid 1134); 11 Aug 2004 20:46:30 -0000 Date: 11 Aug 2004 20:46:30 -0000 Message-ID: <20040811204630.13476.qmail@minotaur.apache.org> From: wrowe@apache.org To: httpd-2.0-cvs@apache.org Subject: cvs commit: httpd-2.0/modules/proxy proxy_ajp.c X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N wrowe 2004/08/11 13:46:30 Modified: modules/proxy proxy_ajp.c Log: Rename parse_headers to parse_header. Some renaming and style cleanup. Submitted by: mturk Revision Changes Path 1.7 +15 -16 httpd-2.0/modules/proxy/proxy_ajp.c Index: proxy_ajp.c =================================================================== RCS file: /home/cvs/httpd-2.0/modules/proxy/proxy_ajp.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- proxy_ajp.c 11 Aug 2004 20:44:40 -0000 1.6 +++ proxy_ajp.c 11 Aug 2004 20:46:29 -0000 1.7 @@ -203,7 +203,7 @@ proxy_conn_rec *backend, proxy_server_conf *conf, const char *proxyname) { - int failed=0, new=0; + int failed = 0, new_conn = 0; apr_socket_t *client_socket = NULL; /* We have determined who to connect to. Now make the connection, supporting @@ -238,7 +238,7 @@ } /* get a socket - either a keepalive one, or a new one */ - new = 1; + new_conn = 1; if ((backend->connection) && (backend->connection->id == c->id)) { apr_size_t buffer_len = 1; char test_buffer[1]; @@ -248,7 +248,7 @@ /* use previous keepalive socket */ *origin = backend->connection; p_conn->sock = client_socket; - new = 0; + new_conn = 0; /* save timeout */ apr_socket_timeout_get(p_conn->sock, ¤t_timeout); @@ -260,10 +260,10 @@ if ( APR_STATUS_IS_EOF(socket_status) ) { ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "proxy: AJP: previous connection is closed"); - new = 1; + new_conn = 1; } } - if (new) { + if (new_conn) { /* create a new socket */ backend->connection = NULL; @@ -302,7 +302,7 @@ /* the peer reset the connection already; ap_run_create_connection() * closed the socket */ - ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, + ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server, "proxy: an error occurred creating a " "new connection to %pI (%s)", p_conn->addr, p_conn->name); @@ -364,7 +364,7 @@ input_brigade = apr_brigade_create(p, r->connection->bucket_alloc); status = ap_get_brigade(r->input_filters, input_brigade, AP_MODE_READBYTES, APR_BLOCK_READ, - 8186); + AJP13_MAX_SEND_BODY_SZ); if (status != APR_SUCCESS) { ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, @@ -393,7 +393,7 @@ /* XXXX calls apr_brigade_flatten... */ status = apr_brigade_flatten(input_brigade, buff, &bufsiz); if (status != APR_SUCCESS) { - ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, + ap_log_error(APLOG_MARK, APLOG_ERR, status, r->server, "proxy: apr_brigade_flatten"); return status; } @@ -412,8 +412,7 @@ } /* read the response */ - status = ajp_read_header(p_conn->sock, r, - (ajp_msg_t **)&(p_conn->data)); + status = ajp_read_header(p_conn->sock, r, &(p_conn->data)); if (status != APR_SUCCESS) { ap_log_error(APLOG_MARK, APLOG_ERR, status, r->server, "proxy: request failed to %pI (%s)", @@ -453,7 +452,8 @@ conn_rec *origin, proxy_conn_rec *backend, proxy_server_conf *conf, - char *server_portstr) { + char *server_portstr) +{ conn_rec *c = r->connection; apr_bucket *e; apr_bucket_brigade *bb; @@ -467,7 +467,7 @@ while (type != CMD_AJP13_END_RESPONSE) { if (type == CMD_AJP13_SEND_HEADERS) { /* AJP13_SEND_HEADERS: process them */ - status = ajp_parse_headers(r, p_conn->data); + status = ajp_parse_header(r, p_conn->data); if (status != APR_SUCCESS) { break; } @@ -484,8 +484,7 @@ break; } /* Read the next message */ - status = ajp_read_header(p_conn->sock, r, - (ajp_msg_t **)&(p_conn->data)); + status = ajp_read_header(p_conn->sock, r, &(p_conn->data)); if (status != APR_SUCCESS) { break; } @@ -646,8 +645,8 @@ } /* Step Four: Receive the Response */ - status = ap_proxy_ajp_process_response(p, r, p_conn, origin, backend, conf, - server_portstr); + status = ap_proxy_ajp_process_response(p, r, p_conn, origin, backend, + conf, server_portstr); if ( status != OK ) { /* clean up even if there is an error */ p_conn->close++;