chuck       97/01/09 19:39:20

  Modified:    src       http_main.c CHANGES
  Log:
  Reviewed by:  Jim Jagielski, Brian Behlendorf, Chuck Murcko
  Submitted by: Ed Korthof <[EMAIL PROTECTED]>
  There is one incorrect comparison (which still doesn't allow for more
  children than HARD_SERVER_LIMIT, though it would allow one more child than the
  maximum specified, if that was less than HARD_SERVER_LIMIT).   There is also
  the possibility of messing up your server if you specify StartServers >
  HARD_SERVER_LIMIT (the latter may cause fatal memory corruption -- it did in
  the one test I've run).  The attached patch fixes both of those.
  
  Revision  Changes    Path
  1.102     +2 -2      apache/src/http_main.c
  
  Index: http_main.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/http_main.c,v
  retrieving revision 1.101
  retrieving revision 1.102
  diff -C3 -r1.101 -r1.102
  *** http_main.c       1997/01/01 18:10:20     1.101
  --- http_main.c       1997/01/10 03:39:15     1.102
  ***************
  *** 1947,1953 ****
        if (daemons_max_free < daemons_min_free + 1) /* Don't thrash... */
        daemons_max_free = daemons_min_free + 1;
    
  !     while (num_children < daemons_to_start) {
        make_child(server_conf, num_children++);
        }
    
  --- 1947,1953 ----
        if (daemons_max_free < daemons_min_free + 1) /* Don't thrash... */
        daemons_max_free = daemons_min_free + 1;
    
  !     while (num_children < daemons_to_start && num_children < daemons_limit) 
{
        make_child(server_conf, num_children++);
        }
    
  ***************
  *** 1970,1976 ****
        sync_scoreboard_image();
        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);
  --- 1970,1976 ----
        sync_scoreboard_image();
        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);
  
  
  
  1.114     +4 -0      apache/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /export/home/cvs/apache/src/CHANGES,v
  retrieving revision 1.113
  retrieving revision 1.114
  diff -C3 -r1.113 -r1.114
  *** CHANGES   1997/01/07 21:55:38     1.113
  --- CHANGES   1997/01/10 03:39:17     1.114
  ***************
  *** 1,5 ****
  --- 1,9 ----
    Changes with Apache 1.2b5
    
  +   *) Fix incorrect comparison which could allow number of children =
  +      MaxClients + 1 if less than HARD_SERVER_LIMIT. Also fix potential
  +      problem if StartServers > HARD_SERVER_LIMIT. [Ed Korthof]
  + 
      *) Replace instances of inet_ntoa() with inet_addr() for ProxyBlock.
         It's more portable. [Martin Kraemer]
    
  
  
  

Reply via email to