httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject cvs commit: httpd-2.0/support ab.c
Date Fri, 19 Mar 2004 15:39:45 GMT
clar        2004/03/19 07:39:45

  Modified:    support  ab.c
  Log:
  Using ap_max() to ensure no negative values are stored in data structure.
  
  Revision  Changes    Path
  1.142     +8 -8      httpd-2.0/support/ab.c
  
  Index: ab.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/support/ab.c,v
  retrieving revision 1.141
  retrieving revision 1.142
  diff -u -r1.141 -r1.142
  --- ab.c	17 Mar 2004 23:16:33 -0000	1.141
  +++ ab.c	19 Mar 2004 15:39:45 -0000	1.142
  @@ -1287,9 +1287,9 @@
   	    c->done = apr_time_now();
   	    s.read = c->read;
   	    s.starttime = c->start;
  -	    s.ctime = (c->connect - c->start) / 1000;
  -	    s.time = (c->done - c->start) / 1000;
  -	    s.waittime = (c->beginread - c->endwrite) / 1000;
  +	    s.ctime = ap_max(0, (c->connect - c->start) / 1000);
  +	    s.time = ap_max(0, (c->done - c->start) / 1000);
  +	    s.waittime = ap_max(0, (c->beginread - c->endwrite) / 1000);
   	    stats[done++] = s;
   	}
       }
  @@ -1508,9 +1508,9 @@
   	    c->done = apr_time_now();
   	    s.read = c->read;
   	    s.starttime = c->start;
  -	    s.ctime = (c->connect - c->start) / 1000;
  -	    s.waittime = (c->beginread - c->endwrite) / 1000;
  -	    s.time = (c->done - c->start) / 1000;
  +	    s.ctime = ap_max(0, (c->connect - c->start) / 1000);
  +	    s.waittime = ap_max(0, (c->beginread - c->endwrite) / 1000);
  +	    s.time = ap_max(0, (c->done - c->start) / 1000);
   	    stats[done++] = s;
   	}
   	c->keepalive = 0;
  
  
  

Mime
View raw message