Merge branch 'topic/bbannier/non_debug_-B' of ssh://github.com/bbannier/zeek

* 'topic/bbannier/non_debug_-B' of ssh://github.com/bbannier/zeek:
  Allow `-B` flag in non-Debug builds, but ignore it.
This commit is contained in:
Robin Sommer 2021-08-31 15:55:29 +02:00
commit 1e5161a469
3 changed files with 16 additions and 6 deletions

View file

@ -1,4 +1,9 @@
4.2.0-dev.92 | 2021-08-31 15:55:29 +0200
* Allow `-B` flag in non-debug builds, but ignore it (unless it's
`help`). (Benjamin Bannier, Corelight)
4.2.0-dev.89 | 2021-08-26 14:35:28 -0700
* CI support refresh. (Christian Kreibich, Corelight)

View file

@ -1 +1 @@
4.2.0-dev.89
4.2.0-dev.92

View file

@ -12,6 +12,8 @@
#endif
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <sstream>
#include "zeek/bsd-getopt-long.h"
@ -328,10 +330,7 @@ Options parse_cmdline(int argc, char** argv)
{"watchdog", no_argument, nullptr, 'W'},
{"print-id", required_argument, nullptr, 'I'},
{"status-file", required_argument, nullptr, 'U'},
#ifdef DEBUG
{"debug", required_argument, nullptr, 'B'},
#endif
#ifdef USE_PERFTOOLS_DEBUG
{"mem-leaks", no_argument, nullptr, 'm'},
@ -437,11 +436,17 @@ Options parse_cmdline(int argc, char** argv)
rval.pcap_output_file = optarg;
break;
#ifdef DEBUG
case 'B':
#ifdef DEBUG
rval.debug_log_streams = optarg;
break;
#else
if ( util::streq(optarg, "help") )
{
fprintf(stderr,"debug streams unavailable\n");
exit(1);
}
#endif
break;
case 'C':
rval.ignore_checksums = true;