diff options
author | cbeaulac <cbeaulac@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2010-05-04 21:34:39 +0000 |
---|---|---|
committer | cbeaulac <cbeaulac@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2010-05-04 21:34:39 +0000 |
commit | 0c4c75e10be67e56b25e225803ec4546c2985d68 (patch) | |
tree | 9999716bd05654a49fb8b57a7e1aaa1f43ec6c11 /ACE/ace/Stream.cpp | |
parent | e3fbeb113a456fca004ab17591f7c8a7b3f9a236 (diff) | |
download | ATCD-0c4c75e10be67e56b25e225803ec4546c2985d68.tar.gz |
Tue May 4 21:23:44 UTC 2010 Chad Beaulac <chad@objectivesolutions.com>
* ace/Stream.cpp
Added debug and warning logging in ACE_Stream::remove
* ace/Service_Types.cpp
One of problems is that ACE_Module_Type::name gets its
value from the svc.conf file. The ACE_Module that it references
gets its name from the static factory method used to create the
module. When the names don't match the call to ACE_Stream_Type::fini
fails to remove any ACE_Modules from the underlying ACE_Stream.
Since none of the ACE_Modules are removed, ACE_Module_Type::fini
tries to call fini on the ACE_Module reader and writer ACE_Task
instances. And they've already been deleted by ACE_Stream::close
called from ACE_Stream_Type::fini.
Reassigned ACE_Module::name in ACE_Module_Type::init to
ACE_Module_Type::name and fixed the SEGV at shutdown because of the
issue described above.
All of these issues are related: #3334 #3205 #2916 #3847
Diffstat (limited to 'ACE/ace/Stream.cpp')
-rw-r--r-- | ACE/ace/Stream.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/ACE/ace/Stream.cpp b/ACE/ace/Stream.cpp index 3e3cc3906ee..2ea933edd0b 100644 --- a/ACE/ace/Stream.cpp +++ b/ACE/ace/Stream.cpp @@ -4,6 +4,7 @@ #ifndef ACE_STREAM_CPP #define ACE_STREAM_CPP + //#include "ace/Module.h" #include "ace/Stream.h" @@ -241,6 +242,17 @@ ACE_Stream<ACE_SYNCH_USE>::remove (const ACE_TCHAR *name, for (ACE_Module<ACE_SYNCH_USE> *mod = this->stream_head_; mod != 0; mod = mod->next ()) + { +#ifndef ACE_NLOGGING + if (ACE::debug ()) + { + ACE_DEBUG ((LM_DEBUG, + ACE_TEXT ("ACE_Stream::remove comparing existing module :%s: with :%s:\n"), + mod->name (), + name)); + } +#endif + if (ACE_OS::strcmp (mod->name (), name) == 0) { if (prev == 0) // Deleting ACE_Stream Head @@ -260,7 +272,9 @@ ACE_Stream<ACE_SYNCH_USE>::remove (const ACE_TCHAR *name, } else prev = mod; + } + ACE_DEBUG ((LM_WARNING, ACE_TEXT ("ACE_Stream::remove failed to find module with name %s to remove\n"),name)); return -1; } |