diff options
author | Glenn Strauss <gstrauss@gluelogic.com> | 2019-10-17 01:27:52 -0400 |
---|---|---|
committer | Glenn Strauss <gstrauss@gluelogic.com> | 2020-05-23 17:59:29 -0400 |
commit | 36f64b26a11500ac720dad148481a1a0e66a8ba7 (patch) | |
tree | c978431d0ddffe72cb9888cf7eda83dab48607d0 /src/mod_maxminddb.c | |
parent | b6e0880ae6a92991a13d3297bbf2e2ac5159e6b6 (diff) | |
download | lighttpd-git-36f64b26a11500ac720dad148481a1a0e66a8ba7.tar.gz |
[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)
Diffstat (limited to 'src/mod_maxminddb.c')
-rw-r--r-- | src/mod_maxminddb.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mod_maxminddb.c b/src/mod_maxminddb.c index d5e477e1..519187fb 100644 --- a/src/mod_maxminddb.c +++ b/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 */ |