made compatible with changes in service API

This commit is contained in:
Jeff Hill
2001-05-22 02:02:41 +00:00
parent 70de17474b
commit 9940b408fb
4 changed files with 14 additions and 8 deletions
+1 -1
View File
@@ -102,7 +102,7 @@ void dbChannelIO::subscribe ( unsigned type, unsigned long count,
new dbSubscriptionIO ( this->serviceIO, *this,
this->addr, notify, type, count, mask, pId );
if ( ! pIO ) {
throw noMemory();
throw std::bad_alloc ();
}
}
+11 -5
View File
@@ -72,11 +72,15 @@ extern "C" void putNotifyCompletion ( putNotify *ppn )
if ( pBlocker->pn.status ) {
if ( pBlocker->pn.status == S_db_Blocked ) {
pBlocker->pNotify->exception (
ECA_PUTCBINPROG, "put notify blocked" );
ECA_PUTCBINPROG, "put notify blocked",
static_cast <unsigned> (pBlocker->pn.dbrType),
static_cast <unsigned> (pBlocker->pn.nRequest) );
}
else {
pBlocker->pNotify->exception (
ECA_PUTFAIL, "put notify unsuccessful");
ECA_PUTFAIL, "put notify unsuccessful",
static_cast <unsigned> (pBlocker->pn.dbrType),
static_cast <unsigned> (pBlocker->pn.nRequest) );
}
}
else {
@@ -122,7 +126,7 @@ void dbPutNotifyBlocker::initiatePutNotify ( epicsMutex &mutex, cacWriteNotify &
beginTimeInit = true;
}
{
epicsAutoMutexRelease blocker ( mutex );
epicsAutoMutexRelease autoRelease ( mutex );
this->block.wait ( 1.0 );
}
}
@@ -154,9 +158,11 @@ void dbPutNotifyBlocker::initiatePutNotify ( epicsMutex &mutex, cacWriteNotify &
memset ( &this->pn, '\0', sizeof ( this->pn ) );
this->pNotify = 0;
{
epicsAutoMutexRelease blocker ( mutex );
epicsAutoMutexRelease autoRelease ( mutex );
notify.exception (
ECA_PUTFAIL, "dbPutNotify() returned failure" );
ECA_PUTFAIL, "dbPutNotify() returned failure",
static_cast <unsigned> (this->pn.dbrType),
static_cast <unsigned> (this->pn.nRequest) );
}
}
}
+1 -1
View File
@@ -252,7 +252,7 @@ void dbServiceIO::initiatePutNotify ( dbChannelIO &chan, struct dbAddr &addr,
if ( ! chan.dbServicePrivateListOfIO::pBlocker ) {
chan.dbServicePrivateListOfIO::pBlocker = new dbPutNotifyBlocker ( chan );
if ( ! chan.dbServicePrivateListOfIO::pBlocker ) {
throw cacChannel::noMemory();
throw std::bad_alloc ();
}
this->ioTable.add ( *chan.dbServicePrivateListOfIO::pBlocker );
}
+1 -1
View File
@@ -41,7 +41,7 @@ dbSubscriptionIO::dbSubscriptionIO ( dbServiceIO &serviceIO, dbChannelIO &chanIO
{
this->es = serviceIO.subscribe ( addr, chanIO, *this, maskIn, pId );
if ( ! this->es ) {
throw cacChannel::noMemory();
throw std::bad_alloc ();
}
}