Commit 9a0226e4 authored by Jon Kåre Hellan's avatar Jon Kåre Hellan

Don't call display_stats when endstream flag is set. Fixes double

    printout problem. Debian version 0.4-6
parent 5be06e74
......@@ -153,14 +153,14 @@ $file_flag = 1 if $opt_filename;
$SIG{USR2} = sub {confess "Caught by SIGUSR2"; };
$SIG{INT} = sub { $uninterrupted=0; # return if $nint++ < 1;
&display_stats();
&display_stats() if !$endstream;
&end_xml() if $opt_xml;
&handle_threads() if ($opt_tcp and $opt_rtmp);
die "End after interrupt.\n";exit(0) };
$SIG{TERM} = sub { $uninterrupted=0; # return if $nkill++ < 1;
&display_stats();
&display_stats() if !$endstream;
&end_xml() if $opt_xml;
&handle_threads() if ($opt_tcp and $opt_rtmp);
......@@ -195,7 +195,7 @@ if ($opt_pcap || ($opt_tcp && !$opt_rtmp)){ # listen in parallell
$uninterrupted=1;
$endstream=0;
eat_pcap_streams(@streams);
&display_stats() if !$opt_xml;
&display_stats() if !$opt_xml and !$endstream;
} else { # listen serially
my $stream_count;
#my $ln = @streams;
......@@ -218,7 +218,7 @@ if ($opt_pcap || ($opt_tcp && !$opt_rtmp)){ # listen in parallell
}
&list_flows if $opt_list;
&display_stats() if $opt_sum;
&display_stats() if $opt_sum and !$endstream;
&display_bins if $opt_bins;
&end_xml() if $opt_xml;
......@@ -1591,7 +1591,7 @@ sub pkt_stats {
if ($interval > $pinterval){
&mpeg_debug() if $opt_debug;
&display_stats() if !$opt_rtmp;
&display_stats() if !$opt_rtmp and !$endstream;
&init_stats($f);
$pinterval=$interval;
$pinterval{$f}=$interval;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment