diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 2000-08-26 17:03:15 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 2000-08-26 17:03:15 +0000 |
commit | 4ea56f7e77ff05142a61d87469d9247433fd2714 (patch) | |
tree | 32b351ea6498334eb708f5d24a1d66fe2609bd03 | |
parent | 8331cdc79f142a76df4f079dae1285e5bce90a24 (diff) | |
download | ATCD-4ea56f7e77ff05142a61d87469d9247433fd2714.tar.gz |
ChangeLogTag:Sat Aug 26 12:00:18 2000 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | ChangeLogs/ChangeLog-02a | 7 | ||||
-rw-r--r-- | ChangeLogs/ChangeLog-03a | 7 | ||||
-rw-r--r-- | ace/Service_Repository.cpp | 34 |
4 files changed, 38 insertions, 17 deletions
diff --git a/ChangeLog b/ChangeLog index 25b353e92e2..b1af5f3698c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Sat Aug 26 12:00:18 2000 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu> + + * ace/Service_Repository.cpp: Modify the remove() method so that + it is "re-entrant" i.e., one can call it from other svc's fini() + called from remove(). Thanks to Martin Krumpolec + <krumpo@pobox.sk> for contributing this fix. + Fri Aug 25 18:09:04 2000 Carlos O'Ryan <coryan@uci.edu> * ace/config-win32.h: diff --git a/ChangeLogs/ChangeLog-02a b/ChangeLogs/ChangeLog-02a index 25b353e92e2..b1af5f3698c 100644 --- a/ChangeLogs/ChangeLog-02a +++ b/ChangeLogs/ChangeLog-02a @@ -1,3 +1,10 @@ +Sat Aug 26 12:00:18 2000 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu> + + * ace/Service_Repository.cpp: Modify the remove() method so that + it is "re-entrant" i.e., one can call it from other svc's fini() + called from remove(). Thanks to Martin Krumpolec + <krumpo@pobox.sk> for contributing this fix. + Fri Aug 25 18:09:04 2000 Carlos O'Ryan <coryan@uci.edu> * ace/config-win32.h: diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a index 25b353e92e2..b1af5f3698c 100644 --- a/ChangeLogs/ChangeLog-03a +++ b/ChangeLogs/ChangeLog-03a @@ -1,3 +1,10 @@ +Sat Aug 26 12:00:18 2000 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu> + + * ace/Service_Repository.cpp: Modify the remove() method so that + it is "re-entrant" i.e., one can call it from other svc's fini() + called from remove(). Thanks to Martin Krumpolec + <krumpo@pobox.sk> for contributing this fix. + Fri Aug 25 18:09:04 2000 Carlos O'Ryan <coryan@uci.edu> * ace/config-win32.h: diff --git a/ace/Service_Repository.cpp b/ace/Service_Repository.cpp index 198ac3c6830..41339bbcf0b 100644 --- a/ace/Service_Repository.cpp +++ b/ace/Service_Repository.cpp @@ -171,8 +171,8 @@ ACE_Service_Repository::close (void) { ACE_Service_Type *s = ACE_const_cast (ACE_Service_Type *, this->service_vector_[i]); - delete s; --this->current_size_; + delete s; } delete [] this->service_vector_; @@ -326,23 +326,23 @@ int ACE_Service_Repository::remove (const ACE_TCHAR name[]) { ACE_TRACE ("ACE_Service_Repository::remove"); - ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1)); - - int i = this->find_i (name, 0, 0); - - if (i == -1) - return -1; - - ACE_Service_Type *s = ACE_const_cast (ACE_Service_Type *, - this->service_vector_[i]); + ACE_Service_Type *s = 0; + { + ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1)); + int i = this->find_i (name, 0, 0); + + if (i == -1) + return -1; + + s = ACE_const_cast (ACE_Service_Type *, + this->service_vector_[i]); + --this->current_size_; + + if (this->current_size_ >= 1) + this->service_vector_[i] + = this->service_vector_[this->current_size_]; + } delete s; - - --this->current_size_; - - if (this->current_size_ >= 1) - this->service_vector_[i] - = this->service_vector_[this->current_size_]; - return 0; } |