From 8b69dee979e28f9339856c0bcbeb5d7df7956322 Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Tue, 12 Sep 2000 18:37:37 +0000 Subject: [PATCH] fixed improper status check on ellFind --- src/db/dbEvent.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/db/dbEvent.c b/src/db/dbEvent.c index e609a3996..e92733ec2 100644 --- a/src/db/dbEvent.c +++ b/src/db/dbEvent.c @@ -418,7 +418,7 @@ void epicsShareAPI db_event_enable (dbEventSubscription es) * dont let a misplaced event corrupt the queue */ status = ellFind (&precord->mlis, &pevent->node); - if (status) { + if ( status < 0 ) { ellAdd (&precord->mlis, &pevent->node); } UNLOCKREC(precord); @@ -440,7 +440,7 @@ void epicsShareAPI db_event_disable (dbEventSubscription es) * dont let a misplaced event corrupt the queue */ status = ellFind(&precord->mlis, &pevent->node); - if (!status) { + if ( status > 0 ) { ellDelete(&precord->mlis, &pevent->node); } UNLOCKREC(precord); @@ -495,6 +495,7 @@ void epicsShareAPI db_cancel_event (dbEventSubscription es) */ pevent->ev_que->quota -= EVENTENTRIES; + freeListFree (dbevEventBlockFreeList, pevent); return;