Browse Source

[core] simpler config_check_cond()

optimize for common case where condition has been evaluated for
the request and a cached result exists

(also: begin isolating data_config)
personal/stbuehler/ci-build
Glenn Strauss 2 years ago
parent
commit
36f64b26a1
  1. 30
      src/configfile-glue.c
  2. 5
      src/configfile.c
  3. 2
      src/configfile.h
  4. 5
      src/mod_access.c
  5. 5
      src/mod_accesslog.c
  6. 5
      src/mod_alias.c
  7. 5
      src/mod_auth.c
  8. 5
      src/mod_authn_file.c
  9. 5
      src/mod_authn_gssapi.c
  10. 5
      src/mod_authn_ldap.c
  11. 5
      src/mod_authn_mysql.c
  12. 5
      src/mod_authn_pam.c
  13. 5
      src/mod_authn_sasl.c
  14. 5
      src/mod_cgi.c
  15. 5
      src/mod_cml.c
  16. 5
      src/mod_compress.c
  17. 5
      src/mod_deflate.c
  18. 5
      src/mod_dirlisting.c
  19. 5
      src/mod_evasive.c
  20. 5
      src/mod_evhost.c
  21. 5
      src/mod_expire.c
  22. 5
      src/mod_extforward.c
  23. 5
      src/mod_fastcgi.c
  24. 5
      src/mod_flv_streaming.c
  25. 5
      src/mod_geoip.c
  26. 5
      src/mod_indexfile.c
  27. 5
      src/mod_magnet.c
  28. 5
      src/mod_maxminddb.c
  29. 5
      src/mod_mysql_vhost.c
  30. 5
      src/mod_openssl.c
  31. 5
      src/mod_proxy.c
  32. 5
      src/mod_redirect.c
  33. 5
      src/mod_rewrite.c
  34. 5
      src/mod_rrdtool.c
  35. 5
      src/mod_scgi.c
  36. 5
      src/mod_secdownload.c
  37. 5
      src/mod_setenv.c
  38. 5
      src/mod_simple_vhost.c
  39. 5
      src/mod_skeleton.c
  40. 5
      src/mod_sockproxy.c
  41. 5
      src/mod_ssi.c
  42. 5
      src/mod_staticfile.c
  43. 5
      src/mod_status.c
  44. 5
      src/mod_trigger_b4_dl.c
  45. 5
      src/mod_uploadprogress.c
  46. 5
      src/mod_userdir.c
  47. 5
      src/mod_usertrack.c
  48. 5
      src/mod_vhostdb.c
  49. 5
      src/mod_vhostdb_dbi.c
  50. 5
      src/mod_vhostdb_ldap.c
  51. 5
      src/mod_vhostdb_mysql.c
  52. 5
      src/mod_vhostdb_pgsql.c
  53. 5
      src/mod_webdav.c
  54. 6
      src/mod_wstunnel.c

30
src/configfile-glue.c

@ -503,6 +503,27 @@ static cond_result_t config_check_cond_cached(connection *con, const data_config
return cache->result;
}
__attribute_noinline__
static cond_result_t config_check_cond_calc(connection *con, const int context_ndx) {
const data_config * const dc = (const data_config *)
con->srv->config_context->data[context_ndx];
const int debug_cond = con->conf.log_condition_handling;
if (debug_cond) {
log_error(con->errh, __FILE__, __LINE__,
"=== start of condition block ===");
}
return config_check_cond_cached(con, dc, debug_cond);
}
/* future: might make static inline in header for plugins */
int config_check_cond(connection * const con, const int context_ndx) {
const cond_cache_t * const cache = &con->cond_cache[context_ndx];
return COND_RESULT_TRUE
== (COND_RESULT_UNSET != cache->result
? cache->result
: config_check_cond_calc(con, context_ndx));
}
/* if we reset the cache result for a node, we also need to clear all
* child nodes and else-branches*/
static void config_cond_clear_node(server *srv, connection *con, const data_config *dc) {
@ -567,15 +588,6 @@ void config_cond_cache_reset(server *srv, connection *con) {
}
}
int config_check_cond(server *srv, connection *con, const data_config *dc) {
UNUSED(srv);
const int debug_cond = con->conf.log_condition_handling;
if (debug_cond) {
log_error(con->errh, __FILE__, __LINE__, "=== start of condition block ===");
}
return (config_check_cond_cached(con, dc, debug_cond) == COND_RESULT_TRUE);
}
#ifdef HAVE_PCRE_H
#include <pcre.h>
#endif

