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:
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
#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
/* Information about the connection itself */
/** Connection to the client */
- BUFF *client;
apr_socket_t *client_socket;
/* Who is the client? */
* 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
*/
#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);
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).
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;
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)
/*
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);
}
/* 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)