cvs commit: modperl-2.0/src/modules/perl modperl_cmd.c

2002-12-12 Thread stas
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);
  
  
  



cvs commit: modperl-2.0/src/modules/perl modperl_cmd.c

2002-08-27 Thread dougm

dougm   2002/08/27 20:12:46

  Modified:src/modules/perl modperl_cmd.c
  Log:
  use ap_strstr_c instead of strstr to avoid a warning
  
  Revision  ChangesPath
  1.27  +1 -1  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.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- modperl_cmd.c 27 Aug 2002 04:26:54 -  1.26
  +++ modperl_cmd.c 28 Aug 2002 03:12:46 -  1.27
   -308,7 +308,7 
   server_rec *s = parms-server;
   const char *errmsg;
   
  -if (!strstr(arg, ::)) {
  +if (!ap_strstr_c(arg, ::)) {
   return DECLINE_CMD; /* let mod_so handle it */
   }
   
  
  
  



cvs commit: modperl-2.0/src/modules/perl modperl_cmd.c

2001-03-16 Thread dougm

dougm   01/03/16 22:08:05

  Modified:src/modules/perl modperl_cmd.c
  Log:
  make use of modperl_handler_array_ macros
  
  Revision  ChangesPath
  1.2   +2 -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.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- modperl_cmd.c 2001/03/16 05:52:29 1.1
  +++ modperl_cmd.c 2001/03/17 06:08:05 1.2
  @@ -6,13 +6,13 @@
   modperl_handler_t *h = modperl_handler_new(p, name);
   
   if (!*handlers) {
  -*handlers = apr_array_make(p, 1, sizeof(modperl_handler_t *));
  +*handlers = modperl_handler_array_new(p);
   MP_TRACE_d(MP_FUNC, "created handler stack\n");
   }
   
   /* XXX parse_handler if Perl is running */
   
  -*(modperl_handler_t **)apr_array_push(*handlers) = h;
  +modperl_handler_array_push(*handlers, h);
   MP_TRACE_d(MP_FUNC, "pushed handler: %s\n", h-name);
   
   return NULL;
  
  
  



cvs commit: modperl-2.0/src/modules/perl modperl_cmd.c modperl_cmd.h mod_perl.c mod_perl.h modperl_config.c modperl_config.h modperl_interp.c modperl_interp.h

2001-03-15 Thread dougm

dougm   01/03/15 21:52:29

  Modified:lib/ModPerl Code.pm
   src/modules/perl mod_perl.c mod_perl.h modperl_config.c
modperl_config.h modperl_interp.c modperl_interp.h
  Added:   src/modules/perl modperl_cmd.c modperl_cmd.h
  Log:
  move cmd stuffs into its own module
  
  Revision  ChangesPath
  1.48  +1 -1  modperl-2.0/lib/ModPerl/Code.pm
  
  Index: Code.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/ModPerl/Code.pm,v
  retrieving revision 1.47
  retrieving revision 1.48
  diff -u -r1.47 -r1.48
  --- Code.pm   2001/03/16 05:32:34 1.47
  +++ Code.pm   2001/03/16 05:52:28 1.48
  @@ -511,7 +511,7 @@
  generate_trace  = {h = 'modperl_trace.h'},
   );
   
  -my @c_src_names = qw(interp tipool log config options callback handler
  +my @c_src_names = qw(interp tipool log config cmd options callback handler
gtop util filter mgv pcw);
   my @g_c_names = map { "modperl_$_" } qw(hooks directives flags xsinit);
   my @c_names   = ('mod_perl', (map "modperl_$_", @c_src_names));
  
  
  
  1.39  +9 -9  modperl-2.0/src/modules/perl/mod_perl.c
  
  Index: mod_perl.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.c,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- mod_perl.c2001/03/16 05:32:35 1.38
  +++ mod_perl.c2001/03/16 05:52:29 1.39
  @@ -233,23 +233,23 @@
   }
   
   static const command_rec modperl_cmds[] = {  
  -MP_SRV_CMD_ITERATE("PerlSwitches", switches, "Perl Switches"),
  -MP_SRV_CMD_ITERATE("PerlOptions", options, "Perl Options"),
  +MP_CMD_SRV_ITERATE("PerlSwitches", switches, "Perl Switches"),
  +MP_CMD_SRV_ITERATE("PerlOptions", options, "Perl Options"),
   #ifdef MP_TRACE
  -MP_SRV_CMD_TAKE1("PerlTrace", trace, "Trace level"),
  +MP_CMD_SRV_TAKE1("PerlTrace", trace, "Trace level"),
   #endif
   #ifdef USE_ITHREADS
  -MP_SRV_CMD_TAKE1("PerlInterpStart", interp_start,
  +MP_CMD_SRV_TAKE1("PerlInterpStart", interp_start,
"Number of Perl interpreters to start"),
  -MP_SRV_CMD_TAKE1("PerlInterpMax", interp_max,
  +MP_CMD_SRV_TAKE1("PerlInterpMax", interp_max,
"Max number of running Perl interpreters"),
  -MP_SRV_CMD_TAKE1("PerlInterpMaxSpare", interp_max_spare,
  +MP_CMD_SRV_TAKE1("PerlInterpMaxSpare", interp_max_spare,
"Max number of spare Perl interpreters"),
  -MP_SRV_CMD_TAKE1("PerlInterpMinSpare", interp_min_spare,
  +MP_CMD_SRV_TAKE1("PerlInterpMinSpare", interp_min_spare,
"Min number of spare Perl interpreters"),
  -MP_SRV_CMD_TAKE1("PerlInterpMaxRequests", interp_max_requests,
  +MP_CMD_SRV_TAKE1("PerlInterpMaxRequests", interp_max_requests,
"Max number of requests per Perl interpreters"),
  -MP_DIR_CMD_TAKE1("PerlInterpLifetime", interp_lifetime,
  +MP_CMD_DIR_TAKE1("PerlInterpLifetime", interp_lifetime,
"Lifetime of a Perl interpreter"),
   #endif
   MP_CMD_ENTRIES,
  
  
  
  1.28  +1 -0  modperl-2.0/src/modules/perl/mod_perl.h
  
  Index: mod_perl.h
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.h,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- mod_perl.h2001/03/16 04:58:58 1.27
  +++ mod_perl.h2001/03/16 05:52:29 1.28
  @@ -16,6 +16,7 @@
   #include "modperl_types.h"
   #include "modperl_util.h"
   #include "modperl_config.h"
  +#include "modperl_cmd.h"
   #include "modperl_handler.h"
   #include "modperl_callback.h"
   #include "modperl_tipool.h"
  
  
  
  1.26  +2 -147modperl-2.0/src/modules/perl/modperl_config.c
  
  Index: modperl_config.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_config.c,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- modperl_config.c  2001/03/16 05:32:35 1.25
  +++ modperl_config.c  2001/03/16 05:52:29 1.26
  @@ -1,23 +1,5 @@
   #include "mod_perl.h"
   
  -char *modperl_cmd_push_handlers(MpAV **handlers, const char *name,
  -apr_pool_t *p)
  -{
  -modperl_handler_t *h = modperl_handler_new(p, name);
  -
  -if (!*handlers) {
  -*handlers = apr_array_make(p, 1, sizeof(modperl_handler_t *));
  -MP_TRACE_d(MP_FUNC, "created handler stack\n");
  -}
  -
  -/* XXX parse_handler if Perl is running */
  -
  -*(modperl_handler_t **)apr_array_push(*handlers) = h;
  -MP_TRACE_d(MP_FUNC, "pushed handler: %s\n", h-name);
  -
  -return NULL;
  -}
  -
   void