5
src/configfile.c

@ -684,12 +684,11 @@ void config_patch_connection(server *srv, connection *con) {
/* skip the first, the global context */
for (i = 1; i < srv->config_context->used; i++) {
if (!config_check_cond(con, i)) continue; /* condition not matched */
data_config *dc = (data_config *)srv->config_context->data[i];
specific_config *s = srv->config_storage[i];
/* condition didn't match */
if (!config_check_cond(srv, con, dc)) continue;
/* merge config */
for (j = 0; j < dc->value->used; j++) {
data_unset *du = dc->value->data[j];

2
src/configfile.h

@ -152,6 +152,6 @@ int config_insert_values_global(server *srv, const array *ca, const config_value
__attribute_cold__
int config_insert_values_internal(server *srv, const array *ca, const config_values_t *cv, config_scope_type_t scope);
int config_check_cond(server *srv, connection *con, const data_config *dc);
int config_check_cond(connection *con, int context_ndx);
#endif

5
src/mod_access.c

@ -113,12 +113,11 @@ static int mod_access_patch_connection(server *srv, connection *con, plugin_data
/* skip the first, the global context */
for (i = 1; i < srv->config_context->used; i++) {
if (!config_check_cond(con, i)) continue; /* condition not matched */
data_config *dc = (data_config *)srv->config_context->data[i];
s = p->config_storage[i];
/* condition didn't match */
if (!config_check_cond(srv, con, dc)) continue;
/* merge config */
for (j = 0; j < dc->value->used; j++) {
data_unset *du = dc->value->data[j];

5
src/mod_accesslog.c

@ -723,12 +723,11 @@ static int mod_accesslog_patch_connection(server *srv, connection *con, plugin_d
/* skip the first, the global context */
for (i = 1; i < srv->config_context->used; i++) {
if (!config_check_cond(con, i)) continue; /* condition not matched */
data_config *dc = (data_config *)srv->config_context->data[i];
s = p->config_storage[i];
/* condition didn't match */
if (!config_check_cond(srv, con, dc)) continue;
/* merge config */
for (j = 0; j < dc->value->used; j++) {
data_unset *du = dc->value->data[j];

5
src/mod_alias.c

@ -137,12 +137,11 @@ static int mod_alias_patch_connection(server *srv, connection *con, plugin_data
/* skip the first, the global context */
for (i = 1; i < srv->config_context->used; i++) {
if (!config_check_cond(con, i)) continue; /* condition not matched */
data_config *dc = (data_config *)srv->config_context->data[i];
s = p->config_storage[i];
/* condition didn't match */
if (!config_check_cond(srv, con, dc)) continue;
/* merge config */
for (j = 0; j < dc->value->used; j++) {
data_unset *du = dc->value->data[j];

5
src/mod_auth.c

@ -437,12 +437,11 @@ static int mod_auth_patch_connection(server *srv, connection *con, plugin_data *
/* skip the first, the global context */
for (i = 1; i < srv->config_context->used; i++) {
if (!config_check_cond(con, i)) continue; /* condition not matched */
data_config *dc = (data_config *)srv->config_context->data[i];
s = p->config_storage[i];
/* condition didn't match */
if (!config_check_cond(srv, con, dc)) continue;
/* merge config */
for (j = 0; j < dc->value->used; j++) {
data_unset *du = dc->value->data[j];

5
src/mod_authn_file.c

@ -170,12 +170,11 @@ static int mod_authn_file_patch_connection(server *srv, connection *con, plugin_
/* skip the first, the global context */
for (i = 1; i < srv->config_context->used; i++) {
if (!config_check_cond(con, i)) continue; /* condition not matched */
data_config *dc = (data_config *)srv->config_context->data[i];
s = p->config_storage[i];
/* condition didn't match */
if (!config_check_cond(srv, con, dc)) continue;
/* merge config */
for (j = 0; j < dc->value->used; j++) {
data_unset *du = dc->value->data[j];

5
src/mod_authn_gssapi.c

@ -146,12 +146,11 @@ static int mod_authn_gssapi_patch_connection(server *srv, connection *con, plugi
/* skip the first, the global context */
for (i = 1; i < srv->config_context->used; i++) {
if (!config_check_cond(con, i)) continue; /* condition not matched */
data_config *dc = (data_config *)srv->config_context->data[i];
s = p->config_storage[i];
/* condition didn't match */
if (!config_check_cond(srv, con, dc)) continue;
/* merge config */
for (j = 0; j < dc->value->used; j++) {
data_unset *du = dc->value->data[j];

5
src/mod_authn_ldap.c

@ -204,12 +204,11 @@ static int mod_authn_ldap_patch_connection(server *srv, connection *con, plugin_
/* skip the first, the global context */
for (i = 1; i < srv->config_context->used; i++) {
if (!config_check_cond(con, i)) continue; /* condition not matched */
data_config *dc = (data_config *)srv->config_context->data[i];
s = p->config_storage[i];
/* condition didn't match */
if (!config_check_cond(srv, con, dc)) continue;
/* merge config */
for (j = 0; j < dc->value->used; j++) {
data_unset *du = dc->value->data[j];

5
src/mod_authn_mysql.c

@ -294,12 +294,11 @@ static int mod_authn_mysql_patch_connection(server *srv, connection *con, plugin
/* skip the first, the global context */
for (i = 1; i < srv->config_context->used; i++) {
if (!config_check_cond(con, i)) continue; /* condition not matched */
data_config *dc = (data_config *)srv->config_context->data[i];
s = p->config_storage[i];
/* condition didn't match */
if (!config_check_cond(srv, con, dc)) continue;
/* merge config */
for (j = 0; j < dc->value->used; j++) {
data_unset *du = dc->value->data[j];

5
src/mod_authn_pam.c

@ -108,10 +108,9 @@ static int mod_authn_pam_patch_connection(server *srv, connection *con, plugin_d
/* skip the first, the global context */
for (size_t i = 1; i < srv->config_context->used; ++i) {
data_config *dc = (data_config *)srv->config_context->data[i];
if (!config_check_cond(con, i)) continue; /* condition not matched */
/* condition didn't match */
if (!config_check_cond(srv, con, dc)) continue;
data_config *dc = (data_config *)srv->config_context->data[i];
/* merge config */
s = p->config_storage[i];

5
src/mod_authn_sasl.c

@ -160,10 +160,9 @@ static int mod_authn_sasl_patch_connection(server *srv, connection *con, plugin_
/* skip the first, the global context */
for (size_t i = 1; i < srv->config_context->used; ++i) {
data_config *dc = (data_config *)srv->config_context->data[i];
if (!config_check_cond(con, i)) continue; /* condition not matched */
/* condition didn't match */
if (!config_check_cond(srv, con, dc)) continue;
data_config *dc = (data_config *)srv->config_context->data[i];
/* merge config */
s = p->config_storage[i];

5
src/mod_cgi.c

@ -874,12 +874,11 @@ static int mod_cgi_patch_connection(server *srv, connection *con, plugin_data *p
/* skip the first, the global context */
for (i = 1; i < srv->config_context->used; i++) {
if (!config_check_cond(con, i)) continue; /* condition not matched */
data_config *dc = (data_config *)srv->config_context->data[i];
s = p->config_storage[i];
/* condition didn't match */
if (!config_check_cond(srv, con, dc)) continue;
/* merge config */
for (j = 0; j < dc->value->used; j++) {
data_unset *du = dc->value->data[j];

5
src/mod_cml.c

@ -169,12 +169,11 @@ static int mod_cml_patch_connection(server *srv, connection *con, plugin_data *p
/* skip the first, the global context */
for (i = 1; i < srv->config_context->used; i++) {
if (!config_check_cond(con, i)) continue; /* condition not matched */
data_config *dc = (data_config *)srv->config_context->data[i];
s = p->config_storage[i];
/* condition didn't match */
if (!config_check_cond(srv, con, dc)) continue;
/* merge config */
for (j = 0; j < dc->value->used; j++) {
data_unset *du = dc->value->data[j];

5
src/mod_compress.c

@ -755,12 +755,11 @@ static int mod_compress_patch_connection(server *srv, connection *con, plugin_da
/* skip the first, the global context */
for (i = 1; i < srv->config_context->used; i++) {
if (!config_check_cond(con, i)) continue; /* condition not matched */
data_config *dc = (data_config *)srv->config_context->data[i];
s = p->config_storage[i];
/* condition didn't match */
if (!config_check_cond(srv, con, dc)) continue;
/* merge config */
for (j = 0; j < dc->value->used; j++) {
data_unset *du = dc->value->data[j];

5
src/mod_deflate.c

@ -955,12 +955,11 @@ static int mod_deflate_patch_connection(server *srv, connection *con, plugin_dat
/* skip the first, the global context */
for (i = 1; i < srv->config_context->used; i++) {
if (!config_check_cond(con, i)) continue; /* condition not matched */
data_config *dc = (data_config *)srv->config_context->data[i];
s = p->config_storage[i];
/* condition didn't match */
if (!config_check_cond(srv, con, dc)) continue;
/* merge config */
for (j = 0; j < dc->value->used; j++) {
data_unset *du = dc->value->data[j];

5
src/mod_dirlisting.c

@ -358,12 +358,11 @@ static int mod_dirlisting_patch_connection(server *srv, connection *con, plugin_
/* skip the first, the global context */
for (i = 1; i < srv->config_context->used; i++) {
if (!config_check_cond(con, i)) continue; /* condition not matched */
data_config *dc = (data_config *)srv->config_context->data[i];
s = p->config_storage[i];
/* condition didn't match */
if (!config_check_cond(srv, con, dc)) continue;
/* merge config */
for (j = 0; j < dc->value->used; j++) {
data_unset *du = dc->value->data[j];

5
src/mod_evasive.c

@ -122,12 +122,11 @@ static int mod_evasive_patch_connection(server *srv, connection *con, plugin_dat
/* skip the first, the global context */
for (i = 1; i < srv->config_context->used; i++) {
if (!config_check_cond(con, i)) continue; /* condition not matched */
data_config *dc = (data_config *)srv->config_context->data[i];
s = p->config_storage[i];
/* condition didn't match */
if (!config_check_cond(srv, con, dc)) continue;
/* merge config */
for (j = 0; j < dc->value->used; j++) {
data_unset *du = dc->value->data[j];

5
src/mod_evhost.c

@ -263,12 +263,11 @@ static int mod_evhost_patch_connection(server *srv, connection *con, plugin_data
/* skip the first, the global context */
for (i = 1; i < srv->config_context->used; i++) {
if (!config_check_cond(con, i)) continue; /* condition not matched */
data_config *dc = (data_config *)srv->config_context->data[i];
s = p->config_storage[i];
/* condition didn't match */
if (!config_check_cond(srv, con, dc)) continue;
/* merge config */
for (j = 0; j < dc->value->used; j++) {
data_unset *du = dc->value->data[j];

5
src/mod_expire.c

@ -302,12 +302,11 @@ static int mod_expire_patch_connection(server *srv, connection *con, plugin_data
/* skip the first, the global context */
for (i = 1; i < srv->config_context->used; i++) {
if (!config_check_cond(con, i)) continue; /* condition not matched */
data_config *dc = (data_config *)srv->config_context->data[i];
s = p->config_storage[i];
/* condition didn't match */
if (!config_check_cond(srv, con, dc)) continue;
/* merge config */
for (j = 0; j < dc->value->used; j++) {
data_unset *du = dc->value->data[j];

5
src/mod_extforward.c

@ -387,12 +387,11 @@ static int mod_extforward_patch_connection(server *srv, connection *con, plugin_
/* skip the first, the global context */
for (i = 1; i < srv->config_context->used; i++) {
if (!config_check_cond(con, i)) continue; /* condition not matched */
data_config *dc = (data_config *)srv->config_context->data[i];
s = p->config_storage[i];
/* condition didn't match */
if (!config_check_cond(srv, con, dc)) continue;
/* merge config */
for (j = 0; j < dc->value->used; j++) {
data_unset *du = dc->value->data[j];

5
src/mod_fastcgi.c

@ -452,12 +452,11 @@ static int fcgi_patch_connection(server *srv, connection *con, plugin_data *p) {
/* skip the first, the global context */
for (i = 1; i < srv->config_context->used; i++) {
if (!config_check_cond(con, i)) continue; /* condition not matched */
data_config *dc = (data_config *)srv->config_context->data[i];
s = p->config_storage[i];
/* condition didn't match */
if (!config_check_cond(srv, con, dc)) continue;
/* merge config */
for (j = 0; j < dc->value->used; j++) {
data_unset *du = dc->value->data[j];

5
src/mod_flv_streaming.c

@ -97,12 +97,11 @@ static int mod_flv_streaming_patch_connection(server *srv, connection *con, plug
/* skip the first, the global context */
for (i = 1; i < srv->config_context->used; i++) {
if (!config_check_cond(con, i)) continue; /* condition not matched */
data_config *dc = (data_config *)srv->config_context->data[i];
s = p->config_storage[i];
/* condition didn't match */
if (!config_check_cond(srv, con, dc)) continue;
/* merge config */
for (j = 0; j < dc->value->used; j++) {
data_unset *du = dc->value->data[j];

5
src/mod_geoip.c

@ -188,12 +188,11 @@ static int mod_geoip_patch_connection(server *srv, connection *con, plugin_data
/* skip the first, the global context */
for (i = 1; i < srv->config_context->used; i++) {
if (!config_check_cond(con, i)) continue; /* condition not matched */
data_config *dc = (data_config *)srv->config_context->data[i];
s = p->config_storage[i];
/* condition didn't match */
if (!config_check_cond(srv, con, dc)) continue;
/* merge config */
for (j = 0; j < dc->value->used; j++) {
data_unset *du = dc->value->data[j];

5
src/mod_indexfile.c

@ -121,12 +121,11 @@ static int mod_indexfile_patch_connection(server *srv, connection *con, plugin_d
/* skip the first, the global context */
for (i = 1; i < srv->config_context->used; i++) {
if (!config_check_cond(con, i)) continue; /* condition not matched */
data_config *dc = (data_config *)srv->config_context->data[i];
s = p->config_storage[i];
/* condition didn't match */
if (!config_check_cond(srv, con, dc)) continue;
/* merge config */
for (j = 0; j < dc->value->used; j++) {
data_unset *du = dc->value->data[j];

5
src/mod_magnet.c

@ -149,12 +149,11 @@ static int mod_magnet_patch_connection(server *srv, connection *con, plugin_data
/* skip the first, the global context */
for (i = 1; i < srv->config_context->used; i++) {
if (!config_check_cond(con, i)) continue; /* condition not matched */
data_config *dc = (data_config *)srv->config_context->data[i];
s = p->config_storage[i];
/* condition didn't match */
if (!config_check_cond(srv, con, dc)) continue;
/* merge config */
for (j = 0; j < dc->value->used; j++) {
data_unset *du = dc->value->data[j];

5
src/mod_maxminddb.c

@ -333,10 +333,9 @@ mod_maxmind_patch_connection (server * const srv,
s = p->config_storage[1]; /* base config (global context) copied above */
for (size_t i = 1; i < srv->config_context->used; ++i) {
data_config *dc = context_data[i];
if (!config_check_cond(srv, con, dc))
continue; /* condition did not match */
if (!config_check_cond(con, i)) continue; /* condition not matched */
data_config *dc = context_data[i];
s = p->config_storage[i];
/* merge config */

5
src/mod_mysql_vhost.c

@ -240,12 +240,11 @@ static int mod_mysql_vhost_patch_connection(server *srv, connection *con, plugin
/* skip the first, the global context */
for (i = 1; i < srv->config_context->used; i++) {
if (!config_check_cond(con, i)) continue; /* condition not matched */
data_config *dc = (data_config *)srv->config_context->data[i];
s = p->config_storage[i];
/* condition didn't match */
if (!config_check_cond(srv, con, dc)) continue;
/* merge config */
for (j = 0; j < dc->value->used; j++) {
data_unset *du = dc->value->data[j];

5
src/mod_openssl.c

@ -1391,12 +1391,11 @@ mod_openssl_patch_connection (server *srv, connection *con, handler_ctx *hctx)
/* skip the first, the global context */
for (size_t i = 1; i < srv->config_context->used; ++i) {
if (!config_check_cond(con, i)) continue; /* condition not matched */
data_config *dc = (data_config *)srv->config_context->data[i];
s = plugin_data_singleton->config_storage[i];
/* condition didn't match */
if (!config_check_cond(srv, con, dc)) continue;
/* merge config */
for (size_t j = 0; j < dc->value->used; ++j) {
data_unset *du = dc->value->data[j];

5
src/mod_proxy.c

@ -890,12 +890,11 @@ static int mod_proxy_patch_connection(server *srv, connection *con, plugin_data
/* skip the first, the global context */
for (i = 1; i < srv->config_context->used; i++) {
if (!config_check_cond(con, i)) continue; /* condition not matched */
data_config *dc = (data_config *)srv->config_context->data[i];
s = p->config_storage[i];
/* condition didn't match */
if (!config_check_cond(srv, con, dc)) continue;
/* merge config */
for (j = 0; j < dc->value->used; j++) {
data_unset *du = dc->value->data[j];

5
src/mod_redirect.c

@ -124,12 +124,11 @@ static int mod_redirect_patch_connection(server *srv, connection *con, plugin_da
/* skip the first, the global context */
for (i = 1; i < srv->config_context->used; i++) {
if (!config_check_cond(con, i)) continue; /* condition not matched */
data_config *dc = (data_config *)srv->config_context->data[i];
s = p->config_storage[i];
/* condition didn't match */
if (!config_check_cond(srv, con, dc)) continue;
/* merge config */
for (j = 0; j < dc->value->used; j++) {
data_unset *du = dc->value->data[j];

5
src/mod_rewrite.c

@ -173,12 +173,11 @@ static int mod_rewrite_patch_connection(server *srv, connection *con, plugin_dat
/* skip the first, the global context */
for (i = 1; i < srv->config_context->used; i++) {
if (!config_check_cond(con, i)) continue; /* condition not matched */
data_config *dc = (data_config *)srv->config_context->data[i];
s = p->config_storage[i];
/* condition didn't match */
if (!config_check_cond(srv, con, dc)) continue;
/* merge config */
for (j = 0; j < dc->value->used; j++) {
data_unset *du = dc->value->data[j];

5
src/mod_rrdtool.c

@ -255,12 +255,11 @@ static int mod_rrd_patch_connection(server *srv, connection *con, plugin_data *p
/* skip the first, the global context */
for (i = 1; i < srv->config_context->used; i++) {
if (!config_check_cond(con, i)) continue; /* condition not matched */
data_config *dc = (data_config *)srv->config_context->data[i];
s = p->config_storage[i];
/* condition didn't match */
if (!config_check_cond(srv, con, dc)) continue;
/* merge config */
for (j = 0; j < dc->value->used; j++) {
data_unset *du = dc->value->data[j];

5
src/mod_scgi.c

@ -241,12 +241,11 @@ static int scgi_patch_connection(server *srv, connection *con, plugin_data *p) {
/* skip the first, the global context */
for (i = 1; i < srv->config_context->used; i++) {
if (!config_check_cond(con, i)) continue; /* condition not matched */
data_config *dc = (data_config *)srv->config_context->data[i];
s = p->config_storage[i];
/* condition didn't match */
if (!config_check_cond(srv, con, dc)) continue;
/* merge config */
for (j = 0; j < dc->value->used; j++) {
data_unset *du = dc->value->data[j];

5
src/mod_secdownload.c

@ -407,12 +407,11 @@ static int mod_secdownload_patch_connection(server *srv, connection *con, plugin
/* skip the first, the global context */
for (i = 1; i < srv->config_context->used; i++) {
if (!config_check_cond(con, i)) continue; /* condition not matched */
data_config *dc = (data_config *)srv->config_context->data[i];
s = p->config_storage[i];
/* condition didn't match */
if (!config_check_cond(srv, con, dc)) continue;
/* merge config */
for (j = 0; j < dc->value->used; j++) {
data_unset *du = dc->value->data[j];

5
src/mod_setenv.c

@ -166,12 +166,11 @@ static int mod_setenv_patch_connection(server *srv, connection *con, plugin_data
/* skip the first, the global context */
for (i = 1; i < srv->config_context->used; i++) {
if (!config_check_cond(con, i)) continue; /* condition not matched */
data_config *dc = (data_config *)srv->config_context->data[i];
s = p->config_storage[i];
/* condition didn't match */
if (!config_check_cond(srv, con, dc)) continue;
/* merge config */
for (j = 0; j < dc->value->used; j++) {
data_unset *du = dc->value->data[j];

5
src/mod_simple_vhost.c

@ -190,12 +190,11 @@ static int mod_simple_vhost_patch_connection(server *srv, connection *con, plugi
/* skip the first, the global context */
for (i = 1; i < srv->config_context->used; i++) {
if (!config_check_cond(con, i)) continue; /* condition not matched */
data_config *dc = (data_config *)srv->config_context->data[i];
s = p->config_storage[i];
/* condition didn't match */
if (!config_check_cond(srv, con, dc)) continue;
/* merge config */
for (j = 0; j < dc->value->used; j++) {
data_unset *du = dc->value->data[j];

5
src/mod_skeleton.c

@ -125,12 +125,11 @@ static int mod_skeleton_patch_connection(server *srv, connection *con, plugin_da
/* skip the first, the global context */
for (size_t i = 1; i < srv->config_context->used; ++i) {
if (!config_check_cond(con, i)) continue; /* condition not matched */
data_config *dc = (data_config *)srv->config_context->data[i];
s = p->config_storage[i];
/* condition didn't match */
if (!config_check_cond(srv, con, dc)) continue;
/* merge config */
for (size_t j = 0; j < dc->value->used; ++j) {
data_unset *du = dc->value->data[j];

5
src/mod_sockproxy.c

@ -107,12 +107,11 @@ static int mod_sockproxy_patch_connection(server *srv, connection *con, plugin_d
/* skip the first, the global context */
for (i = 1; i < srv->config_context->used; i++) {
if (!config_check_cond(con, i)) continue; /* condition not matched */
data_config *dc = (data_config *)srv->config_context->data[i];
s = p->config_storage[i];
/* condition didn't match */
if (!config_check_cond(srv, con, dc)) continue;
/* merge config */
for (j = 0; j < dc->value->used; j++) {
data_unset *du = dc->value->data[j];

5
src/mod_ssi.c

@ -1272,12 +1272,11 @@ static int mod_ssi_patch_connection(server *srv, connection *con, plugin_data *p
/* skip the first, the global context */
for (i = 1; i < srv->config_context->used; i++) {
if (!config_check_cond(con, i)) continue; /* condition not matched */
data_config *dc = (data_config *)srv->config_context->data[i];
s = p->config_storage[i];
/* condition didn't match */
if (!config_check_cond(srv, con, dc)) continue;
/* merge config */
for (j = 0; j < dc->value->used; j++) {
data_unset *du = dc->value->data[j];

5
src/mod_staticfile.c

@ -130,12 +130,11 @@ static int mod_staticfile_patch_connection(server *srv, connection *con, plugin_
/* skip the first, the global context */
for (i = 1; i < srv->config_context->used; i++) {
if (!config_check_cond(con, i)) continue; /* condition not matched */
data_config *dc = (data_config *)srv->config_context->data[i];
s = p->config_storage[i];
/* condition didn't match */
if (!config_check_cond(srv, con, dc)) continue;
/* merge config */
for (j = 0; j < dc->value->used; j++) {
data_unset *du = dc->value->data[j];

5
src/mod_status.c

@ -864,12 +864,11 @@ static int mod_status_patch_connection(server *srv, connection *con, plugin_data
/* skip the first, the global context */
for (i = 1; i < srv->config_context->used; i++) {
if (!config_check_cond(con, i)) continue; /* condition not matched */
data_config *dc = (data_config *)srv->config_context->data[i];
s = p->config_storage[i];
/* condition didn't match */
if (!config_check_cond(srv, con, dc)) continue;
/* merge config */
for (j = 0; j < dc->value->used; j++) {
data_unset *du = dc->value->data[j];

5
src/mod_trigger_b4_dl.c

@ -282,12 +282,11 @@ static int mod_trigger_b4_dl_patch_connection(server *srv, connection *con, plug
/* skip the first, the global context */
for (i = 1; i < srv->config_context->used; i++) {
if (!config_check_cond(con, i)) continue; /* condition not matched */
data_config *dc = (data_config *)srv->config_context->data[i];
s = p->config_storage[i];
/* condition didn't match */
if (!config_check_cond(srv, con, dc)) continue;
/* merge config */
for (j = 0; j < dc->value->used; j++) {
data_unset *du = dc->value->data[j];

5
src/mod_uploadprogress.c

@ -227,12 +227,11 @@ static int mod_uploadprogress_patch_connection(server *srv, connection *con, plu
/* skip the first, the global context */
for (i = 1; i < srv->config_context->used; i++) {
if (!config_check_cond(con, i)) continue; /* condition not matched */
data_config *dc = (data_config *)srv->config_context->data[i];
s = p->config_storage[i];
/* condition didn't match */
if (!config_check_cond(srv, con, dc)) continue;
/* merge config */
for (j = 0; j < dc->value->used; j++) {
data_unset *du = dc->value->data[j];

5
src/mod_userdir.c

@ -161,12 +161,11 @@ static int mod_userdir_patch_connection(server *srv, connection *con, plugin_dat
/* skip the first, the global context */
for (i = 1; i < srv->config_context->used; i++) {
if (!config_check_cond(con, i)) continue; /* condition not matched */
data_config *dc = (data_config *)srv->config_context->data[i];
s = p->config_storage[i];
/* condition didn't match */
if (!config_check_cond(srv, con, dc)) continue;
/* merge config */
for (j = 0; j < dc->value->used; j++) {
data_unset *du = dc->value->data[j];

5
src/mod_usertrack.c

@ -155,12 +155,11 @@ static int mod_usertrack_patch_connection(server *srv, connection *con, plugin_d
/* skip the first, the global context */
for (i = 1; i < srv->config_context->used; i++) {
if (!config_check_cond(con, i)) continue; /* condition not matched */
data_config *dc = (data_config *)srv->config_context->data[i];
s = p->config_storage[i];
/* condition didn't match */
if (!config_check_cond(srv, con, dc)) continue;
/* merge config */
for (j = 0; j < dc->value->used; j++) {
data_unset *du = dc->value->data[j];

5
src/mod_vhostdb.c

@ -103,12 +103,11 @@ static int mod_vhostdb_patch_connection(server *srv, connection *con, plugin_dat
/* skip the first, the global context */
for (size_t i = 1; i < srv->config_context->used; ++i) {
if (!config_check_cond(con, i)) continue; /* condition not matched */
data_config *dc = (data_config *)srv->config_context->data[i];
s = p->config_storage[i];
/* condition didn't match */
if (!config_check_cond(srv, con, dc)) continue;
/* merge config */
for (size_t j = 0; j < dc->value->used; ++j) {
data_unset *du = dc->value->data[j];

5
src/mod_vhostdb_dbi.c

@ -298,12 +298,11 @@ static void mod_vhostdb_patch_connection (server *srv, connection *con, plugin_d
/* skip the first, the global context */
for (size_t i = 1; i < srv->config_context->used; ++i) {
if (!config_check_cond(con, i)) continue; /* condition not matched */
data_config *dc = (data_config *)srv->config_context->data[i];
s = p->config_storage[i];
/* condition didn't match */
if (!config_check_cond(srv, con, dc)) continue;
/* merge config */
for (size_t j = 0; j < dc->value->used; ++j) {
data_unset *du = dc->value->data[j];

5
src/mod_vhostdb_ldap.c

@ -526,12 +526,11 @@ static void mod_vhostdb_patch_connection (server *srv, connection *con, plugin_d
/* skip the first, the global context */
for (size_t i = 1; i < srv->config_context->used; ++i) {
if (!config_check_cond(con, i)) continue; /* condition not matched */
data_config *dc = (data_config *)srv->config_context->data[i];
s = p->config_storage[i];
/* condition didn't match */
if (!config_check_cond(srv, con, dc)) continue;
/* merge config */
for (size_t j = 0; j < dc->value->used; ++j) {
data_unset *du = dc->value->data[j];

5
src/mod_vhostdb_mysql.c

@ -262,12 +262,11 @@ static void mod_vhostdb_patch_connection (server *srv, connection *con, plugin_d
/* skip the first, the global context */
for (size_t i = 1; i < srv->config_context->used; ++i) {
if (!config_check_cond(con, i)) continue; /* condition not matched */
data_config *dc = (data_config *)srv->config_context->data[i];
s = p->config_storage[i];
/* condition didn't match */
if (!config_check_cond(srv, con, dc)) continue;
/* merge config */
for (size_t j = 0; j < dc->value->used; ++j) {
data_unset *du = dc->value->data[j];

5
src/mod_vhostdb_pgsql.c

@ -239,12 +239,11 @@ static void mod_vhostdb_patch_connection (server *srv, connection *con, plugin_d
/* skip the first, the global context */
for (size_t i = 1; i < srv->config_context->used; ++i) {
if (!config_check_cond(con, i)) continue; /* condition not matched */
data_config *dc = (data_config *)srv->config_context->data[i];
s = p->config_storage[i];
/* condition didn't match */
if (!config_check_cond(srv, con, dc)) continue;
/* merge config */
for (size_t j = 0; j < dc->value->used; ++j) {
data_unset *du = dc->value->data[j];

5
src/mod_webdav.c

@ -481,10 +481,9 @@ mod_webdav_patch_connection (server * const restrict srv,
(data_config **)srv->config_context->data;
for (size_t i = 1; i < srv->config_context->used; ++i) {
data_config * const dc = context_data[i];
if (!config_check_cond(srv, con, dc))
continue; /* condition did not match */
if (!config_check_cond(con, i)) continue; /* condition not matched */
data_config * const dc = context_data[i];
s = p->config_storage[i];
/* merge config */

6
src/mod_wstunnel.c

@ -371,13 +371,11 @@ static void mod_wstunnel_patch_connection(server *srv, connection *con, plugin_d
/* skip the first, the global context */
for (i = 1; i < srv->config_context->used; i++) {
if (!config_check_cond(con, i)) continue; /* condition not matched */
data_config *dc = (data_config *)srv->config_context->data[i];
s = p->config_storage[i];
/* condition didn't match */
if (!config_check_cond(srv, con, dc)) {
continue;
}
/* merge config */
for (j = 0; j < dc->value->used; j++) {
data_unset *du = dc->value->data[j];

Loading…
Cancel
Save