[Mon-commit] mon mon,1.4.2.5,1.4.2.6
Brought to you by:
trockij
|
From: Jim T. <tr...@us...> - 2004-06-24 14:18:40
|
Update of /cvsroot/mon/mon In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24150 Modified Files: Tag: mon-1-0-0pre1 mon Log Message: no_comp_alerts patch from Daniel Fenert <da...@fe...> Index: mon =================================================================== RCS file: /cvsroot/mon/mon/mon,v retrieving revision 1.4.2.5 retrieving revision 1.4.2.6 diff -C2 -d -r1.4.2.5 -r1.4.2.6 *** mon 24 Jun 2004 14:02:49 -0000 1.4.2.5 --- mon 24 Jun 2004 14:18:25 -0000 1.4.2.6 *************** *** 572,575 **** --- 572,583 ---- # + # skip looping upalerts when "no_comp-alerts" set. + # + if ($pref->{"no_comp_alerts"} && ($flags & $FL_UPALERT) && ($pref->{"_no_comp_alerts_upalert_sent"}>0)) + { + next; + } + + # # do this if we're not handling an upalert or startupalert # *************** *** 721,725 **** --- 729,745 ---- else { $pref->{"_alert_sent"}++; + + # + # reset _no_comp_alerts_upalert_sent counter - when service will be + # back up, upalert will be sent. + # + if ($pref->{"no_comp_alerts"}) { + $pref->{"_no_comp_alerts_upalert_sent"} = 0; + } } + + if ($pref->{"no_comp_alerts"} && ($flags & $FL_UPALERT)) { + $pref->{"_no_comp_alerts_upalert_sent"}++; + } } } *************** *** 1246,1249 **** --- 1266,1270 ---- $pref->{"_alert_sent"} = 0; $pref->{"no_comp_alerts"} = 0; + $pref->{"_no_comp_alerts_upalert_sent"} = 0; @{$pref->{"alerts"}} = (); @{$pref->{"upalerts"}} = (); |