cvs commit: apache/src CHANGES http_config.c http_config.h http_main.c httpd.h scoreboard.h

1996-07-16 Thread Ben Laurie
ben 96/07/16 12:39:19

  Modified:src   CHANGES http_config.c http_config.h http_main.c
httpd.h  scoreboard.h
  Log:
  Graceful restart patches.
  
  Revision  ChangesPath
  1.42  +5 -0  apache/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apache/src/CHANGES,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -C3 -r1.41 -r1.42
  *** CHANGES   1996/07/10 14:38:04 1.41
  --- CHANGES   1996/07/16 19:39:10 1.42
  ***
  *** 1,3 
  --- 1,8 
  + Changes with Apache 1.2b1:
  + 
  +   *) Graceful restart code added. This allows the server to restart without
  +  losing current connections on receipt of signal 2 (SIGINT). [Ben 
Laurie]
  + 
Changes with Apache 1.1.1:

  *) Fixed bug where Cookie module would make two entries in the
  
  
  
  1.14  +42 -1 apache/src/http_config.c
  
  Index: http_config.c
  ===
  RCS file: /export/home/cvs/apache/src/http_config.c,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -C3 -r1.13 -r1.14
  *** http_config.c 1996/06/29 19:52:11 1.13
  --- http_config.c 1996/07/16 19:39:12 1.14
  ***
  *** 75,80 
  --- 75,83 
#include http_log.h   /* for errors in parse_htaccess */
#include http_request.h   /* for default_handler (see invoke_handler) */
#include http_conf_globals.h  /* Sigh... */
  + #include explain.h
  + 
  + DEF_Explain

/
 *
  ***
  *** 206,211 
  --- 209,248 
return create_empty_config (p);
}

  + #ifdef EXPLAIN
  + 
  + struct
  + {
  + int offset;
  + char *method;
  + } aMethods[]=
  + {
  + #define m(meth) { XtOffsetOf(module,meth),#meth }
  + m(translate_handler),
  + m(check_user_id),
  + m(auth_checker),
  + m(type_checker),
  + m(fixer_upper),
  + m(logger),
  + { -1,? },
  + #undef m
  + };
  + 
  + char *ShowMethod(module *modp,int offset)
  + {
  + int n;
  + static char buf[200];
  + 
  + for(n=0 ; aMethods[n].offset = 0 ; ++n)
  + if(aMethods[n].offset == offset)
  + break;
  + sprintf(buf,%s:%s,modp-name,aMethods[n].method);
  + return buf;
  + }
  + #else
  + #define ShowMethod(modp,offset)
  + #endif
  + 
/
 *
 * Dispatch through the modules to find handlers for various phases
  ***
  *** 221,228 
   handler mod_handler = *(handler *)(offset + (char *)(modp));

   if (mod_handler) {
  !int result = (*mod_handler)(r);

   if (result != DECLINED  (!run_all || result != OK))
   return result;
   }
  --- 258,269 
   handler mod_handler = *(handler *)(offset + (char *)(modp));

   if (mod_handler) {
  !int result;
  ! 
  !Explain1(Run %s,ShowMethod(modp,offset));
  !result = (*mod_handler)(r);

  +Explain2(%s returned %d,ShowMethod(modp,offset),result);
   if (result != DECLINED  (!run_all || result != OK))
   return result;
   }
  
  
  
  1.7   +4 -1  apache/src/http_config.h
  
  Index: http_config.h
  ===
  RCS file: /export/home/cvs/apache/src/http_config.h,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -C3 -r1.6 -r1.7
  *** http_config.h 1996/05/27 19:48:38 1.6
  --- http_config.h 1996/07/16 19:39:12 1.7
  ***
  *** 146,151 
  --- 146,154 
int module_index;   /* Index to this modules structures in
 * config vectors.
 */
  + 
  + const char *name;
  + 
struct module_struct *next;

#ifdef ULTRIX_BRAIN_DEATH
  ***
  *** 198,204 
 */

#define MODULE_MAGIC_NUMBER 19960526
  ! #define STANDARD_MODULE_STUFF MODULE_MAGIC_NUMBER, 0, NULL

/* Generic accessors for other modules to get at their own module-specific
 * data
  --- 201,207 
 */

#define MODULE_MAGIC_NUMBER 19960526
  ! #define STANDARD_MODULE_STUFF MODULE_MAGIC_NUMBER, 0, __FILE__, NULL

