]> granicus.if.org Git - apache/commitdiff
Remove BUFF from the main server. :-) The buff code needs to remain as
authorRyan Bloom <rbb@apache.org>
Thu, 9 Nov 2000 00:37:06 +0000 (00:37 +0000)
committerRyan Bloom <rbb@apache.org>
Thu, 9 Nov 2000 00:37:06 +0000 (00:37 +0000)
a part of the server until the proxy is purged of BUFF however.

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

STATUS
include/httpd.h
modules/http/http_protocol.c
server/connection.c
server/mpm/mpmt_pthread/scoreboard.c
server/mpm/prefork/prefork.c
server/mpm/spmt_os2/spmt_os2.c

diff --git a/STATUS b/STATUS
index 59335e05b5f41c07dd696db8f4c0d78179f77765..988469d7f0e7017b6899f3a5fff8d4e92f8d1bdc 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -1,5 +1,5 @@
 Apache 2.0 STATUS:
-Last modified at [$Date: 2000/10/28 14:57:36 $]
+Last modified at [$Date: 2000/11/09 00:36:39 $]
 
 Release:
 
@@ -18,7 +18,11 @@ RELEASE SHOWSTOPPERS:
         Status: patch brought forward from 1.3.14
                 WIN32 and OS2 need review [William Rowe, Brian Harvard]
 
-    * Remove Buff from the code.  Convert the remaining calls to ap_b***().
+    * Remove Buff from the code.  
+        Status: Buff has been removed from the core completely, but the
+                proxy module is still using it.  As soon as the new proxy
+                patches are committed, Buff should be removed from the proxy
+                as well.
 
     * Error messages are filtered according to the needs of the original 
       URI.  Nothing ensures that they are translated on EBCDIC machines
