Merge in code fixes to create msr context on request failure.

This commit is contained in:
brectanus 2007-07-23 22:14:09 +00:00
parent 4d03b029f1
commit 8b9d914ed0

View File

@ -697,12 +697,20 @@ static void hook_error_log(const char *file, int line, int level, apr_status_t s
msr = retrieve_tx_context(r);
/* Create a context for requests we never had the chance to process */
/* TODO: This needs more testing */
if (level & APLOG_ERR) {
if (msr == NULL && apr_table_get(r->subprocess_env, "UNIQUE_ID")) {
msr = create_tx_context((request_rec *)r);
}
}
if ((msr == NULL)
&& ((level & APLOG_LEVELMASK) < APLOG_DEBUG)
&& apr_table_get(r->subprocess_env, "UNIQUE_ID"))
{
msr = create_tx_context((request_rec *)r);
if (msr->txcfg->debuglog_level >= 9) {
if (msr == NULL) {
msr_log(msr, 9, "Failed to create context after request failure.");
}
else {
msr_log(msr, 9, "Context created after request failure.");
}
}
}
if (msr == NULL) return;