stas2002/12/12 03:45:26
Modified:src/modules/perl modperl_cmd.c
Log:
handle correctly the switches, when the server starts early. e.g., a
sample config at the base server's level:
PerlLoadModule Foo
PerlSwitches -Iwhatever
When PerlLoadModule returns, mod_perl is started already, so the next
command's switches are lost. This has nothing to do with checking whether
vhost is running, since in this case PerlSwitches apply to the top level.
PR: Obtained from: Submitted by:
Revision ChangesPath
1.34 +4 -2 modperl-2.0/src/modules/perl/modperl_cmd.c
Index: modperl_cmd.c
===
RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_cmd.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- modperl_cmd.c 7 Oct 2002 15:45:52 - 1.33
+++ modperl_cmd.c 12 Dec 2002 11:45:26 - 1.34
@@ -8,7 +8,7 @@
static char *modperl_cmd_too_late(cmd_parms *parms)
{
-return apr_pstrcat(parms-pool, mod_perl already running,
+return apr_pstrcat(parms-pool, mod_perl is already running,
too late for , parms-cmd-name, NULL);
}
@@ -69,7 +69,9 @@
{
server_rec *s = parms-server;
MP_dSCFG(s);
-if (modperl_is_running() modperl_vhost_is_running(s)) {
+if (s-is_virtual
+? modperl_vhost_is_running(s)
+: modperl_is_running() ) {
return modperl_cmd_too_late(parms);
}
MP_TRACE_d(MP_FUNC, arg = %s\n, arg);