From 806c1a48d5defde94ae4efdd58513a8875631fb4 Mon Sep 17 00:00:00 2001 From: Luca Date: Tue, 23 Jun 2015 07:06:09 -0700 Subject: Added fix for fixing a crash when some CLI combination options are used --- example/ndpiReader.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'example/ndpiReader.c') 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); -- cgit v1.2.3