Skip to content

Commit

Permalink
net-mgmt/smokeping: fix mail loop issue
Browse files Browse the repository at this point in the history
Integrate upstream patch[1] to fix mail loop issue #183[2].

This is a one-line patch without complexity who can be removed
as soon as the upstream releases a new version.

[1] oetiker/SmokePing@e9004e8
[2] oetiker/SmokePing#183

PR:		253161
Submitted by:	OlivierW <olivierw1+bugzilla-freebsd@hotmail.com>
  • Loading branch information
rosorio committed Feb 2, 2021
1 parent 75bc2f5 commit d747416
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion net-mgmt/smokeping/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

PORTNAME= smokeping
PORTVERSION= 2.7.3
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= net-mgmt www

MAINTAINER= rodrigo@FreeBSD.org
Expand Down
11 changes: 10 additions & 1 deletion net-mgmt/smokeping/files/patch-lib_Smokeping.pm
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
--- lib/Smokeping.pm.orig 2018-02-02 21:14:55 UTC
--- lib/Smokeping.pm.orig 2021-02-01 12:05:21 UTC
+++ lib/Smokeping.pm
@@ -1889,7 +1889,7 @@ sub check_alerts {
$gotalert = $match unless $gotalert;
my $edgetrigger = $alert->{edgetrigger} eq 'yes';
my $what;
- if ($edgetrigger and $prevmatch != $match) {
+ if ($edgetrigger and ($prevmatch ? 0 : 1 ) != ($match ? 0 : 1)) {
$what = ($prevmatch == 0 ? "was raised" : "was cleared");
}
if (not $edgetrigger and $match) {
@@ -4306,7 +4306,7 @@ sub main (;$) {
if(defined $opt{'check'}) { verify_cfg($cfgfile); exit 0; }
if($opt{reload}) {
Expand Down

0 comments on commit d747416

Please sign in to comment.