diff --git a/qstream b/qstream index 13a95cb7e2930b64db11c3598024cbff3e40dcb8..3ae1018635df52d7ea8a0da8830abe8300c6af79 100755 --- a/qstream +++ b/qstream @@ -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;