[smokeping/f16] Forgot to add patch
terjeros
terjeros at fedoraproject.org
Thu Sep 6 18:46:51 UTC 2012
commit fa8e716bbd28d7b4bcee86cf2b3f82b2555509dc
Author: Terje Røsten <terje.rosten at ntnu.no>
Date: Thu Sep 6 20:46:31 2012 +0200
Forgot to add patch
smokeping-2.4.2-fping.patch | 44 +++++++++++++++++++++++++++++++++++++++++++
1 files changed, 44 insertions(+), 0 deletions(-)
---
diff --git a/smokeping-2.4.2-fping.patch b/smokeping-2.4.2-fping.patch
new file mode 100644
index 0000000..5781e76
--- /dev/null
+++ b/smokeping-2.4.2-fping.patch
@@ -0,0 +1,44 @@
+--- smokeping-2.4.2/lib/Smokeping/probes/FPing.pm.fping33 2008-06-08 17:49:42.000000000 -0400
++++ smokeping-2.4.2/lib/Smokeping/probes/FPing.pm 2012-09-06 02:31:14.592525741 -0400
+@@ -112,6 +112,7 @@ sub ping ($){
+ my $inh = gensym;
+ my $outh = gensym;
+ my $errh = gensym;
++ my $handle = gensym;
+ # pinging nothing is pointless
+ return unless @{$self->addresses};
+ my @params = () ;
+@@ -136,18 +137,20 @@ sub ping ($){
+ $self->do_debug("Executing @cmd");
+ my $pid = open3($inh,$outh,$errh, @cmd);
+ $self->{rtts}={};
+- while (<$errh>){
+- chomp;
+- $self->do_debug("Got fping output: '$_'");
+- next unless /^\S+\s+:\s+[-\d\.]/; #filter out error messages from fping
+- my @times = split /\s+/;
+- my $ip = shift @times;
+- next unless ':' eq shift @times; #drop the colon
+- if (($self->{properties}{blazemode} || '') eq 'true'){
+- shift @times;
+- }
+- @times = map {sprintf "%.10e", $_ / $self->{pingfactor}} sort {$a <=> $b} grep /^\d/, @times;
+- map { $self->{rtts}{$_} = [@times] } @{$self->{addrlookup}{$ip}} ;
++ foreach $handle ($outh, $errh) {
++ while (<$handle>){
++ chomp;
++ $self->do_debug("Got fping output: '$_'");
++ next unless /^\S+\s+:\s+[-\d\.]/; #filter out error messages from fping
++ my @times = split /\s+/;
++ my $ip = shift @times;
++ next unless ':' eq shift @times; #drop the colon
++ if (($self->{properties}{blazemode} || '') eq 'true'){
++ shift @times;
++ }
++ @times = map {sprintf "%.10e", $_ / $self->{pingfactor}} sort {$a <=> $b} grep /^\d/, @times;
++ map { $self->{rtts}{$_} = [@times] } @{$self->{addrlookup}{$ip}} ;
++ }
+ }
+ waitpid $pid,0;
+ close $inh;
+
More information about the scm-commits
mailing list