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,
[ --with-gnutls[=DIR] SSL/TLS crypt support (needs GNU TLS), the argument DIR should not be necessary],dnl
[if test "$withval" != "no"; then
AC_DEFINE(GNUTLS,,[Crypto (TLS) support])
GNUTLS=1
CPPFLAGS="${CPPFLAGS} `libgnutls-config --cflags`"
LDFLAGS="${LDFLAGS} `libgnutls-config --libs`"
if test "$withval" != "yes"; then
GNUTLSROOT=$withval
LDFLAGS="${LDFLAGS} -L$GNUTLSROOT/lib"
CPPFLAGS="${CPPFLAGS} -I$GNUTLSROOT/include"
if test "$withval" = "yes"; then
PKG_CHECK_MODULES([LIBGNUTLS], [gnutls >= 1.0.0],
[
echo "GnuTLS found"
AC_DEFINE(GNUTLS,,[Crypto (TLS) support])
GNUTLS=1
CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS"
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],
dnl Default: disable it

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

Loading…
Cancel
Save