[svn:mod_parrot] r431 - mod_parrot/branches/hll-modules/src
[email protected] Fri, 19 Sep 2008 06:49:53 -0700 (PDT)
| Newsgroups | perl.cvs.mod_parrot |
|---|---|
| Message-ID | <[email protected]> |
Author: jhorwitz
Date: Fri Sep 19 06:49:52 2008
New Revision: 431
Modified:
mod_parrot/branches/hll-modules/src/mod_parrot.c
Log:
fix open_logs handler when run w/o an early startup (tests)
Modified: mod_parrot/branches/hll-modules/src/mod_parrot.c
==============================================================================
--- mod_parrot/branches/hll-modules/src/mod_parrot.c (original)
+++ mod_parrot/branches/hll-modules/src/mod_parrot.c Fri Sep 19 06:49:52 2008
@@ -144,15 +144,15 @@
else {
interp = ctxp->interp;
}
+
+ /* usually set s in a hook, but need it here for the config phase */
+ ctxp->s = s;
}
else {
MPLOG_ERROR(s, "init_ctx: no free contexts");
ctxp = (modparrot_context *)NULL;
}
- /* we normally set s in a hook, but we need it here for the config phase */
- ctxp->s = s;
-
return(ctxp);
}
@@ -274,7 +274,7 @@
return HTTP_INTERNAL_SERVER_ERROR;
}
- /* we're REALLY_FIRST, so reset the module index */
+ /* we're FIRST, so reset the module index */
ctxp->module_index = -1;
/* clean up */
@@ -486,7 +486,7 @@
return;
}
- /* we're REALLY_FIRST, so reset the module index */
+ /* we're FIRST, so reset the module index */
ctxp->module_index = -1;
/* clean up */
@@ -545,7 +545,7 @@
return HTTP_INTERNAL_SERVER_ERROR;
}
- /* we're REALLY_FIRST, so reset the module index */
+ /* we're FIRST, so reset the module index */
ctxp->module_index = -1;
/* clean up */
@@ -609,15 +609,6 @@
Parrot_Interp parent_interp;
server_rec *vs;
- /* initialize context */
- if (!(ctxp = init_ctx(s))) {
- MPLOG_ERROR(s, "context initialization failed");
- return HTTP_INTERNAL_SERVER_ERROR;
- }
-
- /* we're REALLY_FIRST, so reset the module index */
- ctxp->module_index = -1;
-
/* get apache configs */
mpcfg = ap_get_module_config(s->module_config, &parrot_module);
@@ -627,6 +618,9 @@
}
parent_interp = ctxp->interp;
+ /* we're FIRST, so reset the module index */
+ ctxp->module_index = -1;
+
/* load ParrotLoad files */
modparrot_load_files(ctxp->interp, s, mpcfg->preload);