Commit 6a0aef02 authored by paalmm's avatar paalmm

removed duplicate print_out if ==

parent 5f112496
...@@ -173,7 +173,6 @@ $SIG{TERM} = sub { $uninterrupted=0; # return if $nkill++ < 1; ...@@ -173,7 +173,6 @@ $SIG{TERM} = sub { $uninterrupted=0; # return if $nkill++ < 1;
$SIG{ALRM} = sub { $SIG{ALRM} = sub {
# Writes stats to file if option XML is given. -PMM # Writes stats to file if option XML is given. -PMM
# die "No packets received" if $n_packets < 1; # die "No packets received" if $n_packets < 1;
print "alarmen går ! \n";
$uninterrupted=0; $uninterrupted=0;
if (! $endstream) { # Changed logic 20120706:1007 CDT if (! $endstream) { # Changed logic 20120706:1007 CDT
$endstream=1; $endstream=1;
...@@ -217,7 +216,7 @@ if ($opt_pcap || ($opt_tcp && !$opt_rtmp)){ # listen in parallell ...@@ -217,7 +216,7 @@ if ($opt_pcap || ($opt_tcp && !$opt_rtmp)){ # listen in parallell
eat_stream($id) if (!($opt_tcp || $opt_rtmp)); eat_stream($id) if (!($opt_tcp || $opt_rtmp));
&rtmp_eat_stream($id,$opt_period, $opt_last,0,$opt_debug,$opt_swfurl,$opt_pageurl,$opt_flashversion) if $opt_rtmp; &rtmp_eat_stream($id,$opt_period, $opt_last,0,$opt_debug,$opt_swfurl,$opt_pageurl,$opt_flashversion) if $opt_rtmp;
#&eat_tcp($id,$opt_port) if $opt_tcp && !$opt_rtmp; #&eat_tcp($id,$opt_port) if $opt_tcp && !$opt_rtmp;
if (! ( $opt_list || $opt_sum)){ if (! ( $opt_list || $opt_sum || $opt_period)){
&display_stats(); &display_stats();
} }
last if ! $uninterrupted; last if ! $uninterrupted;
...@@ -687,8 +686,8 @@ sub eat_stream { ...@@ -687,8 +686,8 @@ sub eat_stream {
if ($opt_align){ # align to $opt_period if ($opt_align){ # align to $opt_period
} }
while ($uninterrupted && !($opt_packets && $n_packets > $opt_packets)){ #while ($uninterrupted && !($opt_packets && $n_packets > $opt_packets)){
while ($uninterrupted && ! $endstream && !($opt_packets && $n_packets > $opt_packets)){
if ($select->can_read($timeout) && $mc->recv($packet, 1560)) { if ($select->can_read($timeout) && $mc->recv($packet, 1560)) {
my $timeout=$next_wait; my $timeout=$next_wait;
$n_packets++; $n_packets++;
...@@ -717,7 +716,7 @@ sub eat_stream { ...@@ -717,7 +716,7 @@ sub eat_stream {
print DUMP $packet; print DUMP $packet;
} }
last if ! $uninterrupted || $endstream; last if ! $uninterrupted || $endstream;
#$endstream = tv_interval($t0, $tc) >= $opt_last if $opt_last && !$endstream; $endstream = tv_interval($t0, $tc) >= $opt_last if $opt_last && !$endstream;
} else { # assume that we got an interrupt } else { # assume that we got an interrupt
# die "Failed to receive packet: $!"; # die "Failed to receive packet: $!";
} }
...@@ -1585,7 +1584,7 @@ sub pkt_stats { ...@@ -1585,7 +1584,7 @@ sub pkt_stats {
} }
printf "setup $f : %.3f\n", $setuptime{$f} if $opt_debug; printf "setup $f : %.3f\n", $setuptime{$f} if $opt_debug;
#print "hei hei \n"; #print "hei hei \n";
#alarm($opt_last) if $opt_last; alarm($opt_last) if $opt_last;
} }
} }
$tend{$f} = $tc; $tend{$f} = $tc;
......
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