]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Add pool used for allocating proxy_server_conf to that struct.
authorMladen Turk <mturk@apache.org>
Thu, 26 Aug 2004 06:49:22 +0000 (06:49 +0000)
committerMladen Turk <mturk@apache.org>
Thu, 26 Aug 2004 06:49:22 +0000 (06:49 +0000)
It will be used for dynamic configuration, to ensure that dynamic
params has the same lifetime as the config has.

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

modules/proxy/mod_proxy.c
modules/proxy/mod_proxy.h

index 3d61c85a01fa0d8c620331f1c8635df03dca781b..07ada90b83a9d3e17ad574d9e41d6f3b9b143eb7 100644 (file)
@@ -714,6 +714,7 @@ static void * create_proxy_config(apr_pool_t *p, server_rec *s)
     ps->timeout_set = 0;
     ps->badopt = bad_error;
     ps->badopt_set = 0;
+    ps->pool = p;
     return ps;
 }
 
@@ -749,7 +750,7 @@ static void * merge_proxy_config(apr_pool_t *p, void *basev, void *overridesv)
     ps->preserve_host = (overrides->preserve_host_set == 0) ? base->preserve_host : overrides->preserve_host;
     ps->timeout= (overrides->timeout_set == 0) ? base->timeout : overrides->timeout;
     ps->badopt = (overrides->badopt_set == 0) ? base->badopt : overrides->badopt;
-
+    ps->pool = p;
     return ps;
 }
 
index 1a4ce09696a44eef00c220333149f786eb466311..fea0c73e567bf1e2183a3dae51e769b7f2112d6a 100644 (file)
@@ -96,7 +96,7 @@ struct proxy_remote {
     const char *hostname;   /* the hostname of this proxy */
     apr_port_t  port;       /* the port for this proxy */
     regex_t *regexp;        /* compiled regex (if any) for the remote */
-    int use_regex;          /* simple boolean. True if we have a regex pattern */
+    int use_regex;      /* simple boolean. True if we have a regex pattern */
 };
 
 struct proxy_alias {
@@ -127,7 +127,7 @@ typedef struct {
     apr_array_header_t *workers;
     apr_array_header_t *balancers;
     const char *domain;     /* domain name to use in absence of a domain name in the request */
-    int req;                /* true if proxy requests are enabled */
+    int req;            /* true if proxy requests are enabled */
     char req_set;
     enum {
       via_off,
@@ -176,7 +176,7 @@ typedef struct {
         status_full
     } proxy_status;             /* Status display options */
     char proxy_status_set;
-
+    apr_pool_t *pool;           /* Pool used for allocating this struct */
 } proxy_server_conf;
 
 typedef struct proxy_balancer  proxy_balancer;
@@ -359,9 +359,9 @@ PROXY_DECLARE(request_rec *)ap_proxy_make_fake_req(conn_rec *c, request_rec *r);
 PROXY_DECLARE(int) ap_proxy_hex2c(const char *x);
 PROXY_DECLARE(void) ap_proxy_c2hex(int ch, char *x);
 PROXY_DECLARE(char *)ap_proxy_canonenc(apr_pool_t *p, const char *x, int len, enum enctype t,
-                                       int isenc);
+            int isenc);
 PROXY_DECLARE(char *)ap_proxy_canon_netloc(apr_pool_t *p, char **const urlp, char **userp,
-                                           char **passwordp, char **hostp, apr_port_t *port);
+             char **passwordp, char **hostp, apr_port_t *port);
 PROXY_DECLARE(const char *)ap_proxy_date_canon(apr_pool_t *p, const char *x);
 PROXY_DECLARE(int) ap_proxy_liststr(const char *list, const char *val);
 PROXY_DECLARE(char *)ap_proxy_removestr(apr_pool_t *pool, const char *list, const char *val);