diff options
author | Darren Murphy <darren@victoriajd.com> | 2012-03-23 06:25:28 +0100 |
---|---|---|
committer | Darren Murphy <darren@victoriajd.com> | 2012-03-23 06:25:28 +0100 |
commit | 11cf1d954dc92e4d4f2a8dc8fed729f0ef04bf7a (patch) | |
tree | edc8bc12c004e8bb6a2a5908f2174ac0643cecf9 /lib/Smokeping/probes/SipSak.pm | |
parent | 8e9692b5f8a39eea12521f7ae9ad9b62c28ae6f5 (diff) | |
parent | 79b6c9346c950d0b3e22dc9ba337bbcdcbed052e (diff) | |
download | smokeping-11cf1d954dc92e4d4f2a8dc8fed729f0ef04bf7a.tar.gz smokeping-11cf1d954dc92e4d4f2a8dc8fed729f0ef04bf7a.tar.xz |
Merge remote branch 'tobi/master' into integration
Diffstat (limited to 'lib/Smokeping/probes/SipSak.pm')
-rw-r--r-- | lib/Smokeping/probes/SipSak.pm | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/Smokeping/probes/SipSak.pm b/lib/Smokeping/probes/SipSak.pm index 9e6c3a2..25f1649 100644 --- a/lib/Smokeping/probes/SipSak.pm +++ b/lib/Smokeping/probes/SipSak.pm @@ -73,14 +73,23 @@ sub pingone { shift @reply; my $filter = '.*'; + $self->do_debug("SipSak: got ".(scalar @reply)." replies, expected $pingcount"); if (scalar @reply > $pingcount){ - $filter = $keep eq 'yes' ? 'final' : 'provisional'; + $filter = $keep eq 'yes' ? 'final received' : 'provisional received'; } for my $item (@reply){ - next unless $item =~ /$filter/; - if (/^(?:\s+and|\sreceived\safter)\s(\d+(?:\.\d+))\sms\s/){ + $self->do_debug("SipSak: looking at '$item'"); + if (not $item =~ /$filter/){ + $self->do_debug("SipSak: skipping as there was not match for $filter"); + next; + } + if ($item =~ /(?:\sand|\sreceived\safter)\s(\d+(?:\.\d+)?)\sms\s/){ + $self->do_debug("SipSak: match"); push @times,$1/1000; } + else { + $self->do_debug("SipSak: no match"); + } } return sort { $a <=> $b } @times; } |