static h2_mpm_type_t mpm_type = H2_MPM_UNKNOWN;
static module *mpm_module;
-static int checked;
-static void check_modules(void)
+static void check_modules(int force)
{
+ static int checked = 0;
int i;
- if (!checked) {
+
+ if (force || !checked) {
for (i = 0; ap_loaded_modules[i]; ++i) {
module *m = ap_loaded_modules[i];
+
if (!strcmp("event.c", m->name)) {
mpm_type = H2_MPM_EVENT;
mpm_module = m;
+ break;
}
else if (!strcmp("worker.c", m->name)) {
mpm_type = H2_MPM_WORKER;
mpm_module = m;
+ break;
}
else if (!strcmp("prefork.c", m->name)) {
mpm_type = H2_MPM_PREFORK;
mpm_module = m;
+ break;
}
}
checked = 1;
int maxw = h2_config_geti(config, H2_CONF_MAX_WORKERS);
int max_threads_per_child = 0;
int idle_secs = 0;
- int i;
h2_config_init(pool);
ap_mpm_query(AP_MPMQ_MAX_THREADS, &max_threads_per_child);
- for (i = 0; ap_loaded_modules[i]; ++i) {
- module *m = ap_loaded_modules[i];
- if (!strcmp("event.c", m->name)) {
- mpm_type = H2_MPM_EVENT;
- mpm_module = m;
- }
- else if (!strcmp("worker.c", m->name)) {
- mpm_type = H2_MPM_WORKER;
- mpm_module = m;
- }
- else if (!strcmp("prefork.c", m->name)) {
- mpm_type = H2_MPM_PREFORK;
- mpm_module = m;
- }
- }
+ check_modules(1);
if (minw <= 0) {
minw = max_threads_per_child;
return status;
}
-h2_mpm_type_t h2_conn_mpm_type(void) {
- check_modules();
+h2_mpm_type_t h2_conn_mpm_type(void)
+{
+ check_modules(0);
return mpm_type;
}
-static module *h2_conn_mpm_module(void) {
- check_modules();
+static module *h2_conn_mpm_module(void)
+{
+ check_modules(0);
return mpm_module;
}
* @macro
* Version number of the h2 module as c string
*/
-#define MOD_HTTP2_VERSION "1.0.12-DEVd"
+#define MOD_HTTP2_VERSION "1.0.13-DEVa"
/**
* @macro
* release. This is a 24 bit number with 8 bits for major number, 8 bits
* for minor and 8 bits for patch. Version 1.2.3 becomes 0x010203.
*/
-#define MOD_HTTP2_VERSION_NUM 0x01000c
+#define MOD_HTTP2_VERSION_NUM 0x01000d
#endif /* mod_h2_h2_version_h */