tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/jk/native/common jk_map.c
Date Sat, 12 Feb 2005 17:04:57 GMT
mturk       2005/02/12 09:04:57

  Modified:    jk/native/common jk_map.c
  Log:
  Update shared memory modification time for workers.properties.
  This will be used for dynamic reloading of workers.properties like in JK2.
  
  Revision  Changes    Path
  1.27      +10 -3     jakarta-tomcat-connectors/jk/native/common/jk_map.c
  
  Index: jk_map.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_map.c,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- jk_map.c	6 Feb 2005 18:09:03 -0000	1.26
  +++ jk_map.c	12 Feb 2005 17:04:57 -0000	1.27
  @@ -29,6 +29,7 @@
   #include "jk_pool.h"
   #include "jk_map.h"
   #include "jk_util.h"
  +#include "jk_shm.h"
   
   #define CAPACITY_INC_SIZE (50)
   #define LENGTH_OF_LINE    (1024)
  @@ -384,10 +385,14 @@
       int rc = JK_FALSE;
   
       if (m && f) {
  +        struct stat statbuf;
  +        FILE *fp;
  +        if ((rc = stat(f, &statbuf)) == -1)
  +            return JK_FALSE;
   #ifdef AS400
  -        FILE *fp = fopen(f, "r, o_ccsid=0");
  +        fp = fopen(f, "r, o_ccsid=0");
   #else
  -        FILE *fp = fopen(f, "r");
  +        fp = fopen(f, "r");
   #endif
   
           if (fp) {
  @@ -402,6 +407,8 @@
                       break;
               }
               fclose(fp);
  +            /* Update shared memory */
  +            jk_shm_set_workers_time(statbuf.st_mtime);
           }
       }
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message