pier        01/08/04 11:25:57

  Modified:    webapp/apache-1.3 mod_webapp.c
               webapp/lib wa_main.c
  Log:
  Fix for bug #2933. CGI scripts are now functional even when mod_webapp
  is running (took me 3 days to figure out WHY, darn!)
  
  Revision  Changes    Path
  1.22      +10 -11    jakarta-tomcat-connectors/webapp/apache-1.3/mod_webapp.c
  
  Index: mod_webapp.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/webapp/apache-1.3/mod_webapp.c,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- mod_webapp.c      2001/07/25 03:30:42     1.21
  +++ mod_webapp.c      2001/08/04 18:25:57     1.22
  @@ -57,7 +57,7 @@
   
   /**
    * @author  Pier Fumagalli <mailto:[EMAIL PROTECTED]>
  - * @version $Id: mod_webapp.c,v 1.21 2001/07/25 03:30:42 pier Exp $
  + * @version $Id: mod_webapp.c,v 1.22 2001/08/04 18:25:57 pier Exp $
    */
   
   #include <httpd.h>
  @@ -86,6 +86,13 @@
   /* MODULE AND LIBRARY INITIALIZATION AND DESTRUCTION                         */
   /* ************************************************************************* */
   
  +/* Destroy the module and the WebApp Library */
  +static void wam_shutdown(server_rec *s, pool *p) {//void *nil) {
  +    if (!wam_initialized) return;
  +    wa_shutdown();
  +    wam_initialized=wa_false;
  +}
  +
   /* Startup the module and the WebApp Library */
   static void wam_startup(server_rec *s, pool *p) {
       if (!wam_initialized) return;
  @@ -93,20 +100,12 @@
       wa_startup();
   }
   
  -/* Destroy the module and the WebApp Library */
  -static void wam_shutdown(void *nil) {
  -    if (!wam_initialized) return;
  -    wa_shutdown();
  -    wam_initialized=wa_false;
  -}
  -
   /* Initialize the module and the WebApp Library */
   static const char *wam_init(pool *p) {
       const char *ret=NULL;
   
  -    if(wam_initialized) return(NULL);
  +    if(wam_initialized==wa_true) return(NULL);
       if ((ret=wa_init())!=NULL) return(ret);
  -    ap_register_cleanup(p,NULL,wam_shutdown,NULL);
       wam_initialized=wa_true;
       return(NULL);
   }
  @@ -514,6 +513,6 @@
       NULL,                               /* [10] logger */
       NULL,                               /* [3] header parser */
       wam_startup,                        /* child initializer */
  -    NULL,                               /* child exit/cleanup */
  +    wam_shutdown,                       /* child exit/cleanup */
       NULL                                /* [1] post read_request handling */
   };
  
  
  
  1.10      +4 -1      jakarta-tomcat-connectors/webapp/lib/wa_main.c
  
  Index: wa_main.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/webapp/lib/wa_main.c,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- wa_main.c 2001/07/19 23:50:03     1.9
  +++ wa_main.c 2001/08/04 18:25:57     1.10
  @@ -55,7 +55,7 @@
    *                                                                           *
    * ========================================================================= */
   
  -/* @version $Id: wa_main.c,v 1.9 2001/07/19 23:50:03 pier Exp $ */
  +/* @version $Id: wa_main.c,v 1.10 2001/08/04 18:25:57 pier Exp $ */
   #include <wa.h>
   
   /* The current APR memory pool. */
  @@ -74,8 +74,11 @@
   const char *wa_init(void) {
       int x=0;
   
  +    wa_debug(WA_MARK,"WebApp Library initializing");
  +
       /* Check the main APR pool. */
       if (wa_pool==NULL) {
  +        wa_debug(WA_MARK,"Initializing APR");
           if (apr_initialize()!=APR_SUCCESS)
               return("Cannot initialize APR");
           if (apr_pool_create(&wa_pool,NULL)!=APR_SUCCESS)
  
  
  

Reply via email to