]> granicus.if.org Git - apache/commitdiff
Create the configure for mod_proxy_hcheck when used in BalancerMember.
authorJean-Frederic Clere <jfclere@apache.org>
Thu, 14 Feb 2019 08:14:52 +0000 (08:14 +0000)
committerJean-Frederic Clere <jfclere@apache.org>
Thu, 14 Feb 2019 08:14:52 +0000 (08:14 +0000)
PR 60757

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

modules/proxy/mod_proxy_hcheck.c

index 2783a58e786d156e42c27e80edd22dca098264e6..5a0265a646252dbd153e1e81479906a3aca0f1d8 100644 (file)
@@ -110,6 +110,10 @@ static const char *set_worker_hc_param(apr_pool_t *p,
     if (!worker && !v) {
         return "Bad call to set_worker_hc_param()";
     }
+    if (!ctx) {
+        ctx = hc_create_config(p, s);
+        ap_set_module_config(s->module_config, &proxy_hcheck_module, ctx);
+    }
     temp = (hc_template_t *)v;
     if (!strcasecmp(key, "hctemplate")) {
         hc_template_t *template;
@@ -1060,6 +1064,8 @@ static void hc_show_exprs(request_rec *r)
     int i;
     sctx_t *ctx = (sctx_t *) ap_get_module_config(r->server->module_config,
                                                   &proxy_hcheck_module);
+    if (!ctx)
+        return;
     if (apr_is_empty_table(ctx->conditions))
         return;
 
@@ -1089,6 +1095,8 @@ static void hc_select_exprs(request_rec *r, const char *expr)
     int i;
     sctx_t *ctx = (sctx_t *) ap_get_module_config(r->server->module_config,
                                                   &proxy_hcheck_module);
+    if (!ctx)
+        return;
     if (apr_is_empty_table(ctx->conditions))
         return;
 
@@ -1112,6 +1120,8 @@ static int hc_valid_expr(request_rec *r, const char *expr)
     int i;
     sctx_t *ctx = (sctx_t *) ap_get_module_config(r->server->module_config,
                                                   &proxy_hcheck_module);
+    if (!ctx)
+        return 0;
     if (apr_is_empty_table(ctx->conditions))
         return 0;