Lines 128-133
Link Here
|
128 |
#define JK_MAGIC_TYPE ("application/x-jakarta-servlet") |
128 |
#define JK_MAGIC_TYPE ("application/x-jakarta-servlet") |
129 |
#define NULL_FOR_EMPTY(x) ((x && !strlen(x)) ? NULL : x) |
129 |
#define NULL_FOR_EMPTY(x) ((x && !strlen(x)) ? NULL : x) |
130 |
#define STRNULL_FOR_NULL(x) ((x) ? (x) : "(null)") |
130 |
#define STRNULL_FOR_NULL(x) ((x) ? (x) : "(null)") |
|
|
131 |
#define JK_LOG_LOCK_KEY ("jk_log_lock_key") |
131 |
/* |
132 |
/* |
132 |
* If you are not using SSL, comment out the following line. It will make |
133 |
* If you are not using SSL, comment out the following line. It will make |
133 |
* apache run faster. |
134 |
* apache run faster. |
Lines 3200-3228
Link Here
|
3200 |
jk_server_conf_t *conf; |
3201 |
jk_server_conf_t *conf; |
3201 |
server_rec *srv = s; |
3202 |
server_rec *srv = s; |
3202 |
const char *err_string = NULL; |
3203 |
const char *err_string = NULL; |
|
|
3204 |
void *data = NULL; |
3203 |
|
3205 |
|
3204 |
/* create the jk log lockfiles in the parent */ |
3206 |
apr_pool_userdata_get(&data, JK_LOG_LOCK_KEY, s->process->pool); |
3205 |
if ((rv = apr_global_mutex_create(&jk_log_lock, NULL, |
3207 |
if (data == NULL) { |
3206 |
APR_LOCK_DEFAULT, |
3208 |
/* create the jk log lockfiles in the parent */ |
3207 |
pconf)) != APR_SUCCESS) { |
3209 |
if ((rv = apr_global_mutex_create(&jk_log_lock, NULL, |
3208 |
ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s, |
3210 |
APR_LOCK_DEFAULT, |
3209 |
"mod_jk: could not create jk_log_lock"); |
3211 |
s->process->pool)) != APR_SUCCESS) { |
3210 |
return HTTP_INTERNAL_SERVER_ERROR; |
3212 |
ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s, |
3211 |
} |
3213 |
"mod_jk: could not create jk_log_lock"); |
|
|
3214 |
return HTTP_INTERNAL_SERVER_ERROR; |
3215 |
} |
3212 |
|
3216 |
|
3213 |
#if JK_NEED_SET_MUTEX_PERMS |
3217 |
#if JK_NEED_SET_MUTEX_PERMS |
3214 |
#if (MODULE_MAGIC_NUMBER_MAJOR >= 20090208) |
3218 |
#if (MODULE_MAGIC_NUMBER_MAJOR >= 20090208) |
3215 |
rv = ap_unixd_set_global_mutex_perms(jk_log_lock); |
3219 |
rv = ap_unixd_set_global_mutex_perms(jk_log_lock); |
3216 |
#else |
3220 |
#else |
3217 |
rv = unixd_set_global_mutex_perms(jk_log_lock); |
3221 |
rv = unixd_set_global_mutex_perms(jk_log_lock); |
3218 |
#endif |
3222 |
#endif |
3219 |
if (rv != APR_SUCCESS) { |
3223 |
if (rv != APR_SUCCESS) { |
3220 |
ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s, |
3224 |
ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s, |
3221 |
"mod_jk: Could not set permissions on " |
3225 |
"mod_jk: Could not set permissions on " |
3222 |
"jk_log_lock; check User and Group directives"); |
3226 |
"jk_log_lock; check User and Group directives"); |
3223 |
return HTTP_INTERNAL_SERVER_ERROR; |
3227 |
return HTTP_INTERNAL_SERVER_ERROR; |
|
|
3228 |
} |
3229 |
#endif |
3230 |
apr_pool_userdata_set((const void *)jk_log_lock, JK_LOG_LOCK_KEY, |
3231 |
apr_pool_cleanup_null, s->process->pool); |
3232 |
} else { |
3233 |
jk_log_lock = (apr_global_mutex_t *)data; |
3224 |
} |
3234 |
} |
3225 |
#endif |
|
|
3226 |
|
3235 |
|
3227 |
main_server = s; |
3236 |
main_server = s; |
3228 |
jk_log_fps = apr_hash_make(pconf); |
3237 |
jk_log_fps = apr_hash_make(pconf); |