From 4306859705654942370f17f602c6755591c6d1f3 Mon Sep 17 00:00:00 2001 From: Stefan Fritsch Date: Fri, 16 Jul 2010 20:28:50 +0000 Subject: Fix ab sending more requests than specified by the -n parameter git-svn-id: svn+ssh://svn.debian.org/svn/pkg-apache/trunk/apache2@1204 01b336ce-410b-0410-9a02-a0e7f243c266 --- debian/changelog | 2 ++ debian/patches/00list | 1 + debian/patches/082_ab_num_requests.dpatch | 45 +++++++++++++++++++++++++++++++ 3 files changed, 48 insertions(+) create mode 100755 debian/patches/082_ab_num_requests.dpatch diff --git a/debian/changelog b/debian/changelog index 046243db..7012ace2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,8 @@ apache2 (2.2.15-6) UNRELEASED; urgency=low for starting instead of calling apache2 directly. Closes: #580445 * Fix debug info to allow gdb loading it automatically. Closes: #581514 * Fix install target in Makefile created by apxs2 -n. Closes: #588787 + * Fix ab sending more requests than specified by the -n parameter. + Closes: #541158 * Build as PIE, since gdb in squeeze now supports it. * Update the postrm script to also purge the version of /var/www/index.html introduced in 2.2.11-7. diff --git a/debian/patches/00list b/debian/patches/00list index f4b66235..4dbe324c 100644 --- a/debian/patches/00list +++ b/debian/patches/00list @@ -25,6 +25,7 @@ 079_polish_translation.dpatch 080_mod_reqtimeout_fixes.dpatch 081_apxs_perl_5.12.dpatch +082_ab_num_requests 099_config_guess_sub_update 200_cp_suexec.dpatch 201_build_suexec-custom.dpatch diff --git a/debian/patches/082_ab_num_requests.dpatch b/debian/patches/082_ab_num_requests.dpatch new file mode 100755 index 00000000..48172826 --- /dev/null +++ b/debian/patches/082_ab_num_requests.dpatch @@ -0,0 +1,45 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 082_ab_num_requests.dpatch by Stefan Fritsch +## +## 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); -- cgit v1.2.3