fixed improper status check on ellFind

This commit is contained in:
Jeff Hill
2000-09-12 18:37:37 +00:00
parent 40b4b1766c
commit 8b69dee979

View File

@@ -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;