summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim Kochan <vadim4j@gmail.com>2015-10-17 10:55:12 +0300
committerTobias Klauser <tklauser@distanz.ch>2015-10-17 12:32:43 +0200
commitfc4646bc31e37c3e48d772fe11035f82277ece24 (patch)
tree1bb0d4b0f97c8b82fbc52cdec1ba114619b2c82d
parentdc2ac62da99712b8f3d7ecf0fbf9904e143869e1 (diff)
netsniff-ng: Fix print stats in silent mode
RX stats were not printed because of wrong check on PRINT_NONE. Fixes: 5f94671f31c040f ("netsniff-ng: Show total rx stats for multi pcap mode") Signed-off-by: Vadim Kochan <vadim4j@gmail.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
-rw-r--r--netsniff-ng.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/netsniff-ng.c b/netsniff-ng.c
index 3b69c8f..3ae05cf 100644
--- a/netsniff-ng.c
+++ b/netsniff-ng.c
@@ -1119,12 +1119,9 @@ next:
bug_on(gettimeofday(&end, NULL));
timersub(&end, &start, &diff);
- if (ctx->print_mode != PRINT_NONE) {
- dump_rx_stats(ctx, sock, is_v3);
-
- printf("\r%12lu sec, %lu usec in total\n",
- diff.tv_sec, diff.tv_usec);
- }
+ dump_rx_stats(ctx, sock, is_v3);
+ printf("\r%12lu sec, %lu usec in total\n",
+ diff.tv_sec, diff.tv_usec);
bpf_release(&bpf_ops);
dissector_cleanup_all();