Commit a1f43659 authored by Ryan Bloom's avatar Ryan Bloom
Browse files

Add the server_rec argument back to the create_connection hook.

Submitted by:	Greg Stein


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91913 13f79535-47bb-0310-9956-ffa450edef68
parent a4eadbfc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -130,7 +130,7 @@ AP_DECLARE_HOOK(int,process_connection,(conn_rec *c))
 * @return An allocated connection record or NULL.
 */
AP_DECLARE_HOOK(conn_rec *, create_connection,
                (apr_pool_t *p, apr_socket_t *csd, int conn_id))
                (apr_pool_t *p, server_rec *server, apr_socket_t *csd, int conn_id))

#ifdef __cplusplus
}
+2 −2
Original line number Diff line number Diff line
@@ -82,8 +82,8 @@ APR_HOOK_STRUCT(
AP_IMPLEMENT_HOOK_RUN_ALL(int,pre_connection,(conn_rec *c),(c),OK,DECLINED)
AP_IMPLEMENT_HOOK_RUN_FIRST(int,process_connection,(conn_rec *c),(c),DECLINED)
AP_IMPLEMENT_HOOK_RUN_FIRST(conn_rec *,create_connection,
                     (apr_pool_t *p, apr_socket_t *csd, int conn_id),
                     (p, csd, conn_id), NULL)
                     (apr_pool_t *p, server_rec *server, apr_socket_t *csd, int conn_id),
                     (p, server, csd, conn_id), NULL)

/*
 * More machine-dependent networking gooo... on some systems,
+5 −5
Original line number Diff line number Diff line
@@ -3276,8 +3276,8 @@ static int core_create_proxy_req(request_rec *r, request_rec *pr)
    return core_create_req(pr);
}

static conn_rec *core_create_conn(apr_pool_t *ptrans, apr_socket_t *csd,
                                  int conn_id)
static conn_rec *core_create_conn(apr_pool_t *ptrans, server_rec *server,
                                  apr_socket_t *csd, int conn_id)
{
    core_net_rec *net = apr_palloc(ptrans, sizeof(*net));
    apr_status_t rv;
@@ -3303,7 +3303,7 @@ static conn_rec *core_create_conn(apr_pool_t *ptrans, apr_socket_t *csd,
    net->c->pool = ptrans;
    if ((rv = apr_socket_addr_get(&net->c->local_addr, APR_LOCAL, csd))
        != APR_SUCCESS) {
        ap_log_error(APLOG_MARK, APLOG_INFO, rv, ap_server_conf,
        ap_log_error(APLOG_MARK, APLOG_INFO, rv, server,
                     "apr_socket_addr_get(APR_LOCAL)");
        apr_socket_close(csd);
        return NULL;
@@ -3311,13 +3311,13 @@ static conn_rec *core_create_conn(apr_pool_t *ptrans, apr_socket_t *csd,
    apr_sockaddr_ip_get(&net->c->local_ip, net->c->local_addr);
    if ((rv = apr_socket_addr_get(&net->c->remote_addr, APR_REMOTE, csd))
        != APR_SUCCESS) {
        ap_log_error(APLOG_MARK, APLOG_INFO, rv, ap_server_conf,
        ap_log_error(APLOG_MARK, APLOG_INFO, rv, server,
                     "apr_socket_addr_get(APR_REMOTE)");
        apr_socket_close(csd);
        return NULL;
    }
    apr_sockaddr_ip_get(&net->c->remote_ip, net->c->remote_addr);
    net->c->base_server = ap_server_conf;
    net->c->base_server = server;
    net->client_socket = csd;
 
    net->c->id = conn_id;
+1 −1
Original line number Diff line number Diff line
@@ -312,7 +312,7 @@ static void process_socket(apr_pool_t *p, apr_socket_t *sock, int my_child_num)
        return;
    }

    current_conn = ap_run_create_connection(p, sock, conn_id);
    current_conn = ap_run_create_connection(p, ap_server_conf, sock, conn_id);

    if (current_conn) {
        ap_process_connection(current_conn);
+1 −1
Original line number Diff line number Diff line
@@ -406,7 +406,7 @@ static void worker_main(void *vpArg)
    while (rc = DosReadQueue(workq, &rd, &len, (PPVOID)&worker_args, 0, DCWW_WAIT, &priority, NULLHANDLE),
           rc == 0 && rd.ulData != WORKTYPE_EXIT) {
        pconn = worker_args->pconn;
        current_conn = ap_run_create_connection(pconn, worker_args->conn_sd, conn_id);
        current_conn = ap_run_create_connection(pconn, ap_server_conf, worker_args->conn_sd, conn_id);

        if (current_conn) {
            ap_process_connection(current_conn);
Loading