diff options
author | Jeff Trawick <trawick@apache.org> | 2012-08-20 15:31:24 +0200 |
---|---|---|
committer | Jeff Trawick <trawick@apache.org> | 2012-08-20 15:31:24 +0200 |
commit | f51c575d252e846874943c9c1d995370e1390ab8 (patch) | |
tree | 379ede37896ca53090337790bf2c443c434780bc | |
parent | Add default value of PrivilegesMode to docs. (diff) | |
download | apache2-f51c575d252e846874943c9c1d995370e1390ab8.tar.xz apache2-f51c575d252e846874943c9c1d995370e1390ab8.zip |
use state query API instead of static counters to determine processing
phase in check_config and post_config hooks
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1375013 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | server/mpm/winnt/mpm_winnt.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/server/mpm/winnt/mpm_winnt.c b/server/mpm/winnt/mpm_winnt.c index cd2bb33f99..94aaede59b 100644 --- a/server/mpm/winnt/mpm_winnt.c +++ b/server/mpm/winnt/mpm_winnt.c @@ -1402,12 +1402,12 @@ static int winnt_check_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec* s) { int is_parent; - static int restart_num = 0; int startup = 0; /* We want this only in the parent and only the first time around */ is_parent = (parent_pid == my_pid); - if (is_parent && restart_num++ == 0) { + if (is_parent && + ap_state_query(AP_SQ_MAIN_STATE) == AP_SQ_MS_CREATE_PRE_CONFIG) { startup = 1; } @@ -1494,7 +1494,6 @@ static int winnt_check_config(apr_pool_t *pconf, apr_pool_t *plog, static int winnt_post_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec* s) { - static int restart_num = 0; apr_status_t rv = 0; /* Handle the following SCM aspects in this phase: @@ -1554,7 +1553,8 @@ static int winnt_post_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *pt if (parent_pid == my_pid) { - if (restart_num++ == 1) + if (ap_state_query(AP_SQ_MAIN_STATE) != AP_SQ_MS_CREATE_PRE_CONFIG + && ap_state_query(AP_SQ_CONFIG_GEN) == 1) { /* This code should be run once in the parent and not run * across a restart |