Commit a166c274 authored by Roy T. Fielding's avatar Roy T. Fielding
Browse files

Removed the keptalive boolean from conn_rec because it is now only

used by a single routine and can be replaced by a local variable.

Submitted by:	Greg Stein, Ryan Bloom, Roy Fielding


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88938 13f79535-47bb-0310-9956-ffa450edef68
parent 0a460154
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
Changes with Apache 2.0.18-dev

  *) Removed the keptalive boolean from conn_rec because it is now only
     used by a single routine and can be replaced by a local variable.
     [Greg Stein, Ryan Bloom, Roy Fielding]

  *) Patch prefork to put enough of the signal processing back in so that
     signals are all handled properly now. The previous patch fixed the
     deadlock race condition, but broke the user directed signal handling.
+4 −3
Original line number Diff line number Diff line
@@ -858,10 +858,11 @@ struct conn_rec {

    /** Are we still talking? */
    unsigned aborted:1;
    /** Are we using HTTP Keep-Alive?  -1 fatal error, 0 undecided, 1 yes */

    /** Are we going to keep the connection alive for another request?
     *  -1 fatal error, 0 undecided, 1 yes   */
    signed int keepalive:2;
    /** Did we use HTTP Keep-Alive? */
    unsigned keptalive:1;

    /** have we done double-reverse DNS? -1 yes/failure, 0 not yet, 
     *  1 yes/success */
    signed int double_reverse:2;
+4 −6
Original line number Diff line number Diff line
@@ -547,7 +547,7 @@ request_rec *ap_read_request(conn_rec *conn)
    request_rec *r;
    apr_pool_t *p;
    const char *expect;
    int access_status;
    int access_status, keptalive;

    apr_pool_create(&p, conn->pool);
    r = apr_pcalloc(p, sizeof(request_rec));
@@ -555,7 +555,7 @@ request_rec *ap_read_request(conn_rec *conn)
    r->connection      = conn;
    r->server          = conn->base_server;

    conn->keptalive    = conn->keepalive == 1;
    keptalive          = conn->keepalive == 1;
    conn->keepalive    = 0;

    r->user            = NULL;
@@ -584,7 +584,7 @@ request_rec *ap_read_request(conn_rec *conn)
    r->input_filters   = conn->input_filters;

    apr_setsocketopt(conn->client_socket, APR_SO_TIMEOUT, 
                     (int)(conn->keptalive
                     (int)(keptalive
                     ? r->server->keep_alive_timeout * APR_USEC_PER_SEC
                     : r->server->timeout * APR_USEC_PER_SEC));
                     
@@ -603,7 +603,7 @@ request_rec *ap_read_request(conn_rec *conn)
        }
        return NULL;
    }
    if (r->connection->keptalive) {
    if (keptalive) {
        apr_setsocketopt(r->connection->client_socket, APR_SO_TIMEOUT,
                         (int)(r->server->timeout * APR_USEC_PER_SEC));
    }
@@ -645,8 +645,6 @@ request_rec *ap_read_request(conn_rec *conn)
    /* we may have switched to another server */
    r->per_dir_config = r->server->lookup_defaults;

    conn->keptalive = 0;        /* We now have a request to play with */

    if ((!r->hostname && (r->proto_num >= HTTP_VERSION(1,1))) ||
        ((r->proto_num == HTTP_VERSION(1,1)) &&
         !apr_table_get(r->headers_in, "Host"))) {