summaryrefslogtreecommitdiff
path: root/TAO/tao/TAO_Internal.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tao/TAO_Internal.cpp')
-rw-r--r--TAO/tao/TAO_Internal.cpp196
1 files changed, 117 insertions, 79 deletions
diff --git a/TAO/tao/TAO_Internal.cpp b/TAO/tao/TAO_Internal.cpp
index 73c596f02d9..5c8582c2f82 100644
--- a/TAO/tao/TAO_Internal.cpp
+++ b/TAO/tao/TAO_Internal.cpp
@@ -10,7 +10,6 @@
#include "tao/CORBANAME_Parser.h"
#include "tao/CORBALOC_Parser.h"
#include "tao/FILE_Parser.h"
-#include "tao/HTTP_Parser.h"
#include "tao/DLL_Parser.h"
#include "tao/ORB_Core.h"
#include "tao/Adapter_Factory.h"
@@ -177,8 +176,14 @@ class TAO_Ubergestalt_Ready_Condition
public:
static TAO_Ubergestalt_Ready_Condition* instance (void)
{
- return TAO_Singleton <TAO_Ubergestalt_Ready_Condition,
- TAO_SYNCH_RECURSIVE_MUTEX>::instance ();
+ // The first thread to get here will initialize the static
+ // local. Any subsequent threads synchronizaton will be handled by
+ // TAO_Singleton
+ static TAO_Ubergestalt_Ready_Condition *i_ =
+ TAO_Singleton <TAO_Ubergestalt_Ready_Condition,
+ TAO_SYNCH_RECURSIVE_MUTEX>::instance ();
+
+ return i_;
};
TAO_Ubergestalt_Ready_Condition (void)
@@ -534,7 +539,6 @@ namespace
pcfg->process_directive (ace_svc_desc_TAO_CORBALOC_Parser);
pcfg->process_directive (ace_svc_desc_TAO_FILE_Parser);
pcfg->process_directive (ace_svc_desc_TAO_DLL_Parser);
- pcfg->process_directive (ace_svc_desc_TAO_HTTP_Parser);
pcfg->process_directive (ace_svc_desc_TAO_Default_Stub_Factory);
pcfg->process_directive (
ace_svc_desc_TAO_Default_Endpoint_Selector_Factory);
@@ -634,6 +638,7 @@ namespace
{
rtscheduler_loader->init (0, 0);
}
+
} /* register_additional_services_i */
int
@@ -713,61 +718,63 @@ namespace
while (arg_shifter.is_anything_left ())
{
const ACE_TCHAR *current_arg = 0;
- if (0 == arg_shifter.cur_arg_strncasecmp
- (ACE_TEXT ("-ORBSkipServiceConfigOpen")))
- {
- skip_service_config_open = true;
+ int result =
+ arg_shifter.cur_arg_strncasecmp (
+ ACE_TEXT ("-ORBSkipServiceConfigOpen"));
- arg_shifter.consume_arg ();
- }
- else if (0 != (current_arg = arg_shifter.get_the_parameter
- (ACE_TEXT ("-ORBSvcConfDirective"))))
+ if (0 == result) // Start with the parameterless flags.
{
- len = svc_config_argv.length ();
- svc_config_argv.length (len + 2); // 2 arguments to add
-
- // This is used to pass arguments to the Service
- // Configurator using the "command line" to provide
- // configuration information rather than using a svc.conf
- // file. Pass the "-S" to the service configurator.
- svc_config_argv[len] = CORBA::string_dup ("-S");
- svc_config_argv[len + 1] =
- CORBA::string_dup (ACE_TEXT_ALWAYS_CHAR (current_arg));
+ skip_service_config_open = true;
arg_shifter.consume_arg ();
}
- else if (0 != (current_arg = arg_shifter.get_the_parameter
- (ACE_TEXT ("-ORBServiceConfigLoggerKey"))))
+ else // Continue with flags that accept parameters.
{
- len = svc_config_argv.length ();
- svc_config_argv.length (len + 2); // 2 arguments to add
-
- svc_config_argv[len] = CORBA::string_dup ("-k");
- svc_config_argv[len + 1] =
- CORBA::string_dup (ACE_TEXT_ALWAYS_CHAR (current_arg));
+ current_arg =
+ arg_shifter.get_the_parameter (
+ ACE_TEXT ("-ORBSvcConfDirective"));
- arg_shifter.consume_arg ();
- }
- else if (0 == arg_shifter.cur_arg_strncasecmp
- (ACE_TEXT ("-ORBNegotiateCodesets")))
- {
- // Negotiate codesets must be evaluated prior to calling
- // register_global_services_i.
+ if (0 != current_arg)
+ {
+ len = svc_config_argv.length ();
+ svc_config_argv.length (len + 2); // 2 arguments to add
- // Don't consume, the ORB_Core::init will use it again.
- arg_shifter.ignore_arg();
+ // This is used to pass arguments to the Service
+ // Configurator using the "command line" to provide
+ // configuration information rather than using a svc.conf
+ // file. Pass the "-S" to the service configurator.
+ svc_config_argv[len] = CORBA::string_dup ("-S");
+ svc_config_argv[len + 1] =
+ CORBA::string_dup (ACE_TEXT_ALWAYS_CHAR (current_arg));
- if (0 != (current_arg = arg_shifter.get_current()))
- negotiate_codesets = (ACE_OS::atoi (current_arg));
- arg_shifter.ignore_arg();
- }
- // Can't interpret this argument.
- // Move on to the next argument.
- else
- {
- // Any arguments that don't match are ignored so that
- // the caller can still use them.
- arg_shifter.ignore_arg ();
+ arg_shifter.consume_arg ();
+ }
+ else
+ {
+ current_arg =
+ arg_shifter.get_the_parameter (
+ ACE_TEXT ("-ORBServiceConfigLoggerKey"));
+
+ if (0 != current_arg)
+ {
+ len = svc_config_argv.length ();
+ svc_config_argv.length (len + 2); // 2 arguments to add
+
+ svc_config_argv[len] = CORBA::string_dup ("-k");
+ svc_config_argv[len + 1] =
+ CORBA::string_dup (ACE_TEXT_ALWAYS_CHAR (current_arg));
+
+ arg_shifter.consume_arg ();
+ }
+ // Can't interpret this argument.
+ // Move on to the next argument.
+ else
+ {
+ // Any arguments that don't match are ignored so that
+ // the caller can still use them.
+ arg_shifter.ignore_arg ();
+ }
+ }
}
}
@@ -816,7 +823,10 @@ namespace
while (arg_shifter.is_anything_left ())
{
const ACE_TCHAR *current_arg = 0;
- if (0 == arg_shifter.cur_arg_strncasecmp (ACE_TEXT ("-ORBDebug")))
+ int strcmp_result =
+ arg_shifter.cur_arg_strncasecmp (ACE_TEXT ("-ORBDebug"));
+
+ if (0 == strcmp_result)
{
if (apply_values)
{
@@ -827,41 +837,69 @@ namespace
arg_shifter.consume_arg ();
}
- else if (0 != (current_arg =
- arg_shifter.get_the_parameter
- (ACE_TEXT ("-ORBDebugLevel"))))
+ else
{
- if (apply_values)
+ current_arg =
+ arg_shifter.get_the_parameter (
+ ACE_TEXT ("-ORBNegotiateCodesets"));
+
+ if (0 != current_arg)
{
- TAO_debug_level =
- ACE_OS::atoi (current_arg);
+ if (apply_values)
+ {
+ // Don't consume, the ORB_Core::init will use it again.
+ negotiate_codesets = (ACE_OS::atoi (current_arg));
+ }
}
- arg_shifter.consume_arg ();
- }
- else if (0 == arg_shifter.cur_arg_strncasecmp
- (ACE_TEXT ("-ORBDaemon")))
- {
- // Be a daemon.
- if (apply_values)
+ else
{
- len = svc_config_argv.length ();
- svc_config_argv.length (len + 1);
-
- svc_config_argv[len] =
- CORBA::string_dup ("-b");
+ current_arg =
+ arg_shifter.get_the_parameter (
+ ACE_TEXT ("-ORBDebugLevel"));
+
+ if (0 != current_arg)
+ {
+ if (apply_values)
+ {
+ TAO_debug_level =
+ ACE_OS::atoi (current_arg);
+ }
+
+ arg_shifter.consume_arg ();
+ }
+ else
+ {
+ strcmp_result =
+ arg_shifter.cur_arg_strncasecmp (
+ ACE_TEXT ("-ORBDaemon"));
+
+ if (0 == strcmp_result)
+ {
+ // Be a daemon.
+ if (apply_values)
+ {
+ len = svc_config_argv.length ();
+ svc_config_argv.length (len + 1);
+
+ svc_config_argv[len] =
+ CORBA::string_dup ("-b");
+ }
+
+ arg_shifter.consume_arg ();
+ }
+ // Can't interpret this argument.
+ // Move on to the next argument.
+ else
+ {
+ // Any arguments that don't match are ignored so
+ // that the caller can still use them.
+ arg_shifter.ignore_arg ();
+ }
+ }
}
-
- arg_shifter.consume_arg ();
- }
- // Can't interpret this argument.
- // Move on to the next argument.
- else
- {
- // Any arguments that don't match are ignored so
- // that the caller can still use them.
- arg_shifter.ignore_arg ();
}
}
+
return 0;
} /* parse_global_args_i */
} // anonymous namespace.