index 6aa52234e6441a6db49120d1112631f69aca039e..0f68fae9ed4fab5b632220cdafa71cd5d3b27c93 100644 (file)
@@ -82,7 +82,6 @@ extern "C" {
 #include "apr_lib.h"
 #include "apr_time.h"
 #include "apr_network_io.h"
-#include "buff.h"
 #include "ap_mmn.h"
 
 #ifdef HAVE_NETINET_IN_H
@@ -833,7 +832,6 @@ struct conn_rec {
     /* Information about the connection itself */
 
     /** Connection to the client */
-    BUFF *client;
     apr_socket_t *client_socket;
 
     /* Who is the client? */
index cbfc8e05afcb307a67db2884139ffb579fc0005f..b440b4e69f3b4d3929ec4140cce212959aaf878b 100644 (file)
@@ -1169,11 +1169,23 @@ static int read_request_line(request_rec *r)
      * read().  B_SAFEREAD ensures that the BUFF layer flushes if it will
      * have to block during a read.
      */
+#if 0
+    /* XXX: I am 99% sure that these are already taken care of, but I want to
+     * really investigate them still.  Removing them from the code doesn't
+     * hurt however, because nothing is using BUFF anymore.
+     */
     ap_bsetflag(conn->client, B_SAFEREAD, 1); 
     ap_bflush(conn->client);
+#endif
     while ((len = getline(l, sizeof(l), r, 0)) <= 0) {
         if (len < 0) {             /* includes EOF */
+#if 0
+    /* XXX: I am 99% sure that these are already taken care of, but I want to
+     * really investigate them still.  Removing them from the code doesn't
+     * hurt however, because nothing is using BUFF anymore.
+     */
            ap_bsetflag(conn->client, B_SAFEREAD, 0);
+#endif
            /* this is a hack to make sure that request time is set,
             * it's not perfect, but it's better than nothing 
             */
@@ -1194,7 +1206,13 @@ static int read_request_line(request_rec *r)
 #endif
     */
 
+#if 0
+    /* XXX: I am 99% sure that these are already taken care of, but I want to
+     * really investigate them still.  Removing them from the code doesn't
+     * hurt however, because nothing is using BUFF anymore.
+     */
     ap_bsetflag(conn->client, B_SAFEREAD, 0);
+#endif
 
     r->request_time = apr_now();
     r->the_request = apr_pstrdup(r->pool, l);
index b6a1b1a53cd0495170b8e6c0ec64407a9edd931f..50ce7cbe5b4634d89622b7ddb618c6c4599826d6 100644 (file)
@@ -274,8 +274,6 @@ conn_rec *ap_new_connection(apr_pool_t *p, server_rec *server,
                            const struct sockaddr_in *saddr, long id)
 {
     conn_rec *conn = (conn_rec *) apr_pcalloc(p, sizeof(conn_rec));
-    BUFF *conn_io = ap_bcreate(p, B_RDWR);
-    ap_bpush_socket(conn_io, inout);
 
     /* Got a connection structure, so initialize what fields we can
      * (the rest are zeroed out by pcalloc).
@@ -288,7 +286,6 @@ conn_rec *ap_new_connection(apr_pool_t *p, server_rec *server,
     conn->local_addr = *saddr;
     apr_get_local_ipaddr(&conn->local_ip, inout);
     conn->base_server = server;
-    conn->client = conn_io;
     conn->client_socket = inout;
 
     conn->remote_addr = *remaddr;
index 62cd5c905cb477e0304cd2087ad3a84fa298ad40..441a7c728e058365977512730348edfe37d33670 100644 (file)
@@ -184,26 +184,21 @@ void update_scoreboard_global(void)
 
 void increment_counts(int child_num, int thread_num, request_rec *r)
 {
-    long int bs = 0;
     thread_score *ss;
 
     ss = &ap_scoreboard_image->servers[child_num][thread_num];
 
-    if (r->sent_bodyct)
-       ap_bgetopt(r->connection->client, BO_BYTECT, &bs);
-
 #ifdef HAVE_TIMES
     times(&ss->times);
 #endif
     ss->access_count++;
     ss->my_access_count++;
     ss->conn_count++;
-    ss->bytes_served += (unsigned long) bs;
-    ss->my_bytes_served += (unsigned long) bs;
-    ss->conn_bytes += (unsigned long) bs;
+    ss->bytes_served += r->bytes_sent;
+    ss->my_bytes_served += r->bytes_sent;
+    ss->conn_bytes += r->bytes_sent;
 
     put_scoreboard_info(child_num, thread_num, ss);
-
 }
 
 AP_DECLARE(int) find_child_by_pid(apr_proc_t *pid)
index c5783f04515bcb6d7c9607b230e8e2600c7c7e8a..ffeefc141215945b2beb392abb2dd65bbf93b54d 100644 (file)
@@ -494,24 +494,20 @@ void ap_time_process_request(int child_num, int status)
 /*
 static void increment_counts(int child_num, request_rec *r)
 {
-    long int bs = 0;
     short_score *ss;
 
     ap_sync_scoreboard_image();
     ss = &ap_scoreboard_image->servers[child_num];
 
-    if (r->sent_bodyct)
-       ap_bgetopt(r->connection->client, BO_BYTECT, &bs);
-
 #ifdef HAVE_TIMES
     times(&ss->times);
 #endif
     ss->access_count++;
     ss->my_access_count++;
     ss->conn_count++;
-    ss->bytes_served += (unsigned long) bs;
-    ss->my_bytes_served += (unsigned long) bs;
-    ss->conn_bytes += (unsigned long) bs;
+    ss->bytes_served += r->bytes_sent;
+    ss->my_bytes_served += r->bytes_sent;
+    ss->conn_bytes += r->bytes_sent;
 
     put_scoreboard_info(child_num, ss);
 }
index 11c7d93d6502273d6e2790e3f2545a6cd567d575..83b87e74deb0a75eee4beaf2432166e0ee6a3ab1 100644 (file)
@@ -318,23 +318,19 @@ void ap_time_process_request(int child_num, int status)
 /* TODO: call me some time */
 static void increment_counts(int child_num, request_rec *r)
 {
-    long int bs = 0;
     short_score *ss;
 
     ss = &ap_scoreboard_image->servers[child_num];
 
-    if (r->sent_bodyct)
-       ap_bgetopt(r->connection->client, BO_BYTECT, &bs);
-
 #ifdef HAVE_TIMES
     times(&ss->times);
 #endif
     ss->access_count++;
     ss->my_access_count++;
     ss->conn_count++;
-    ss->bytes_served += (unsigned long) bs;
-    ss->my_bytes_served += (unsigned long) bs;
-    ss->conn_bytes += (unsigned long) bs;
+    ss->bytes_served += r->bytes_sent;
+    ss->my_bytes_served += r->bytes_sent;
+    ss->conn_bytes += r->bytes_sent;
 }
 
 static int find_child_by_tid(int tid)