From f89f31b505aa09de5298910368142b6db33e6b47 Mon Sep 17 00:00:00 2001 From: Marty Kraimer Date: Thu, 20 Sep 2001 13:46:37 +0000 Subject: [PATCH] if epicsEventWaitWithTimeout fails dont continue --- src/db/dbNotify.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/db/dbNotify.c b/src/db/dbNotify.c index b5f59f797..512b46ff1 100644 --- a/src/db/dbNotify.c +++ b/src/db/dbNotify.c @@ -260,7 +260,8 @@ static void issueCallback(PUTNOTIFY *ppn) void epicsShareAPI dbNotifyCancel(PUTNOTIFY *ppn) { - struct dbCommon *precord = ppn->paddr->precord;; + struct dbCommon *precord = ppn->paddr->precord; + epicsEventWaitStatus status; dbScanLock(precord); notifyCancel(ppn); @@ -268,10 +269,11 @@ void epicsShareAPI dbNotifyCancel(PUTNOTIFY *ppn) ppn->waitForCallback = (void *)epicsEventMustCreate(epicsEventEmpty); ppn->callbackState = callbackCanceled; dbScanUnlock(precord); - if(epicsEventWaitWithTimeout( - (epicsEventId)ppn->waitForCallback,10.0)!=epicsEventWaitOK) { - errlogPrintf("dbNotifyCancel had semTake timeout\n"); - ppn->callbackState = callbackNotActive; + while(1) { + status = epicsEventWaitWithTimeout( + (epicsEventId)ppn->waitForCallback,10.0); + if(status==epicsEventWaitOK) break; + errlogPrintf("dbNotifyCancel: epicsEventWaitWithTimeout timeout\n"); } dbScanLock(precord); epicsEventDestroy((epicsEventId)ppn->waitForCallback);