From 1f21e491ed456e8fa5f53c0e55d20f56e6a4028a Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Tue, 25 Sep 2001 23:56:48 +0000 Subject: [PATCH] fixed race condition --- src/db/dbCAC.h | 1 - src/db/dbServiceIO.cpp | 1 - src/db/dbSubscriptionIO.cpp | 8 ++------ 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/db/dbCAC.h b/src/db/dbCAC.h index 990e7429b..f0077e7dc 100644 --- a/src/db/dbCAC.h +++ b/src/db/dbCAC.h @@ -73,7 +73,6 @@ public: unsigned type, unsigned long count, unsigned mask, cacChannel::ioid * ); void destroy (); void show ( unsigned level ) const; - void channelDestroyNotify (); void * operator new ( size_t size ); void operator delete ( void *pCadaver, size_t size ); protected: diff --git a/src/db/dbServiceIO.cpp b/src/db/dbServiceIO.cpp index 31e475d54..6fd9de628 100644 --- a/src/db/dbServiceIO.cpp +++ b/src/db/dbServiceIO.cpp @@ -257,7 +257,6 @@ void dbServiceIO::destroyAllIO ( dbChannelIO & chan ) while ( ( pIO = chan.dbServicePrivateListOfIO::eventq.get() ) ) { this->ioTable.remove ( *pIO ); tmp.add ( *pIO ); - pIO->channelDestroyNotify (); } if ( chan.dbServicePrivateListOfIO::pBlocker ) { this->ioTable.remove ( *chan.dbServicePrivateListOfIO::pBlocker ); diff --git a/src/db/dbSubscriptionIO.cpp b/src/db/dbSubscriptionIO.cpp index f8f181660..5685985a0 100644 --- a/src/db/dbSubscriptionIO.cpp +++ b/src/db/dbSubscriptionIO.cpp @@ -57,6 +57,8 @@ dbSubscriptionIO::~dbSubscriptionIO () if ( this->es ) { db_cancel_event ( this->es ); } + this->notify.exception ( ECA_CHANDESTROY, + this->chan.pName(), this->type, this->count ); } void dbSubscriptionIO::destroy () @@ -83,12 +85,6 @@ extern "C" void dbSubscriptionEventCallback ( void *pPrivate, struct dbAddr * /* pIO->chan.callStateNotify ( pIO->type, pIO->count, pfl, pIO->notify ); } -void dbSubscriptionIO::channelDestroyNotify () -{ - this->notify.exception ( ECA_CHANDESTROY, - this->chan.pName(), this->type, this->count ); -} - void dbSubscriptionIO::show ( unsigned level ) const { printf ( "Data base subscription IO at %p\n",