/* Generic accessors for other modules to get at their own module-specific
 * data
  
  
  
  1.48  +193 -40   apache/src/http_main.c
  
  Index: http_main.c
  ===
  RCS file: /export/home/cvs/apache/src/http_main.c,v
  retrieving revision 1.47
  retrieving revision 1.48
  diff -C3 -r1.47 -r1.48
  *** http_main.c   1996/07/13 01:47:36 1.47
  --- http_main.c   

cvs commit: apache/src conf.h http_bprintf.c http_main.c

1996-07-16 Thread Ben Laurie
ben 96/07/16 12:57:29

  Modified:src   conf.h http_bprintf.c http_main.c
  Log:
  Fix long double warning for IRIX.
  
  Revision  ChangesPath
  1.19  +2 -1  apache/src/conf.h
  
  Index: conf.h
  ===
  RCS file: /export/home/cvs/apache/src/conf.h,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -C3 -r1.18 -r1.19
  *** conf.h1996/07/09 21:40:13 1.18
  --- conf.h1996/07/16 19:57:25 1.19
  ***
  *** 93,99 
#define USE_FCNTL_SERIALIZED_ACCEPT
#define HAVE_SHMGET
#define HAVE_CRYPT_H
  !  
#elif defined(HPUX)
#define HAVE_RESOURCE
#undef HAVE_GMTOFF
  --- 93,100 
#define USE_FCNTL_SERIALIZED_ACCEPT
#define HAVE_SHMGET
#define HAVE_CRYPT_H
  ! #define NO_LONG_DOUBLE
  ! 
#elif defined(HPUX)
#define HAVE_RESOURCE
#undef HAVE_GMTOFF
  
  
  
  1.4   +4 -0  apache/src/http_bprintf.c
  
  Index: http_bprintf.c
  ===
  RCS file: /export/home/cvs/apache/src/http_bprintf.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -C3 -r1.3 -r1.4
  *** http_bprintf.c1996/06/29 20:02:47 1.3
  --- http_bprintf.c1996/07/16 19:57:25 1.4
  ***
  *** 29,35 
  --- 29,39 
#define max(a,b)(a  b ? a : b)
#endif

  + #ifdef NO_LONG_DOUBLE
  + #define LONG_DOUBLE double
  + #else
#define LONG_DOUBLE long double
  + #endif

#define FALSE   0
#define TRUE1
  
  
  
  1.49  +8 -2  apache/src/http_main.c
  
  Index: http_main.c
  ===
  RCS file: /export/home/cvs/apache/src/http_main.c,v
  retrieving revision 1.48
  retrieving revision 1.49
  diff -C3 -r1.48 -r1.49
  *** http_main.c   1996/07/16 19:39:13 1.48
  --- http_main.c   1996/07/16 19:57:26 1.49
  ***
  *** 107,112 
  --- 107,116 
#include prot.h
#endif

  + #include explain.h
  + 
  + DEF_Explain
  + 
/*
 * Actual definitions of config globals... here because this is
 * for the most part the only code that acts on 'em.  (Hmmm... mod_main.c?)
  ***
  *** 839,845 
{
long int bs=0;
time_t now;
  ! short_score new_score_rec=scoreboard_image[child_num];

if (r-sent_bodyct)
bgetopt(r-connection-client, BO_BYTECT, bs);
  --- 843,849 
{
long int bs=0;
time_t now;
  ! short_score new_score_rec=scoreboard_image-servers[child_num];

if (r-sent_bodyct)
bgetopt(r-connection-client, BO_BYTECT, bs);
  ***
  *** 861,867 
new_score_rec.how_long = now - new_score_rec.last_used;

#if defined(HAVE_MMAP) || defined(HAVE_SHMGET)
  ! memcpy(scoreboard_image[child_num], new_score_rec, 
sizeof(short_score));
#else
lseek (scoreboard_fd, (long)child_num * sizeof(short_score), 0);
force_write (scoreboard_fd, (char*)new_score_rec, sizeof(short_score));
  --- 865,871 
new_score_rec.how_long = now - new_score_rec.last_used;

#if defined(HAVE_MMAP) || defined(HAVE_SHMGET)
  ! memcpy(scoreboard_image-servers[child_num], new_score_rec, 
sizeof(short_score));
#else
lseek (scoreboard_fd, (long)child_num * sizeof(short_score), 0);
force_write (scoreboard_fd, (char*)new_score_rec, sizeof(short_score));
  ***
  *** 1663,1668 
  --- 1667,1673 
/* Child died... note that it's gone in the scoreboard. */
sync_scoreboard_image();
child_slot = find_child_by_pid (pid);
  + Explain2(Reaping child %d slot %d,pid,child_slot);
