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_vhostdb_mysql.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_vhostdb_mysql.c')
-rw-r--r-- | src/mod_vhostdb_mysql.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mod_vhostdb_mysql.c b/src/mod_vhostdb_mysql.c index 7111e1b8..e617188a 100644 --- a/src/mod_vhostdb_mysql.c +++ b/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]; |