Browse Source

[core] gw_exts_clear_check_local()

personal/stbuehler/ci-build
Glenn Strauss 2 years ago
parent
commit
cec18f4381
  1. 9
      src/gw_backend.c
  2. 3
      src/gw_backend.h
  3. 7
      src/mod_proxy.c
  4. 7
      src/mod_sockproxy.c
  5. 7
      src/mod_wstunnel.c

9
src/gw_backend.c

@ -1175,6 +1175,15 @@ void gw_free(void *p_d) {
}
}
void gw_exts_clear_check_local(gw_exts *exts) {
for (uint32_t j = 0; j < exts->used; ++j) {
gw_extension *ex = exts->exts[j];
for (uint32_t n = 0; n < ex->used; ++n) {
ex->hosts[n]->check_local = 0;
}
}
}
int gw_set_defaults_backend(server *srv, gw_plugin_data *p, const array *a, gw_plugin_config *s, int sh_exec, const char *cpkkey) {
/* per-module plugin_config MUST have common "base class" gw_plugin_config*/
/* per-module plugin_data MUST have pointer-compatible common "base class"

3
src/gw_backend.h

@ -336,6 +336,9 @@ void gw_plugin_config_free(gw_plugin_config *s);
__attribute_cold__
void gw_free(void *p_d);
__attribute_cold__
void gw_exts_clear_check_local(gw_exts *exts);
__attribute_cold__
int gw_set_defaults_backend(server *srv, gw_plugin_data *p, const array *a, gw_plugin_config *s, int sh_exec, const char *cpkkey);

7
src/mod_proxy.c

@ -386,12 +386,7 @@ SETDEFAULTS_FUNC(mod_proxy_set_defaults)
/* disable check-local for all exts (default enabled) */
if (gw && gw->exts) { /*(check after gw_set_defaults_backend())*/
for (uint32_t j = 0; j < gw->exts->used; ++j) {
gw_extension *ex = gw->exts->exts[j];
for (uint32_t n = 0; n < ex->used; ++n) {
ex->hosts[n]->check_local = 0;
}
}
gw_exts_clear_check_local(gw->exts);
}
}

7
src/mod_sockproxy.c

@ -106,12 +106,7 @@ SETDEFAULTS_FUNC(mod_sockproxy_set_defaults) {
/* disable check-local for all exts (default enabled) */
if (gw && gw->exts) { /*(check after gw_set_defaults_backend())*/
for (uint32_t j = 0; j < gw->exts->used; ++j) {
gw_extension *ex = gw->exts->exts[j];
for (uint32_t n = 0; n < ex->used; ++n) {
ex->hosts[n]->check_local = 0;
}
}
gw_exts_clear_check_local(gw->exts);
}
}

7
src/mod_wstunnel.c

@ -344,12 +344,7 @@ SETDEFAULTS_FUNC(mod_wstunnel_set_defaults) {
/* disable check-local for all exts (default enabled) */
if (gw && gw->exts) { /*(check after gw_set_defaults_backend())*/
for (uint32_t j = 0; j < gw->exts->used; ++j) {
gw_extension *ex = gw->exts->exts[j];
for (uint32_t n = 0; n < ex->used; ++n) {
ex->hosts[n]->check_local = 0;
}
}
gw_exts_clear_check_local(gw->exts);
}
}

Loading…
Cancel
Save