Re: can't get linkUpDownNotifications working
Dave Shield <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
On Thu, 2006-03-16 at 10:52 +0100, H. McManus wrote: > With this patch applied, linkUpDownNotifications is working. And as a belated Valentine present :-), please see the attached patch, which should correct the startup logic. Dave
mteTrigger.diff
(text/x-patch, 1.7 KB)
--- mteTrigger.c.cln 2006-01-24 14:31:46.000000000 +0000
+++ mteTrigger.c 2006-03-15 18:12:04.000000000 +0000
@@ -826,8 +826,8 @@
* to remember whether the trigger has already fired)
*/
if ( cmp ) {
- if ((!entry->old_results &&
- (entry->flags & MTE_TRIGGER_FLAG_BSTART)) ||
+ if ((entry->old_results ||
+ (entry->flags & MTE_TRIGGER_FLAG_BSTART)) &&
(vp1->index & MTE_ARMED_BOOLEAN )) {
DEBUGMSGTL(( "disman:event:trigger:fire",
"Firing boolean test: "));
@@ -923,8 +923,8 @@
*/
cmp = vp1->index; /* working copy of 'armed' flags */
if ( value >= entry->mteTThRiseValue ) {
- if ((!entry->old_results &&
- (entry->mteTThStartup & MTE_THRESH_START_RISE)) ||
+ if ((entry->old_results ||
+ (entry->mteTThStartup & MTE_THRESH_START_RISE)) &&
(vp1->index & MTE_ARMED_TH_RISE )) {
DEBUGMSGTL(( "disman:event:trigger:fire",
"Firing rising threshold test: "));
@@ -952,8 +952,8 @@
}
if ( value <= entry->mteTThFallValue ) {
- if ((!entry->old_results &&
- (entry->mteTThStartup & MTE_THRESH_START_FALL)) ||
+ if ((entry->old_results ||
+ (entry->mteTThStartup & MTE_THRESH_START_FALL)) &&
(vp1->index & MTE_ARMED_TH_FALL )) {
DEBUGMSGTL(( "disman:event:trigger:fire",
"Firing falling threshold test: "));