aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca <deri@ntop.org>2015-06-23 07:06:09 -0700
committerLuca <deri@ntop.org>2015-06-23 07:06:09 -0700
commit806c1a48d5defde94ae4efdd58513a8875631fb4 (patch)
tree2447f88b2d6d59304c94494fe718ed739aa5255a
parent4f691de0b594c9893c2691ffd2ab729f56debd1d (diff)
Added fix for fixing a crash when some CLI combination options are used
-rw-r--r--example/ndpiReader.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/example/ndpiReader.c b/example/ndpiReader.c
index b19dca237..d75000bf6 100644
--- a/example/ndpiReader.c
+++ b/example/ndpiReader.c
@@ -1233,7 +1233,9 @@ static void printResults(u_int64_t tot_usec) {
if(enable_protocol_guess)
printf("\tGuessed flow protos: %-13u\n", cumulative_stats.guessed_flow_protocols);
}
- } else if(json_flag) {
+ }
+
+ if(json_flag) {
#ifdef HAVE_JSON_C
if((json_fp = fopen(_jsonFilePath,"w")) == NULL) {
printf("Error createing .json file %s\n", _jsonFilePath);