fielding    97/03/18 01:34:54

  Modified:    src       CHANGES http_main.c
  Log:
  Fixed server status updating of per-connection counters.
  
  Reviewed by: Randy Terbush, Dean Gaudet
  
  Revision  Changes    Path
  1.199     +2 -0      apache/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /export/home/cvs/apache/src/CHANGES,v
  retrieving revision 1.198
  retrieving revision 1.199
  diff -C3 -r1.198 -r1.199
  *** CHANGES   1997/03/15 20:49:08     1.198
  --- CHANGES   1997/03/18 09:34:51     1.199
  ***************
  *** 1,5 ****
  --- 1,7 ----
    Changes with Apache 1.2b8
    
  +   *) Fixed server status updating of per-connection counters. [Roy Fielding]
  + 
      *) Workaround to a compiler bug that causes SunOS 4.1.x to panic.
         [Roy Fielding]
    
  
  
  
  1.131     +7 -9      apache/src/http_main.c
  
  Index: http_main.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/http_main.c,v
  retrieving revision 1.130
  retrieving revision 1.131
  diff -C3 -r1.130 -r1.131
  *** http_main.c       1997/03/16 18:21:59     1.130
  --- http_main.c       1997/03/18 09:34:52     1.131
  ***************
  *** 866,877 ****
    
    #if defined(STATUS)
        new_score_rec.last_used=time(NULL);
  !     if (status == SERVER_DEAD) {
        /*
         * Reset individual counters
         */
  !     new_score_rec.my_access_count = 0L;
  !     new_score_rec.my_bytes_served = 0L;
        new_score_rec.conn_count = (unsigned short)0;
        new_score_rec.conn_bytes = (unsigned long)0;
        }
  --- 866,879 ----
    
    #if defined(STATUS)
        new_score_rec.last_used=time(NULL);
  !     if (status == SERVER_READY || status == SERVER_DEAD) {
        /*
         * Reset individual counters
         */
  !     if (status == SERVER_DEAD) {
  !         new_score_rec.my_access_count = 0L;
  !         new_score_rec.my_bytes_served = 0L;
  !     }
        new_score_rec.conn_count = (unsigned short)0;
        new_score_rec.conn_bytes = (unsigned long)0;
        }
  ***************
  *** 952,958 ****
    }
    
    #if defined(STATUS)
  ! void increment_counts (int child_num, request_rec *r, int flag)
    {
        long int bs=0;
        short_score new_score_rec;
  --- 954,960 ----
    }
    
    #if defined(STATUS)
  ! static void increment_counts (int child_num, request_rec *r)
    {
        long int bs=0;
        short_score new_score_rec;
  ***************
  *** 962,971 ****
        if (r->sent_bodyct)
            bgetopt(r->connection->client, BO_BYTECT, &bs);
    
  -     if (flag) {
  -     new_score_rec.conn_count = (unsigned short)0;
  -     new_score_rec.conn_bytes = (unsigned long)0;
  -     }
        new_score_rec.access_count ++;
        new_score_rec.my_access_count ++;
        new_score_rec.conn_count ++;
  --- 964,969 ----
  ***************
  *** 1764,1770 ****
    
                if (r) process_request(r); /* else premature EOF --- ignore */
    #if defined(STATUS)
  !             if (r) increment_counts(child_num,r,1);
    #endif
                if (!r || !current_conn->keepalive)
                    break;
  --- 1762,1768 ----
    
                if (r) process_request(r); /* else premature EOF --- ignore */
    #if defined(STATUS)
  !             if (r) increment_counts(child_num, r);
    #endif
                if (!r || !current_conn->keepalive)
                    break;
  
  
  

Reply via email to