diff options
author | iliyan <iliyan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2008-03-03 00:42:41 +0000 |
---|---|---|
committer | iliyan <iliyan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2008-03-03 00:42:41 +0000 |
commit | b4b394268c630e6db7f33346caeb0daaa7ed78b7 (patch) | |
tree | ef79638236d48ef85922a85b3fe4400aa76abd02 | |
parent | 69f25ccc359fd7366e5532a4201a3de4879c5a7a (diff) | |
download | ATCD-b4b394268c630e6db7f33346caeb0daaa7ed78b7.tar.gz |
ChangeLogTag: Mon Mar 3 00:25:37 UTC 2008 Iliyan Jeliazkov <iliyan@ociweb.com>
-rw-r--r-- | ACE/ChangeLog.iliyan-gestalt | 22 | ||||
-rw-r--r-- | ACE/ace/Dynamic_Service.cpp | 4 | ||||
-rw-r--r-- | ACE/ace/Dynamic_Service.h | 8 | ||||
-rw-r--r-- | ACE/ace/Dynamic_Service_Base.cpp | 4 | ||||
-rw-r--r-- | ACE/ace/Dynamic_Service_Base.h | 2 | ||||
-rw-r--r-- | ACE/ace/Service_Config.cpp | 10 | ||||
-rw-r--r-- | ACE/ace/Service_Config.h | 2 | ||||
-rw-r--r-- | ACE/ace/Service_Config.inl | 2 | ||||
-rw-r--r-- | ACE/ace/Service_Gestalt.cpp | 13 | ||||
-rw-r--r-- | ACE/ace/Service_Gestalt.h | 6 | ||||
-rw-r--r-- | ACE/ace/Service_Gestalt.inl | 1 |
11 files changed, 48 insertions, 26 deletions
diff --git a/ACE/ChangeLog.iliyan-gestalt b/ACE/ChangeLog.iliyan-gestalt index 0bf563c0ab5..99a69d243f8 100644 --- a/ACE/ChangeLog.iliyan-gestalt +++ b/ACE/ChangeLog.iliyan-gestalt @@ -1,3 +1,24 @@ +Mon Mar 3 00:25:37 UTC 2008 Iliyan Jeliazkov <iliyan@ociweb.com> + + * ace/Dynamic_Service.h: + * ace/Dynamic_Service.cpp: + * ace/Dynamic_Service_Base.h: + * ace/Dynamic_Service_Base.cpp: + * ace/Service_Config.h: + * ace/Service_Config.inl: + * ace/Service_Config.cpp: + * ace/Service_Gestalt.h: + * ace/Service_Gestalt.inl: + * ace/Service_Gestalt.cpp: + + Expanding the interface of process_directives() and parse_args_i() + with a parameter used to return information whether the standard + svc.conf file must be ignored, due to explicitely specified + configuration file. The open_i() method now passes this piece of + information to process_directives(). Reversing the "naked" pointer + replacement as it causes unexpected reference counting issues with + stack-allocated instances on SC. + Fri Feb 29 03:07:36 UTC 2008 Iliyan Jeliazkov <iliyan@ociweb.com> * ace/Dynamic_Service.h: @@ -5,6 +26,7 @@ Fri Feb 29 03:07:36 UTC 2008 Iliyan Jeliazkov <iliyan@ociweb.com> * ace/Dynamic_Service_Base.h: * ace/Dynamic_Service_Base.cpp: * ace/Service_Config.h: + * ace/Service_Config.inl: * ace/Service_Config.cpp: Replacing the "naked" ACE_Service_Gestalt* with the "smart" diff --git a/ACE/ace/Dynamic_Service.cpp b/ACE/ace/Dynamic_Service.cpp index 5522316c1bf..53d762dc364 100644 --- a/ACE/ace/Dynamic_Service.cpp +++ b/ACE/ace/Dynamic_Service.cpp @@ -38,7 +38,7 @@ ACE_Dynamic_Service<TYPE>::instance (const ACE_TCHAR *name, } template <class TYPE> TYPE * -ACE_Dynamic_Service<TYPE>::instance (const ACE_Service_Gestalt_Auto_Ptr conf, +ACE_Dynamic_Service<TYPE>::instance (const ACE_Service_Gestalt* conf, const ACE_TCHAR *name) { ACE_Service_Object * svc_obj = @@ -48,7 +48,7 @@ ACE_Dynamic_Service<TYPE>::instance (const ACE_Service_Gestalt_Auto_Ptr conf, } template <class TYPE> TYPE * -ACE_Dynamic_Service<TYPE>::instance (const ACE_Service_Gestalt_Auto_Ptr conf, +ACE_Dynamic_Service<TYPE>::instance (const ACE_Service_Gestalt* conf, const ACE_TCHAR *name, bool no_global) { diff --git a/ACE/ace/Dynamic_Service.h b/ACE/ace/Dynamic_Service.h index 3aea0e4a869..ed7317ef562 100644 --- a/ACE/ace/Dynamic_Service.h +++ b/ACE/ace/Dynamic_Service.h @@ -46,9 +46,9 @@ public: static TYPE* instance (const ACE_TCHAR *name); static TYPE* instance (const ACE_TCHAR *name, bool no_global); - static TYPE* instance (const ACE_Service_Gestalt_Auto_Ptr repo, + static TYPE* instance (const ACE_Service_Gestalt* repo, const ACE_TCHAR *name); - static TYPE* instance (const ACE_Service_Gestalt_Auto_Ptr repo, + static TYPE* instance (const ACE_Service_Gestalt* repo, const ACE_TCHAR *name, bool no_global); #if defined (ACE_USES_WCHAR) @@ -58,9 +58,9 @@ public: static TYPE* instance (const ACE_ANTI_TCHAR *name, bool no_global); - static TYPE* instance (const ACE_Service_Gestalt_Auto_Ptr repo, + static TYPE* instance (const ACE_Service_Gestalt* repo, const ACE_ANTI_TCHAR *name); - static TYPE* instance (const ACE_Service_Gestalt_Auto_Ptr repo, + static TYPE* instance (const ACE_Service_Gestalt* repo, const ACE_ANTI_TCHAR *name, bool no_global); #endif // ACE_USES_WCHAR diff --git a/ACE/ace/Dynamic_Service_Base.cpp b/ACE/ace/Dynamic_Service_Base.cpp index 6dee33a3016..e93dde6e905 100644 --- a/ACE/ace/Dynamic_Service_Base.cpp +++ b/ACE/ace/Dynamic_Service_Base.cpp @@ -60,7 +60,7 @@ ACE_Dynamic_Service_Base::find_i (const ACE_Service_Gestalt* &repo, // Get the instance using <name> for specific configuration repository. void * -ACE_Dynamic_Service_Base::instance (const ACE_Service_Gestalt_Auto_Ptr repo, +ACE_Dynamic_Service_Base::instance (const ACE_Service_Gestalt* repo, const ACE_TCHAR *name, bool no_global) { @@ -69,7 +69,7 @@ ACE_Dynamic_Service_Base::instance (const ACE_Service_Gestalt_Auto_Ptr repo, void *obj = 0; const ACE_Service_Type_Impl *type = 0; - const ACE_Service_Gestalt* repo_found = repo.get (); + const ACE_Service_Gestalt* repo_found = repo; const ACE_Service_Type *svc_rec = find_i (repo_found, name, no_global); if (svc_rec != 0) { diff --git a/ACE/ace/Dynamic_Service_Base.h b/ACE/ace/Dynamic_Service_Base.h index 2422b55078e..0a37d53971e 100644 --- a/ACE/ace/Dynamic_Service_Base.h +++ b/ACE/ace/Dynamic_Service_Base.h @@ -48,7 +48,7 @@ protected: /// repo. static void* instance (const ACE_TCHAR *name, bool no_global = false); - static void* instance (const ACE_Service_Gestalt_Auto_Ptr repo, + static void* instance (const ACE_Service_Gestalt* repo, const ACE_TCHAR *name, bool no_global = false); diff --git a/ACE/ace/Service_Config.cpp b/ACE/ace/Service_Config.cpp index 25ce1b2b105..00e8ca00f3a 100644 --- a/ACE/ace/Service_Config.cpp +++ b/ACE/ace/Service_Config.cpp @@ -42,7 +42,7 @@ typedef ACE_Unmanaged_Singleton<ACE_Service_Config, /// ctor -ACE_Service_Config_Guard::ACE_Service_Config_Guard (ACE_Service_Gestalt_Auto_Ptr psg) +ACE_Service_Config_Guard::ACE_Service_Config_Guard (ACE_Service_Gestalt* psg) : saved_ (ACE_Service_Config::current ()) { if (ACE::debug ()) @@ -55,7 +55,7 @@ ACE_Service_Config_Guard::ACE_Service_Config_Guard (ACE_Service_Gestalt_Auto_Ptr psg->repo_)); // Modify the TSS if the repo has changed - ACE_Service_Config::current (psg.get ()); + ACE_Service_Config::current (psg); } ACE_Service_Config_Guard::~ACE_Service_Config_Guard (void) @@ -160,12 +160,12 @@ ACE_Service_Config::parse_args_i (int argc, ACE_TCHAR *argv[]) // Collect any argumets that were left for (int c = getopt.opt_ind (); c < argc; ++c) - superargv.add (argv[c-1], true); + superargv.add (argv[c-1], true); - bool unused_ignore_default_svc_conf = true; + bool ignore_default_svc_conf_file = false; return instance_->parse_args_i (superargv.argc (), superargv.argv (), - unused_ignore_default_svc_conf); + ignore_default_svc_conf_file); } /* parse_args_i () */ diff --git a/ACE/ace/Service_Config.h b/ACE/ace/Service_Config.h index cf66553e95d..fc164b5c697 100644 --- a/ACE/ace/Service_Config.h +++ b/ACE/ace/Service_Config.h @@ -619,7 +619,7 @@ private: class ACE_Export ACE_Service_Config_Guard { public: - ACE_Service_Config_Guard (const ACE_Service_Gestalt_Auto_Ptr); + ACE_Service_Config_Guard (ACE_Service_Gestalt*); ~ACE_Service_Config_Guard (void); private: diff --git a/ACE/ace/Service_Config.inl b/ACE/ace/Service_Config.inl index c76a0955b46..cc6a32ae225 100644 --- a/ACE/ace/Service_Config.inl +++ b/ACE/ace/Service_Config.inl @@ -145,7 +145,7 @@ ACE_Service_Config::process_directive (const ACE_TCHAR directive[]) ACE_INLINE int ACE_Service_Config::process_directives (void) { - return ACE_Service_Config::current ()->process_directives (); + return ACE_Service_Config::current ()->process_directives (false); } ACE_INLINE int diff --git a/ACE/ace/Service_Gestalt.cpp b/ACE/ace/Service_Gestalt.cpp index d45d5c83f45..0adc6d099e8 100644 --- a/ACE/ace/Service_Gestalt.cpp +++ b/ACE/ace/Service_Gestalt.cpp @@ -866,12 +866,13 @@ ACE_Service_Gestalt::process_directives_i (ACE_Svc_Conf_Param *param) // Were we called in the context of the current instance? ACE_ASSERT (this == param->config); - // Temporarily (for the duration of this call) make sure that *any* static - // service registrations will happen with this instance. Such registrations - // are possible as a side-effect of dynamically loading a DLL, which has - // other static services registered. Thus this instance will own both the - // DLL and those static services, which implies that their finalization - // will be performed in the correct order, i.e. prior to finalizing the DLL + // Temporarily (for the duration of this call) make sure that *any* + // static service registrations will happen with this instance. Such + // registrations are possible as a side-effect of dynamically + // loading a DLL, which has other static services registered. Thus + // this instance will own both the DLL and those static services, + // which implies that their finalization will be performed in the + // correct order, i.e. prior to finalizing the DLL ACE_Service_Config_Guard guard (this); #ifndef ACE_NLOGGING diff --git a/ACE/ace/Service_Gestalt.h b/ACE/ace/Service_Gestalt.h index 81a593c5cb0..4d191be24de 100644 --- a/ACE/ace/Service_Gestalt.h +++ b/ACE/ace/Service_Gestalt.h @@ -238,7 +238,7 @@ public: * provided in the svc.conf file(s). Returns the number of errors * that occurred. */ - int process_directives (bool ignore_default_svc_conf_file = false); + int process_directives (bool ignore_default_svc_conf_file); /// Tidy up and perform last rites when ACE_Service_Config is shut /// down. This method calls <close_svcs>. Returns 0. @@ -321,9 +321,7 @@ protected: /** * */ - virtual int parse_args_i (int, - ACE_TCHAR *argv[], - bool &ignore_default_svc_conf_file); + virtual int parse_args_i (int, ACE_TCHAR *argv[], bool& ignore_default_svc_conf_file); /** * Performs an open without parsing command-line arguments. The diff --git a/ACE/ace/Service_Gestalt.inl b/ACE/ace/Service_Gestalt.inl index d3dcd019c52..dd8d18dd4bf 100644 --- a/ACE/ace/Service_Gestalt.inl +++ b/ACE/ace/Service_Gestalt.inl @@ -35,6 +35,7 @@ ACE_Service_Gestalt::open (int argc, bool ignore_debug_flag) { ACE_TRACE ("ACE_Service_Gestalt::open"); + this->no_static_svcs_ = ignore_static_svcs; if (this->parse_args_i (argc, |