summaryrefslogtreecommitdiff
path: root/ace/Service_Object.cpp
diff options
context:
space:
mode:
authoriliyan <iliyan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2006-09-25 14:50:35 +0000
committeriliyan <iliyan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2006-09-25 14:50:35 +0000
commite8d586bcbfce0796c32729f8234a74ca44a5a5c4 (patch)
tree356d769b03b841385f42657ccfeada07ce730320 /ace/Service_Object.cpp
parente63d4e617c903edc335ef8b246371e71f8d203f2 (diff)
downloadATCD-bug2612-ace.tar.gz
ChangeLogTag: Fri Sep 22 21:02:58 UTC 2006 Iliyan Jeliazkov <iliyan@ociweb.com>bug2612-ace
Diffstat (limited to 'ace/Service_Object.cpp')
-rw-r--r--ace/Service_Object.cpp33
1 files changed, 21 insertions, 12 deletions
diff --git a/ace/Service_Object.cpp b/ace/Service_Object.cpp
index fbdc5296564..6e3d5bd9efc 100644
--- a/ace/Service_Object.cpp
+++ b/ace/Service_Object.cpp
@@ -87,20 +87,29 @@ ACE_Service_Type::~ACE_Service_Type (void)
int
ACE_Service_Type::fini (void)
{
- if (!this->fini_already_called_)
+ if (this->fini_already_called_)
+ return 0;
+
+ this->fini_already_called_ = 1;
+
+ if (this->type_ == 0)
{
- this->fini_already_called_ = 1;
- if (this->type_ != 0)
- return this->type_->fini ();
- else
- return 1; // No implementation was found.
- // Currently only makes sense for dummy ST, used to "reserve"
- // a spot (kind of like forward-declarations) for a dynamic
- // service. This is necessary to help enforce the correct
- // finalization order, when such service also has any
- // (dependent) static services
+ // Returning 1 currently only makes sense for dummy instances, used
+ // to "reserve" a spot (kind of like forward-declarations) for a
+ // dynamic service. This is necessary to help enforce the correct
+ // finalization order, when such service also has any (dependent)
+ // static services
+
+ return 1; // No implementation was found.
}
- return 0;
+
+ int ret = this->type_->fini ();
+
+ // Ensure that closing the DLL is done after type_->fini() as it may
+ // require access to the code for the service object destructor,
+ // which resides in the DLL
+ return (ret | this->dll_.close());
+
}
int