aboutsummaryrefslogtreecommitdiff
path: root/example/reader_util.c
diff options
context:
space:
mode:
Diffstat (limited to 'example/reader_util.c')
-rw-r--r--example/reader_util.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/example/reader_util.c b/example/reader_util.c
index 76e54900f..3395153b0 100644
--- a/example/reader_util.c
+++ b/example/reader_util.c
@@ -266,16 +266,17 @@ void print_payload_stat(struct payload_stats *p) {
/* ***************************************************** */
-void ndpi_report_payload_stats() {
+void ndpi_report_payload_stats(int print) {
struct payload_stats *p, *tmp;
u_int num = 0;
- printf("\n\nPayload Analysis\n");
+ if(print)
+ printf("\n\nPayload Analysis\n");
HASH_SORT(pstats, payload_stats_sort_asc);
HASH_ITER(hh, pstats, p, tmp) {
- if(num <= max_num_reported_top_payloads)
+ if(print && num <= max_num_reported_top_payloads)
print_payload_stat(p);
ndpi_free(p->pattern);