summaryrefslogtreecommitdiff
path: root/ACE/ace/Service_Config.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ACE/ace/Service_Config.cpp')
-rw-r--r--ACE/ace/Service_Config.cpp20
1 files changed, 13 insertions, 7 deletions
diff --git a/ACE/ace/Service_Config.cpp b/ACE/ace/Service_Config.cpp
index 22cf75a3b88..02fc863790c 100644
--- a/ACE/ace/Service_Config.cpp
+++ b/ACE/ace/Service_Config.cpp
@@ -47,7 +47,7 @@ ACE_Service_Config_Guard::ACE_Service_Config_Guard (ACE_Service_Gestalt * psg)
{
if (ACE::debug ())
ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("ACE (%P|%t) Service_Config_Guard:<ctor=%@>")
+ ACE_TEXT ("ACE (%P|%t) SCG:<ctor=%@>")
ACE_TEXT (" - config=%@ repo=%@ superceded by repo=%@\n"),
this,
this->saved_,
@@ -65,7 +65,7 @@ ACE_Service_Config_Guard::~ACE_Service_Config_Guard (void)
if (ACE::debug ())
ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("ACE (%P|%t) Service_Config_Guard:<dtor=%@>")
+ ACE_TEXT ("ACE (%P|%t) SCG:<dtor=%@>")
ACE_TEXT (" - new repo=%@\n"),
this,
this->saved_->repo_));
@@ -179,7 +179,7 @@ ACE_Service_Config::open_i (const ACE_TCHAR program_name[],
if (ACE::debug ())
ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("(%P|%t) SC::open_i - this=%@, opened=%d, ")
+ ACE_TEXT ("ACE (%P|%t) SC::open_i - this=%@, opened=%d, ")
ACE_TEXT ("loadstatics=%d\n"),
this, this->is_opened_, this->no_static_svcs_));
@@ -263,8 +263,9 @@ ACE_Service_Config::open_i (const ACE_TCHAR program_name[],
{
ACE_Sig_Set ss;
ss.sig_add (ACE_Service_Config::signum_);
- if (ACE_Reactor::instance ()->register_handler
- (ss, ACE_Service_Config::signal_handler_) == -1)
+ if ((ACE_Reactor::instance () != 0) &&
+ (ACE_Reactor::instance ()->register_handler
+ (ss, ACE_Service_Config::signal_handler_) == -1))
ACE_ERROR ((LM_ERROR,
ACE_TEXT ("can't register signal handler\n")));
}
@@ -326,7 +327,7 @@ ACE_Service_Config::static_svcs (void)
return ACE_Service_Config::instance ();
}
-/// Return the global configuration instance. Allways returns the same
+/// Return the global configuration instance. Always returns the same
/// instance
ACE_Service_Config *
ACE_Service_Config::global (void)
@@ -380,6 +381,9 @@ ACE_Service_Config::ACE_Service_Config (bool ignore_static_svcs,
: ACE_Service_Gestalt (size, false, ignore_static_svcs)
{
ACE_TRACE ("ACE_Service_Config::ACE_Service_Config");
+#if defined (ACE_HAS_TSS_EMULATION)
+ ACE_Object_Manager::init_tss ();
+#endif
this->tss_.ts_object (this);
ACE_Service_Config::signum_ = signum;
}
@@ -447,7 +451,9 @@ ACE_Service_Config::ACE_Service_Config (const ACE_TCHAR program_name[],
: ACE_Service_Gestalt (ACE_Service_Repository::DEFAULT_SIZE, false)
{
ACE_TRACE ("ACE_Service_Config::ACE_Service_Config");
-
+#if defined (ACE_HAS_TSS_EMULATION)
+ ACE_Object_Manager::init_tss ();
+#endif
this->tss_.ts_object (this);
if (this->open (program_name,
logger_key) == -1 && errno != ENOENT)