On Wed, May 09, 2001 at 11:39:04PM -0700, dean gaudet wrote:
> sorry don't have time to look at this further right now -- one of my
> coworkers was playing with the ab from 1.3 cvs and it has an obvious typo
> that miscompiles with -DUSE_SSL, plus when he uses "ab -n 2 -s" he gets a
> floating exception and core dump. (-n 1 works fine)
>
> (it's a rh6.1-based system, with openssl 0.9.6 i think).
Yeah... there a massive load of warnings from -Wall (need to change %d's
to %ld) but this gets it working: (I'm not sure if the heartbeatres
change is right, not sure what is intended there, but it fixes the core
dump)
Index: ab.c
===================================================================
RCS file: /home/joe/lib/cvsroot/apache-1.3/src/support/ab.c,v
retrieving revision 1.49
diff -u -r1.49 ab.c
--- ab.c 11 Apr 2001 21:23:54 -0000 1.49
+++ ab.c 2 May 2001 10:01:33 -0000
@@ -897,7 +897,7 @@
};
SSL_set_connect_state(c->ssl);
if ((e = SSL_set_fd(c->ssl, c->fd)) == -1) {
- fprintf(stderr, "SSL fd init failed ")l
+ fprintf(stderr, "SSL fd init failed ");
ERR_print_errors_fp(stderr);
goto bad;
};
@@ -1638,8 +1638,6 @@
heartbeatres = 100; /* but never more often than once every 100
* connections. */
}
- else
- heartbeatres = 0;
#ifdef USE_SSL
SSL_library_init();