if (child_slot = 0)
(void)update_child_status (child_slot, SERVER_DEAD,
 (request_rec*)NULL);
  ***
  *** 1672,1677 
  --- 1677,1683 
if ((count_idle_servers()  daemons_min_free)
  (child_slot = find_free_child_num()) = 0
  child_slot = daemons_limit) {
  + Explain1(Starting new child in slot %d,child_slot);
(void)update_child_status(child_slot,SERVER_STARTING,
 (request_rec*)NULL);
make_child(server_conf, child_slot);
  
  
  


cvs commit: apache/src http_main.c

1996-07-16 Thread Ben Laurie
ben 96/07/16 15:14:57

  Modified:src   http_main.c
  Log:
  Fix warning.
  
  Revision  ChangesPath
  1.50  +1 -1  apache/src/http_main.c
  
  Index: http_main.c
  ===
  RCS file: /export/home/cvs/apache/src/http_main.c,v
  retrieving revision 1.49
  retrieving revision 1.50
  diff -C3 -r1.49 -r1.50
  *** http_main.c   1996/07/16 19:57:26 1.49
  --- http_main.c   1996/07/16 22:14:54 1.50
  ***
  *** 1461,1467 
exit(1);
}

  ! /*note_cleanups_for_fd (pconf, s); /* arrange to close on exec or 
restart */

if((setsockopt(s, SOL_SOCKET,SO_REUSEADDR,(char *)one,sizeof(one)))
   == -1) {
  --- 1461,1467 
exit(1);
}

  ! /*note_cleanups_for_fd (pconf, s); don't arrange to close on exec 
or restart */

if((setsockopt(s, SOL_SOCKET,SO_REUSEADDR,(char *)one,sizeof(one)))
   == -1) {
  
  
  


cvs commit: apache/src Configuration.tmpl conf.h rfc1413.c

1996-07-16 Thread Ben Laurie
ben 96/07/16 15:22:11

  Modified:src   Configuration.tmpl conf.h rfc1413.c
  Log:
  HPUX 10 fixes.
  
  Revision  ChangesPath
  1.21  +2 -0  apache/src/Configuration.tmpl
  
  Index: Configuration.tmpl
  ===
  RCS file: /export/home/cvs/apache/src/Configuration.tmpl,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -C3 -r1.20 -r1.21
  *** Configuration.tmpl1996/06/29 19:59:25 1.20
  --- Configuration.tmpl1996/07/16 22:22:08 1.21
  ***
  *** 90,95 
  --- 90,97 
#AUX_LIBS= -lsun
# For HP-UX   n.b. if you use the paid-for HP CC compiler, use flag -Ae
#AUX_CFLAGS= -DHPUX
  + # For HP-UX 10
  + #AUX_CFLAGS= -DHPUX10
# For AIX
#AUX_CFLAGS= -DAIX -U__STR__
# For Ultrix
  
  
  
  1.20  +3 -1  apache/src/conf.h
  
  Index: conf.h
  ===
  RCS file: /export/home/cvs/apache/src/conf.h,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -C3 -r1.19 -r1.20
  *** conf.h1996/07/16 19:57:25 1.19
  --- conf.h1996/07/16 22:22:08 1.20
  ***
  *** 95,101 
#define HAVE_CRYPT_H
#define NO_LONG_DOUBLE

  ! #elif defined(HPUX)
#define HAVE_RESOURCE
#undef HAVE_GMTOFF
#define NO_KILLPG
  --- 95,101 
#define HAVE_CRYPT_H
#define NO_LONG_DOUBLE

  ! #elif defined(HPUX) || defined(HPUX10)
#define HAVE_RESOURCE
#undef HAVE_GMTOFF
#define NO_KILLPG
  ***
  *** 103,109 
  --- 103,111 
#ifndef _HPUX_SOURCE
#define _HPUX_SOURCE
#endif
  + #ifndef HPUX10
#define getwd(d) getcwd(d,MAX_STRING_LEN)
  + #endif
#define JMP_BUF sigjmp_buf
#define HAVE_MMAP

  
  
  
  1.3   +0 -4  apache/src/rfc1413.c
  
  Index: rfc1413.c
  ===
  RCS file: /export/home/cvs/apache/src/rfc1413.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -C3 -r1.2 -r1.3
  *** rfc1413.c 1996/04/18 11:18:24 1.2
  --- rfc1413.c 1996/07/16 22:22:09 1.3
  ***
  *** 77,86 
#include http_log.h /* for log_unixerr */
#include rfc1413.h

  - #ifndef _HPUX_SOURCE
  - #define _HPUX_SOURCE
  - #endif
  - 
/* System libraries. */

#include setjmp.h
  --- 77,82