1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
|
#! /bin/sh /usr/share/dpatch/dpatch-run
## 082_ab_num_requests.dpatch by Stefan Fritsch <sf@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Upstream r940526, Debian bug #541158
@DPATCH@
diff -urNad trunk~/support/ab.c trunk/support/ab.c
--- trunk~/support/ab.c 2010-07-16 22:17:41.697762479 +0200
+++ trunk/support/ab.c 2010-07-16 22:17:45.661763246 +0200
@@ -628,6 +628,10 @@
static void write_request(struct connection * c)
{
+ if (started >= requests) {
+ return;
+ }
+
do {
apr_time_t tnow;
apr_size_t l = c->rwrite;
@@ -690,6 +694,7 @@
new_pollfd.client_data = c;
apr_pollset_add(readbits, &new_pollfd);
}
+ started++;
}
/* --------------------------------------------------------- */
@@ -1239,7 +1244,6 @@
/* connected first time */
c->state = STATE_CONNECTED;
- started++;
#ifdef USE_SSL
if (c->ssl) {
ssl_proceed_handshake(c);
@@ -1766,7 +1770,6 @@
}
else {
c->state = STATE_CONNECTED;
- started++;
#ifdef USE_SSL
if (c->ssl)
ssl_proceed_handshake(c);
|