summaryrefslogtreecommitdiffstats
path: root/support/ab.c
diff options
context:
space:
mode:
authorJeff Trawick <trawick@apache.org>2009-07-29 17:15:38 +0200
committerJeff Trawick <trawick@apache.org>2009-07-29 17:15:38 +0200
commitf1664950a613bd5cbef13daf74f5a56180ab8417 (patch)
treebd5350e09a00c456882c1c6da380e0f1e8c2fdda /support/ab.c
parentmark some private module data as "static", resolving (diff)
downloadapache2-f1664950a613bd5cbef13daf74f5a56180ab8417.tar.xz
apache2-f1664950a613bd5cbef13daf74f5a56180ab8417.zip
ab: Fix broken error messages after resolver or connect() failures.
The APR error code was truncated because ab used an incorrect data type. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@798943 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'support/ab.c')
-rw-r--r--support/ab.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/support/ab.c b/support/ab.c
index 5ce6861ae3..48a3e46c02 100644
--- a/support/ab.c
+++ b/support/ab.c
@@ -1548,7 +1548,8 @@ static void read_connection(struct connection * c)
static void test(void)
{
apr_time_t stoptime;
- apr_int16_t rv;
+ apr_int16_t rtnev;
+ apr_status_t rv;
int i;
apr_status_t status;
int snprintf_res = 0;
@@ -1719,7 +1720,7 @@ static void test(void)
if (c->state == STATE_UNCONNECTED)
continue;
- rv = next_fd->rtnevents;
+ rtnev = next_fd->rtnevents;
#ifdef USE_SSL
if (c->state == STATE_CONNECTED && c->ssl && SSL_in_init(c->ssl)) {
@@ -1740,9 +1741,9 @@ static void test(void)
* connection is done and we loop here endlessly calling
* apr_poll().
*/
- if ((rv & APR_POLLIN) || (rv & APR_POLLPRI) || (rv & APR_POLLHUP))
+ if ((rtnev & APR_POLLIN) || (rtnev & APR_POLLPRI) || (rtnev & APR_POLLHUP))
read_connection(c);
- if ((rv & APR_POLLERR) || (rv & APR_POLLNVAL)) {
+ if ((rtnev & APR_POLLERR) || (rtnev & APR_POLLNVAL)) {
bad++;
err_except++;
/* avoid apr_poll/EINPROGRESS loop on HP-UX, let recv discover ECONNREFUSED */
@@ -1754,7 +1755,7 @@ static void test(void)
}
continue;
}
- if (rv & APR_POLLOUT) {
+ if (rtnev & APR_POLLOUT) {
if (c->state == STATE_CONNECTING) {
rv = apr_socket_connect(c->aprsock, destsa);
if (rv != APR_SUCCESS) {