Patch from ametzler to address bug #2811861

master
Stephane Bortzmeyer 15 years ago
parent 69dcc40226
commit 9574c70b29

@ -92,14 +92,21 @@ AC_ARG_WITH(ssl,
AC_ARG_WITH(gnutls, AC_ARG_WITH(gnutls,
[ --with-gnutls[=DIR] SSL/TLS crypt support (needs GNU TLS), the argument DIR should not be necessary],dnl [ --with-gnutls[=DIR] SSL/TLS crypt support (needs GNU TLS), the argument DIR should not be necessary],dnl
[if test "$withval" != "no"; then [if test "$withval" != "no"; then
AC_DEFINE(GNUTLS,,[Crypto (TLS) support]) if test "$withval" = "yes"; then
GNUTLS=1 PKG_CHECK_MODULES([LIBGNUTLS], [gnutls >= 1.0.0],
CPPFLAGS="${CPPFLAGS} `libgnutls-config --cflags`" [
LDFLAGS="${LDFLAGS} `libgnutls-config --libs`" echo "GnuTLS found"
if test "$withval" != "yes"; then AC_DEFINE(GNUTLS,,[Crypto (TLS) support])
GNUTLSROOT=$withval GNUTLS=1
LDFLAGS="${LDFLAGS} -L$GNUTLSROOT/lib" CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS"
CPPFLAGS="${CPPFLAGS} -I$GNUTLSROOT/include" LIBS="$LIBS $LIBGNUTLS_LIBS"
],)
else
AC_DEFINE(GNUTLS,,[Crypto (TLS) support])
GNUTLS=1
GNUTLSROOT=$withval
LDFLAGS="${LDFLAGS} -L$GNUTLSROOT/lib -lgnutls"
CPPFLAGS="${CPPFLAGS} -I$GNUTLSROOT/include"
fi fi
fi], fi],
dnl Default: disable it dnl Default: disable it

@ -32,7 +32,7 @@ unsigned int size = DEFLINE;
unsigned int j = 0; unsigned int j = 0;
int n_stddev = 0; int n_stddev = 0;
int family = PF_UNSPEC; int family = AF_UNSPEC;
struct result results[MAX_ITERATIONS]; struct result results[MAX_ITERATIONS];
struct timeval good_results[MAX_ITERATIONS]; struct timeval good_results[MAX_ITERATIONS];
@ -678,8 +678,8 @@ main(argc, argv)
#ifdef SMTP #ifdef SMTP
if (smtp) { if (smtp) {
sendline = "QUIT\r\n"; /* Surprises some SMTP servers which log a sendline = "QUIT\r\n"; /* Surprises some SMTP servers which log a
* frightening NOQUEUE. Anyone knows better? * * * * frightening NOQUEUE. Anyone knows better? * * * *
* * See bug #1512776 */ * See bug #1512776 */
} else } else
#endif #endif
#ifdef ICP #ifdef ICP
@ -907,9 +907,9 @@ main(argc, argv)
} }
if (plugin) { if (plugin) {
plugin_result = plugin_execute(); plugin_result = plugin_execute();
/* If plugin_result == -1, there is a temporary error and we did not /* If plugin_result == -1, there is a temporary error and we did not get
* get data, we must not use it in the average / median calculations. * data, we must not use it in the average / median calculations. So,
* So, successes will not be incremented later. */ * successes will not be incremented later. */
if (plugin_result == -2) if (plugin_result == -2)
err_quit(""); err_quit("");
} else { } else {
@ -932,7 +932,7 @@ main(argc, argv)
err_sys("Can't connect to server"); err_sys("Can't connect to server");
/* TODO: it would be better to continue: if -n was given, other /* TODO: it would be better to continue: if -n was given, other
* iterations may succeed. A flag indicating success or error is * iterations may succeed. A flag indicating success or error is
* probably necessary, it would replace the mess around 'if * * probably necessary, it would replace the mess around 'if
* (!timeout_flag && (!plugin || plugin_result >= 0))' */ * (!timeout_flag && (!plugin || plugin_result >= 0))' */
} else { } else {
if (tcp) { if (tcp) {

Loading…
Cancel
Save