From 88c99148b2535d4b9ffa551694f54fa040aa4e83 Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Thu, 12 Dec 1996 18:55:38 +0000 Subject: [PATCH] fixed client initiated pv delete calls interestDelete() VF bug --- src/cas/generic/casPVI.cc | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/cas/generic/casPVI.cc b/src/cas/generic/casPVI.cc index f49519440..de6ac07c6 100644 --- a/src/cas/generic/casPVI.cc +++ b/src/cas/generic/casPVI.cc @@ -29,6 +29,9 @@ * * History * $Log$ + * Revision 1.6 1996/12/06 22:35:06 jhill + * added destroyInProgress flag + * * Revision 1.5 1996/11/02 00:54:22 jhill * many improvements * @@ -107,6 +110,12 @@ casPVI::~casPVI() // when we destroyed the channels // casVerify (this->nIOAttached==0u); + + // + // all monitors should have been deleted + // when we destroyed the channels + // + casVerify (this->nMonAttached==0u); } @@ -148,10 +157,16 @@ caStatus casPVI::registerEvent () // void casPVI::unregisterEvent() { + this->lock(); this->nMonAttached--; - if (this->nMonAttached==0u) { + // + // Dont call casPV::interestDelete() when we are in + // casPVI::~casPVI() (and casPV no longr exists) + // + if (this->nMonAttached==0u && !this->destroyInProgress) { (*this)->interestDelete(); } + this->unlock(); } //