fixed improper status check on ellFind
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user