]> granicus.if.org Git - apache/commitdiff
Remove duplicate logging from alloc and send data_msg.
authorMladen Turk <mturk@apache.org>
Fri, 17 Sep 2004 12:59:44 +0000 (12:59 +0000)
committerMladen Turk <mturk@apache.org>
Fri, 17 Sep 2004 12:59:44 +0000 (12:59 +0000)
The logging is already done in the proxy_ajp. Also remove
unused function params.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105185 13f79535-47bb-0310-9956-ffa450edef68

modules/proxy/ajp.h
modules/proxy/ajp_header.c
modules/proxy/proxy_ajp.c

index 67c0d0b47dbb8a892db677ecd2612a715a03a812..5be13e0005ad8cb59ae392de610a807511b7123a 100644 (file)
@@ -400,24 +400,23 @@ apr_status_t ajp_read_header(apr_socket_t *sock,
 
 /**
  * Allocate a msg to send data
- * @param r         current request
+ * @param pool      pool to allocate from
  * @param ptr       data buffer
  * @param len       the length of allocated data buffer
  * @param msg       returned AJP message
  * @return          APR_SUCCESS or error
  */
-apr_status_t  ajp_alloc_data_msg(request_rec *r, char **ptr, apr_size_t *len,
-                                 ajp_msg_t **msg);
+apr_status_t  ajp_alloc_data_msg(apr_pool_t *pool, char **ptr,
+                                 apr_size_t *len, ajp_msg_t **msg);
 
 /**
  * Send the data message
  * @param sock      backend socket
- * @param r         current request
  * @param msg       AJP message to send
  * @param len       AJP message length      
  * @return          APR_SUCCESS or error
  */
-apr_status_t  ajp_send_data_msg(apr_socket_t *sock, request_rec  *r,
+apr_status_t  ajp_send_data_msg(apr_socket_t *sock,
                                 ajp_msg_t *msg, apr_size_t len);
 
 /**
index 2a513c9098436ce98d3e818315ba0ce4714f1a88..c383f959dd79a31b323d8e1f61333bbf8c18497c 100644 (file)
@@ -680,17 +680,13 @@ apr_status_t  ajp_parse_data(request_rec  *r, ajp_msg_t *msg,
 /*
  * Allocate a msg to send data
  */
-apr_status_t  ajp_alloc_data_msg(request_rec *r, char **ptr, apr_size_t *len,
+apr_status_t  ajp_alloc_data_msg(apr_pool_t *pool, char **ptr, apr_size_t *len,
                                  ajp_msg_t **msg)
 {
     apr_status_t rc;
 
-    rc = ajp_msg_create(r->pool, msg);
-    if (rc != APR_SUCCESS) {
-        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
-               "ajp_alloc_data_msg: ajp_msg_create failed");
+    if ((rc = ajp_msg_create(pool, msg)) != APR_SUCCESS)
         return rc;
-    }
     ajp_msg_reset(*msg);
     *ptr = (char *)&((*msg)->buf[6]);
     *len = AJP_MSG_BUFFER_SZ-6;
@@ -701,7 +697,7 @@ apr_status_t  ajp_alloc_data_msg(request_rec *r, char **ptr, apr_size_t *len,
 /*
  * Send the data message
  */
-apr_status_t  ajp_send_data_msg(apr_socket_t *sock, request_rec  *r,
+apr_status_t  ajp_send_data_msg(apr_socket_t *sock,
                                 ajp_msg_t *msg, apr_size_t len)
 {
 
@@ -710,9 +706,6 @@ apr_status_t  ajp_send_data_msg(apr_socket_t *sock, request_rec  *r,
 
     msg->len += len + 2; /* + 1 XXXX where is '\0' */
 
-    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
-               "ajp_send_data_msg: sending %" APR_SIZE_T_FMT, len);
-
     return ajp_ilink_send(sock, msg);
 
 }
index 17aa122dd05d83a5536cf42c244482a680665f75..87d3f2e37150671e9059443a077cdd1895f0e334 100644 (file)
@@ -135,7 +135,7 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r,
     }
 
     /* allocate an AJP message to store the data of the buckets */
-    status = ajp_alloc_data_msg(r, &buff, &bufsiz, &msg);
+    status = ajp_alloc_data_msg(r->pool, &buff, &bufsiz, &msg);
     if (status != APR_SUCCESS) {
         ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
                      "proxy: ajp_alloc_data_msg failed");
@@ -183,7 +183,7 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r,
         ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
                      "proxy: got %" APR_SIZE_T_FMT " bytes of data", bufsiz);
         if (bufsiz > 0) {
-            status = ajp_send_data_msg(conn->sock, r, msg, bufsiz);
+            status = ajp_send_data_msg(conn->sock, msg, bufsiz);
             if (status != APR_SUCCESS) {
                 apr_brigade_destroy(input_brigade);
                 ap_log_error(APLOG_MARK, APLOG_ERR, status, r->server,
@@ -243,7 +243,7 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r,
                     }
 
                     ajp_msg_reset(msg); /* will go in ajp_send_data_msg */
-                    status = ajp_send_data_msg(conn->sock, r, msg, bufsiz);
+                    status = ajp_send_data_msg(conn->sock, msg, bufsiz);
                     if (status != APR_SUCCESS) {
                         ap_log_error(APLOG_MARK, APLOG_DEBUG, status, r->server,
                                      "ajp_send_data_msg failed");