summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriliyan <iliyan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2006-08-30 17:55:17 +0000
committeriliyan <iliyan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2006-08-30 17:55:17 +0000
commitdd2b89d13857ad3e927607bf30a91f13e6d44235 (patch)
tree22f7fba4d40111306caa8cbdaa9fd3de813538a3
parentcff7acd4c854559416250a3ad73416a473c4287a (diff)
downloadATCD-dd2b89d13857ad3e927607bf30a91f13e6d44235.tar.gz
ChangeLogTag: Wed Aug 30 17:45:30 UTC 2006 Iliyan Jeliazkov <iliyan@ociweb.com>
-rw-r--r--ACE/ChangeLog30
-rw-r--r--ACE/ace/Service_Object.cpp2
-rw-r--r--ACE/ace/Service_Repository.cpp6
-rw-r--r--ACE/ace/Service_Types.cpp21
-rw-r--r--ACE/ace/Service_Types.h4
5 files changed, 42 insertions, 21 deletions
diff --git a/ACE/ChangeLog b/ACE/ChangeLog
index e636da39fce..a0cc1678744 100644
--- a/ACE/ChangeLog
+++ b/ACE/ChangeLog
@@ -1,14 +1,36 @@
+Wed Aug 30 17:45:30 UTC 2006 Iliyan Jeliazkov <iliyan@ociweb.com>
+
+ This change fixes bug#2648
+
+ * ace/Service_Object.cpp:
+
+ Fixed formatting.
+
+ * ace/Service_Repository.cpp:
+
+ Updated logging.
+
+ * ace/Service_Types.h:
+ * ace/Service_Types.cpp:
+
+ Added ACE_Service_Object_Type::initialized_ member variable to
+ hold the result of calling init() on the ACE_Service_Object. The
+ value is later consulted in ACE_Service_Object_Type::fini() to
+ determine if ACE_Service_Object::fini() should be
+ called. C++NPv2 (page 120) says that fini() must be called if
+ and only if, init() succeeded, i.e. returned 0.
+
Wed Aug 30 17:18:52 UTC 2006 Shanshan Jiang <shanshan.jiang@vanderbilt.edu>
* bin/MakeProjectCreator/config/ciao_config_handlers.mpb
Modified this file to fixed the "reference to `ACE_Singleton<CIAO
::Config_Handlers::XML_Helper, ACE_Null_Mutex>::instance()'"warnings
with FC5_Static build.
-
+
Wed Aug 30 13:34:50 UTC 2006 William R. Otte <wotte@dre.vanderbilt.edu>
* bin/make_release
-
+
Updates to the make_release script to make it subversion compatible.
major updates to be aware of:
. Assumes the working copy it uses is flattened
@@ -17,10 +39,10 @@ Wed Aug 30 13:34:50 UTC 2006 William R. Otte <wotte@dre.vanderbilt.edu>
. Produces traditional (nested) releases
. Now produces a set of source-only kits in addition to
the traditional kits.
-
+
IMPORTANT: The release makefiles have not been updated, and are
most likely broken.
-
+
Producing a release is a two step process:
make_release -u # Update version numbers
make_release -k ace+tao+ciao # Create all kits.
diff --git a/ACE/ace/Service_Object.cpp b/ACE/ace/Service_Object.cpp
index 8590d63bc31..fbdc5296564 100644
--- a/ACE/ace/Service_Object.cpp
+++ b/ACE/ace/Service_Object.cpp
@@ -91,7 +91,7 @@ ACE_Service_Type::fini (void)
{
this->fini_already_called_ = 1;
if (this->type_ != 0)
- return this->type_->fini ();
+ return this->type_->fini ();
else
return 1; // No implementation was found.
// Currently only makes sense for dummy ST, used to "reserve"
diff --git a/ACE/ace/Service_Repository.cpp b/ACE/ace/Service_Repository.cpp
index c05e08f33af..2c607f225df 100644
--- a/ACE/ace/Service_Repository.cpp
+++ b/ACE/ace/Service_Repository.cpp
@@ -334,7 +334,6 @@ ACE_Service_Repository::insert (const ACE_Service_Type *sr)
i,
this->total_size_));
sr->dump();
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n")));
}
}
@@ -344,10 +343,9 @@ ACE_Service_Repository::insert (const ACE_Service_Type *sr)
if (ACE::debug ())
{
ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("ACE (%P|%t) SR::insert, repo=%@ - destroying : "),
- this));
+ ACE_TEXT ("ACE (%P|%t) SR::insert, repo=%@ - destroying the former: "),
+ s));
s->dump();
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n")));
}
delete s;
}
diff --git a/ACE/ace/Service_Types.cpp b/ACE/ace/Service_Types.cpp
index 77e733c9429..86ee6229bce 100644
--- a/ACE/ace/Service_Types.cpp
+++ b/ACE/ace/Service_Types.cpp
@@ -89,6 +89,7 @@ ACE_Service_Object_Type::ACE_Service_Object_Type (void *so,
u_int f,
ACE_Service_Object_Exterminator gobbler)
: ACE_Service_Type_Impl (so, s_name, f, gobbler)
+ , initialized_ (-1)
{
ACE_TRACE ("ACE_Service_Object_Type::ACE_Service_Object_Type");
}
@@ -105,8 +106,10 @@ ACE_Service_Object_Type::init (int argc, ACE_TCHAR *argv[]) const
if (so == 0)
return -1;
- else
- return so->init (argc, argv);
+
+ this->initialized_ = so->init (argc, argv);
+
+ return this->initialized_;
}
int
@@ -119,18 +122,12 @@ ACE_Service_Object_Type::fini (void) const
ACE_Service_Object * const so =
static_cast<ACE_Service_Object *> (obj);
- if (so)
- {
+ // Call fini() if an only if, the object was successfuly
+ // initialized, i.e. init() returned 0. This is necessary to
+ // maintain the ctor/dtor-like semantics for init/fini.
+ if (so && initialized_ == 0)
so->fini ();
- // @TODO: Why is this disabled?
-#if 0
- if (ACE_BIT_ENABLED (this->flags_,
- ACE_Service_Type::DELETE_OBJ))
- delete so;
-#endif /* 1 */
- }
-
return ACE_Service_Type_Impl::fini ();
}
diff --git a/ACE/ace/Service_Types.h b/ACE/ace/Service_Types.h
index e2f6500e8ae..8f7e838f4e3 100644
--- a/ACE/ace/Service_Types.h
+++ b/ACE/ace/Service_Types.h
@@ -106,6 +106,10 @@ public:
virtual int init (int argc, ACE_TCHAR *argv[]) const;
virtual int fini (void) const;
virtual int info (ACE_TCHAR **str, size_t len) const;
+
+private:
+ /// Holds the initialization status (result of object->init())
+ mutable int initialized_;
};
/**