From 4e790e074f4f52d3b58b935103633e33e51b69f6 Mon Sep 17 00:00:00 2001 From: Robert de Bath Date: Mon, 27 Nov 2017 21:02:09 +0000 Subject: [PATCH] Move hexdump to verbose level 2 From the command line you use two "-v" options or in the configuration file you replace the boolean "verbose:true" with an integer "verbose:2". --- probe.c | 2 +- sslh-main.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/probe.c b/probe.c index 016aef3..4bc0c40 100644 --- a/probe.c +++ b/probe.c @@ -299,7 +299,7 @@ int probe_client_protocol(struct connection *cnx) * connection will just fail later normally). */ /* Dump hex values of the packet */ - if (verbose) { + if (verbose>1) { fprintf(stderr, "hexdump of incoming packet:\n"); hexdump(buffer, n); } diff --git a/sslh-main.c b/sslh-main.c index 433ed86..eb89a04 100644 --- a/sslh-main.c +++ b/sslh-main.c @@ -375,7 +375,10 @@ static int config_parse(char *filename, struct addrinfo **listen, struct proto * return 1; } - config_lookup_bool(&config, "verbose", &verbose); + if(config_lookup_bool(&config, "verbose", &verbose) == CONFIG_FALSE) { + config_lookup_int(&config, "verbose", &verbose); + } + config_lookup_bool(&config, "inetd", &inetd); config_lookup_bool(&config, "foreground", &foreground); config_lookup_bool(&config, "numeric", &numeric);