00001
00002
00003 #include "tao/TAO_Internal.h"
00004 #include "tao/TAO_Singleton.h"
00005 #include "tao/default_server.h"
00006 #include "tao/default_client.h"
00007 #include "tao/default_resource.h"
00008 #include "tao/IIOP_Factory.h"
00009 #include "tao/MCAST_Parser.h"
00010 #include "tao/CORBANAME_Parser.h"
00011 #include "tao/CORBALOC_Parser.h"
00012 #include "tao/FILE_Parser.h"
00013 #include "tao/DLL_Parser.h"
00014 #include "tao/ORB_Core.h"
00015 #include "tao/Adapter_Factory.h"
00016 #include "tao/Default_Stub_Factory.h"
00017 #include "tao/Default_Endpoint_Selector_Factory.h"
00018 #include "tao/Default_Protocols_Hooks.h"
00019 #include "tao/Default_Thread_Lane_Resources_Manager.h"
00020 #include "tao/Default_Collocation_Resolver.h"
00021 #include "tao/Codeset_Manager_Factory_Base.h"
00022 #include "tao/Codeset_Manager.h"
00023 #include "tao/debug.h"
00024 #include "tao/StringSeqC.h"
00025
00026 #include "ace/Dynamic_Service.h"
00027 #include "ace/Arg_Shifter.h"
00028 #include "ace/Argv_Type_Converter.h"
00029 #include "ace/Env_Value_T.h"
00030 #include "ace/ACE.h"
00031 #include "ace/OS_NS_stdio.h"
00032 #include "ace/Static_Object_Lock.h"
00033
00034 ACE_RCSID (tao,
00035 TAO_Internal,
00036 "TAO_Internal.cpp,v 1.90 2006/06/03 05:06:31 mesnier_p Exp")
00037
00038 #ifndef TAO_DEFAULT_RESOURCE_FACTORY_ARGS
00039 # define TAO_DEFAULT_RESOURCE_FACTORY_ARGS 0
00040 #endif
00041
00042 #ifndef TAO_DEFAULT_SERVER_STRATEGY_FACTORY_ARGS
00043 # define TAO_DEFAULT_SERVER_STRATEGY_FACTORY_ARGS 0
00044 #endif
00045
00046 #ifndef TAO_DEFAULT_CLIENT_STRATEGY_FACTORY_ARGS
00047 # define TAO_DEFAULT_CLIENT_STRATEGY_FACTORY_ARGS 0
00048 #endif
00049
00050
00051 namespace
00052 {
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068 int
00069 parse_global_args_i (int &argc,
00070 char **argv,
00071 CORBA::StringSeq &svc_config_argv,
00072 bool apply_values);
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084 int
00085 parse_svcconf_args_i (int &argc,
00086 char **argv,
00087 CORBA::StringSeq &svc_config_argv);
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106 void register_global_services_i (ACE_Service_Gestalt * pcfg);
00107 void register_additional_services_i (ACE_Service_Gestalt * pcfg);
00108
00109
00110
00111
00112
00113
00114
00115
00116 int
00117 parse_private_args_i (int &argc,
00118 char **argv,
00119 CORBA::StringSeq & svc_config_argv,
00120 bool & skip_service_config_open);
00121
00122
00123
00124
00125
00126
00127
00128
00129 int open_private_services_i (ACE_Service_Gestalt* pcfg,
00130 int & argc,
00131 char ** argv,
00132 bool skip_service_config_open = false,
00133 bool ignore_default_svc_conf_file = false);
00134
00135
00136
00137
00138
00139
00140
00141 long service_open_count = 0;
00142
00143
00144
00145
00146
00147
00148
00149
00150 bool is_ubergestalt_ready = false;
00151
00152 char const * resource_factory_args =
00153 TAO_DEFAULT_RESOURCE_FACTORY_ARGS;
00154 char const * server_strategy_factory_args =
00155 TAO_DEFAULT_SERVER_STRATEGY_FACTORY_ARGS;
00156 char const * client_strategy_factory_args =
00157 TAO_DEFAULT_CLIENT_STRATEGY_FACTORY_ARGS;
00158
00159 #if (TAO_NEGOTIATE_CODESETS == 1)
00160 bool negotiate_codesets = true;
00161 #else
00162 bool negotiate_codesets = false;
00163 #endif
00164 }
00165
00166 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00167
00168
00169
00170
00171
00172 #if defined (ACE_HAS_THREADS)
00173 class TAO_Ubergestalt_Ready_Condition
00174 : public ACE_SYNCH_RECURSIVE_CONDITION
00175 {
00176 public:
00177 TAO_Ubergestalt_Ready_Condition (void)
00178 : ACE_SYNCH_RECURSIVE_CONDITION
00179 (*ACE_Static_Object_Lock::instance())
00180 {
00181 };
00182
00183 static TAO_Ubergestalt_Ready_Condition* instance (void)
00184 {
00185
00186
00187
00188 static TAO_Ubergestalt_Ready_Condition *i_ =
00189 TAO_Singleton <TAO_Ubergestalt_Ready_Condition,
00190 TAO_SYNCH_RECURSIVE_MUTEX>::instance ();
00191
00192 return i_;
00193 };
00194 };
00195 #endif // ACE_HAS_THREADS
00196
00197 int
00198 TAO::ORB::open_services (ACE_Service_Gestalt* pcfg,
00199 int &argc,
00200 ACE_TCHAR **argv)
00201 {
00202 {
00203 ACE_MT (ACE_GUARD_RETURN (TAO_SYNCH_RECURSIVE_MUTEX,
00204 guard,
00205 TAO_Ubergestalt_Ready_Condition::instance ()->mutex (),
00206 -1));
00207
00208
00209
00210 if (service_open_count == 1)
00211 {
00212 if (TAO_debug_level > 4)
00213 ACE_DEBUG ((LM_DEBUG,
00214 ACE_TEXT ("TAO (%P|%t) Waiting for the default ")
00215 ACE_TEXT ("ORB to complete the global ")
00216 ACE_TEXT ("initialization\n")));
00217
00218 ACE_MT (while (!is_ubergestalt_ready)
00219 TAO_Ubergestalt_Ready_Condition::instance ()->wait ());
00220
00221 if (TAO_debug_level > 4)
00222 ACE_DEBUG ((LM_DEBUG,
00223 ACE_TEXT ("TAO (%P|%t) The default ")
00224 ACE_TEXT ("ORB must have completed the global ")
00225 ACE_TEXT ("initialization...\n")));
00226
00227 }
00228 else
00229 {
00230 if (TAO_debug_level > 4)
00231 ACE_DEBUG ((LM_DEBUG,
00232 ACE_TEXT ("TAO (%P|%t) We are %sthe default ")
00233 ACE_TEXT ("ORB ...\n"),
00234 (service_open_count == 0) ? "" : "not "));
00235 }
00236
00237 service_open_count++;
00238 }
00239
00240
00241
00242 CORBA::StringSeq svc_config_argv;
00243
00244
00245
00246 ACE_CString argv0 ("");
00247
00248 if (argc > 0 && argv != 0)
00249 {
00250 argv0 = ACE_TEXT_ALWAYS_CHAR (argv[0]);
00251 }
00252
00253 svc_config_argv.length (1);
00254 svc_config_argv[0] = argv0.c_str ();
00255
00256
00257
00258
00259
00260
00261
00262
00263 bool skip_service_config_open = false;
00264
00265
00266 if (parse_private_args_i (argc,
00267 argv,
00268 svc_config_argv,
00269 skip_service_config_open) == -1)
00270 {
00271 return -1;
00272 }
00273
00274
00275
00276 CORBA::StringSeq global_svc_config_argv;
00277
00278 ACE_Service_Gestalt * theone = ACE_Service_Config::global ();
00279
00280 if (service_open_count == 1)
00281 {
00282 ACE_Service_Config_Guard config_guard (theone);
00283
00284 if (TAO_debug_level > 2)
00285 {
00286 ACE_DEBUG ((LM_DEBUG,
00287 ACE_TEXT ("TAO (%P|%t) Initializing the ")
00288 ACE_TEXT ("process-wide services\n")));
00289 }
00290
00291 register_global_services_i (theone);
00292
00293
00294
00295 ACE_CString argv0 ("");
00296
00297 if (argc > 0 && argv != 0)
00298 {
00299 argv0 = ACE_TEXT_ALWAYS_CHAR (argv[0]);
00300 }
00301
00302 global_svc_config_argv.length (1);
00303 global_svc_config_argv[0] = argv0.c_str ();
00304
00305 if (parse_global_args_i (argc, argv, global_svc_config_argv, true) == -1)
00306 {
00307 return -1;
00308 }
00309
00310 if (parse_svcconf_args_i (argc, argv, global_svc_config_argv) == -1)
00311 {
00312 return -1;
00313 }
00314
00315 int global_svc_config_argc = global_svc_config_argv.length ();
00316 int status =
00317 open_private_services_i (theone,
00318 global_svc_config_argc,
00319 global_svc_config_argv.get_buffer (),
00320 skip_service_config_open);
00321
00322 if (status == -1 && TAO_debug_level > 0)
00323 {
00324 if (TAO_debug_level > 0)
00325 {
00326 ACE_ERROR_RETURN ((LM_DEBUG,
00327 ACE_TEXT ("TAO (%P|%t) Failed to ")
00328 ACE_TEXT ("open process-wide service ")
00329 ACE_TEXT ("configuration\n")),
00330 -1);
00331 }
00332
00333 return -1;
00334 }
00335
00336 register_additional_services_i (theone);
00337
00338
00339 if (TAO_debug_level > 4)
00340 ACE_DEBUG ((LM_DEBUG,
00341 ACE_TEXT ("TAO (%P|%t) Default ORB - global ")
00342 ACE_TEXT ("initialization completed.\n")));
00343
00344
00345
00346 {
00347 ACE_MT (ACE_GUARD_RETURN (TAO_SYNCH_RECURSIVE_MUTEX,
00348 guard,
00349 TAO_Ubergestalt_Ready_Condition::instance ()->mutex (),
00350 -1));
00351
00352 is_ubergestalt_ready = true;
00353 ACE_MT (if (TAO_Ubergestalt_Ready_Condition::instance ()->
00354 broadcast () == -1)
00355 return -1);
00356 }
00357
00358 }
00359 else
00360 {
00361 int status =
00362 parse_global_args_i(argc, argv,global_svc_config_argv, false);
00363 if (status == -1 && TAO_debug_level > 0)
00364 ACE_DEBUG ((LM_DEBUG,
00365 ACE_TEXT ("TAO (%P|%t) Skipping the process-wide ")
00366 ACE_TEXT ("service configuration, service_open_count ")
00367 ACE_TEXT ("= %d, status = %d\n"),
00368 service_open_count,
00369 status));
00370 }
00371
00372 if (TAO_debug_level > 2)
00373 {
00374 ACE_DEBUG ((LM_DEBUG,
00375 ACE_TEXT ("TAO (%P|%t) Initializing the ")
00376 ACE_TEXT ("orb-specific services\n")));
00377 }
00378
00379 if (parse_svcconf_args_i (argc, argv, svc_config_argv) == -1)
00380 {
00381 return -1;
00382 }
00383
00384 int svc_config_argc = svc_config_argv.length ();
00385 int status =
00386 open_private_services_i (pcfg,
00387 svc_config_argc,
00388 svc_config_argv.get_buffer (),
00389 skip_service_config_open);
00390
00391 if (status >= 0)
00392 {
00393 return 0;
00394 }
00395
00396 if (TAO_debug_level > 0)
00397 {
00398 ACE_ERROR_RETURN ((LM_DEBUG,
00399 ACE_TEXT ("TAO (%P|%t) Failed to ")
00400 ACE_TEXT ("open orb service configuration\n")),
00401 -1);
00402 }
00403
00404 return -1;
00405 }
00406
00407 int
00408 TAO::ORB::close_services (ACE_Service_Gestalt* pcfg)
00409 {
00410 ACE_MT (ACE_GUARD_RETURN (TAO_SYNCH_RECURSIVE_MUTEX,
00411 guard,
00412 *ACE_Static_Object_Lock::instance (),
00413 -1));
00414 service_open_count--;
00415
00416 return pcfg->close ();
00417 }
00418
00419 void
00420 TAO::ORB::default_svc_conf_entries (char const * rf_args,
00421 char const * ssf_args,
00422 char const * csf_args)
00423 {
00424 resource_factory_args = rf_args;
00425 server_strategy_factory_args = ssf_args;
00426 client_strategy_factory_args = csf_args;
00427 }
00428
00429 TAO_END_VERSIONED_NAMESPACE_DECL
00430
00431
00432 namespace
00433 {
00434
00435
00436 int
00437 open_private_services_i (ACE_Service_Gestalt * pcfg,
00438 int & argc,
00439 ACE_TCHAR ** argv,
00440 bool skip_service_config_open,
00441 bool ignore_default_svc_conf_file)
00442 {
00443
00444 if (skip_service_config_open)
00445 {
00446 return 0;
00447 }
00448
00449 #if defined (TAO_PLATFORM_SVC_CONF_FILE_NOTSUP)
00450 ignore_default_svc_conf_file = true;
00451 #endif
00452
00453 return pcfg->open (argc,
00454 argv,
00455 ACE_DEFAULT_LOGGER_KEY,
00456 0,
00457 ignore_default_svc_conf_file);
00458 }
00459
00460
00461
00462 void
00463 register_global_services_i (ACE_Service_Gestalt * pcfg)
00464 {
00465
00466
00467
00468 if (negotiate_codesets)
00469 {
00470 TAO_Codeset_Manager_Factory_Base *factory =
00471 ACE_Dynamic_Service<TAO_Codeset_Manager_Factory_Base>::instance (
00472 "TAO_Codeset");
00473
00474 if (factory == 0 || factory->is_default ())
00475 {
00476 #if !defined (TAO_AS_STATIC_LIBS)
00477
00478
00479 ACE_Service_Config::process_directive (
00480 ACE_REMOVE_SERVICE_DIRECTIVE ("TAO_Codeset"));
00481
00482 ACE_Service_Config::process_directive (
00483 ACE_DYNAMIC_SERVICE_DIRECTIVE (
00484 "TAO_Codeset",
00485 "TAO_Codeset",
00486 "_make_TAO_Codeset_Manager_Factory",
00487 ""));
00488
00489 factory =
00490 ACE_Dynamic_Service<
00491 TAO_Codeset_Manager_Factory_Base
00492 >::instance ("TAO_Codeset");
00493 #endif
00494 }
00495
00496 if (factory == 0)
00497 {
00498 if (TAO_debug_level > 0)
00499 {
00500 ACE_ERROR ((LM_ERROR,
00501 ACE_TEXT ("(%P|%t) ORB_Core: ")
00502 ACE_TEXT ("Unable to initialize ")
00503 ACE_TEXT ("Codeset Manager\n")));
00504 }
00505 }
00506 }
00507
00508 pcfg->process_directive (
00509 ace_svc_desc_TAO_Default_Resource_Factory);
00510 pcfg->process_directive (
00511 ace_svc_desc_TAO_Default_Client_Strategy_Factory);
00512 pcfg->process_directive (
00513 ace_svc_desc_TAO_Default_Server_Strategy_Factory);
00514
00515
00516
00517
00518
00519
00520
00521
00522
00523
00524
00525 #if defined (TAO_HAS_IIOP) && (TAO_HAS_IIOP != 0)
00526 pcfg->process_directive (ace_svc_desc_TAO_IIOP_Protocol_Factory);
00527 #endif
00528
00529
00530 pcfg->process_directive (ace_svc_desc_TAO_MCAST_Parser);
00531 pcfg->process_directive (ace_svc_desc_TAO_CORBANAME_Parser);
00532 pcfg->process_directive (ace_svc_desc_TAO_CORBALOC_Parser);
00533 pcfg->process_directive (ace_svc_desc_TAO_FILE_Parser);
00534 pcfg->process_directive (ace_svc_desc_TAO_DLL_Parser);
00535 pcfg->process_directive (ace_svc_desc_TAO_Default_Stub_Factory);
00536 pcfg->process_directive (
00537 ace_svc_desc_TAO_Default_Endpoint_Selector_Factory);
00538 pcfg->process_directive (ace_svc_desc_TAO_Default_Protocols_Hooks);
00539 pcfg->process_directive (
00540 ace_svc_desc_TAO_Default_Thread_Lane_Resources_Manager_Factory);
00541 pcfg->process_directive (ace_svc_desc_TAO_Default_Collocation_Resolver);
00542
00543 }
00544
00545 void
00546 register_additional_services_i (ACE_Service_Gestalt * pcfg)
00547 {
00548
00549
00550
00551
00552
00553 if (resource_factory_args != 0)
00554 {
00555 pcfg->process_directive(
00556 ACE_TEXT_CHAR_TO_TCHAR (resource_factory_args));
00557 }
00558
00559 if (client_strategy_factory_args != 0)
00560 {
00561 pcfg->process_directive
00562 (ACE_TEXT_CHAR_TO_TCHAR (client_strategy_factory_args));
00563 }
00564
00565 if (server_strategy_factory_args != 0)
00566 {
00567 pcfg->process_directive
00568 (ACE_TEXT_CHAR_TO_TCHAR (server_strategy_factory_args));
00569 }
00570
00571
00572 ACE_Service_Object *adapter_factory =
00573 ACE_Dynamic_Service<ACE_Service_Object>::instance (
00574 pcfg,
00575 TAO_ORB_Core::poa_factory_name ().c_str ());
00576
00577 if (adapter_factory != 0)
00578 {
00579 adapter_factory->init (0, 0);
00580 }
00581
00582 ACE_Service_Object * const pi_server_loader =
00583 ACE_Dynamic_Service<ACE_Service_Object>::instance (
00584 pcfg,
00585 "PI_Server_Loader");
00586
00587 if (pi_server_loader != 0)
00588 {
00589 pi_server_loader->init (0, 0);
00590 }
00591
00592 ACE_Service_Object * const bidir_loader =
00593 ACE_Dynamic_Service<ACE_Service_Object>::instance (
00594 pcfg,
00595 "BiDirGIOP_Loader");
00596
00597 if (bidir_loader != 0)
00598 {
00599 bidir_loader->init (0, 0);
00600 }
00601
00602 ACE_Service_Object * const messaging_loader =
00603 ACE_Dynamic_Service<ACE_Service_Object>::instance (
00604 pcfg,
00605 "Messaging_Loader");
00606
00607 if (messaging_loader != 0)
00608 {
00609 messaging_loader->init (0, 0);
00610 }
00611
00612
00613
00614
00615 ACE_Service_Object * const rt_loader =
00616 ACE_Dynamic_Service<ACE_Service_Object>::instance (
00617 pcfg,
00618 "RT_ORB_Loader");
00619
00620 if (rt_loader != 0)
00621 {
00622 rt_loader->init (0, 0);
00623 }
00624
00625 ACE_Service_Object * const rtscheduler_loader =
00626 ACE_Dynamic_Service<ACE_Service_Object>::instance (
00627 pcfg,
00628 "RTScheduler_Loader");
00629
00630 if (rtscheduler_loader != 0)
00631 {
00632 rtscheduler_loader->init (0, 0);
00633 }
00634
00635 }
00636
00637 int
00638 parse_svcconf_args_i (int &argc,
00639 char **argv,
00640 CORBA::StringSeq &svc_config_argv)
00641 {
00642
00643
00644 ACE_Arg_Shifter arg_shifter (argc, argv);
00645 CORBA::ULong len = 0;
00646
00647 while (arg_shifter.is_anything_left ())
00648 {
00649 const ACE_TCHAR *current_arg =
00650 arg_shifter.get_the_parameter (ACE_TEXT ("-ORBSvcConf"));
00651
00652 if (0 != current_arg)
00653 {
00654
00655
00656
00657 FILE * const conf_file =
00658 ACE_OS::fopen (current_arg, ACE_TEXT ("r"));
00659
00660 if (0 == conf_file)
00661 {
00662
00663
00664
00665 errno = EINVAL;
00666
00667 ACE_ERROR_RETURN ((LM_ERROR,
00668 ACE_TEXT ("TAO (%P|%t) Service ")
00669 ACE_TEXT ("Configurator ")
00670 ACE_TEXT ("unable to open file %s\n"),
00671 current_arg),
00672 -1);
00673 }
00674 else
00675 {
00676 ACE_OS::fclose (conf_file);
00677 }
00678
00679 len = svc_config_argv.length ();
00680 svc_config_argv.length (len + 2);
00681
00682 svc_config_argv[len] = CORBA::string_dup ("-f");
00683 svc_config_argv[len + 1] =
00684 CORBA::string_dup (ACE_TEXT_ALWAYS_CHAR (current_arg));
00685
00686 arg_shifter.consume_arg ();
00687 }
00688
00689 else
00690 {
00691
00692
00693 arg_shifter.ignore_arg ();
00694 }
00695 }
00696
00697 return 0;
00698 }
00699
00700 int
00701 parse_private_args_i (int &argc,
00702 char **argv,
00703 CORBA::StringSeq &svc_config_argv,
00704 bool & skip_service_config_open)
00705 {
00706
00707
00708 ACE_Arg_Shifter arg_shifter (argc, argv);
00709 CORBA::ULong len = 0;
00710
00711 while (arg_shifter.is_anything_left ())
00712 {
00713 const ACE_TCHAR *current_arg = 0;
00714 int result =
00715 arg_shifter.cur_arg_strncasecmp (
00716 ACE_TEXT ("-ORBSkipServiceConfigOpen"));
00717
00718 if (0 == result)
00719 {
00720 skip_service_config_open = true;
00721
00722 arg_shifter.consume_arg ();
00723 }
00724 else
00725 {
00726 current_arg =
00727 arg_shifter.get_the_parameter (
00728 ACE_TEXT ("-ORBSvcConfDirective"));
00729
00730 if (0 != current_arg)
00731 {
00732 len = svc_config_argv.length ();
00733 svc_config_argv.length (len + 2);
00734
00735
00736
00737
00738
00739 svc_config_argv[len] = CORBA::string_dup ("-S");
00740 svc_config_argv[len + 1] =
00741 CORBA::string_dup (ACE_TEXT_ALWAYS_CHAR (current_arg));
00742
00743 arg_shifter.consume_arg ();
00744 }
00745 else
00746 {
00747 current_arg =
00748 arg_shifter.get_the_parameter (
00749 ACE_TEXT ("-ORBServiceConfigLoggerKey"));
00750
00751 if (0 != current_arg)
00752 {
00753 len = svc_config_argv.length ();
00754 svc_config_argv.length (len + 2);
00755
00756 svc_config_argv[len] = CORBA::string_dup ("-k");
00757 svc_config_argv[len + 1] =
00758 CORBA::string_dup (ACE_TEXT_ALWAYS_CHAR (current_arg));
00759
00760 arg_shifter.consume_arg ();
00761 }
00762
00763
00764 else
00765 {
00766
00767
00768 arg_shifter.ignore_arg ();
00769 }
00770 }
00771 }
00772 }
00773
00774 return 0;
00775 }
00776
00777 int
00778 parse_global_args_i (int &argc,
00779 char **argv,
00780 CORBA::StringSeq &svc_config_argv,
00781 bool apply_values)
00782 {
00783
00784
00785
00786 #if defined (TAO_DEBUG) && !defined (ACE_HAS_WINCE)
00787
00788 if (apply_values)
00789 {
00790 TAO_debug_level = ACE_Env_Value<u_int> ("TAO_ORB_DEBUG", 0);
00791
00792 char * const value = ACE_OS::getenv ("TAO_ORB_DEBUG");
00793
00794 if (value != 0)
00795 {
00796 TAO_debug_level = ACE_OS::atoi (value);
00797
00798 if (TAO_debug_level <= 0)
00799 {
00800 TAO_debug_level = 1;
00801 }
00802
00803 ACE_DEBUG ((LM_DEBUG,
00804 ACE_TEXT ("TAO_debug_level == %d\n"),
00805 TAO_debug_level));
00806 }
00807 }
00808 #endif
00809
00810
00811
00812
00813 ACE_Arg_Shifter arg_shifter (argc, argv);
00814 CORBA::ULong len = 0;
00815
00816 while (arg_shifter.is_anything_left ())
00817 {
00818 const ACE_TCHAR *current_arg = 0;
00819 int strcmp_result =
00820 arg_shifter.cur_arg_strncasecmp (ACE_TEXT ("-ORBDebug"));
00821
00822 if (0 == strcmp_result)
00823 {
00824 if (apply_values)
00825 {
00826
00827
00828 ACE::debug (1);
00829 }
00830
00831 arg_shifter.consume_arg ();
00832 }
00833 else
00834 {
00835 current_arg =
00836 arg_shifter.get_the_parameter (
00837 ACE_TEXT ("-ORBNegotiateCodesets"));
00838
00839 if (0 != current_arg)
00840 {
00841 if (apply_values)
00842 {
00843
00844 negotiate_codesets = (ACE_OS::atoi (current_arg));
00845 }
00846 }
00847 else
00848 {
00849 current_arg =
00850 arg_shifter.get_the_parameter (
00851 ACE_TEXT ("-ORBDebugLevel"));
00852
00853 if (0 != current_arg)
00854 {
00855 if (apply_values)
00856 {
00857 TAO_debug_level =
00858 ACE_OS::atoi (current_arg);
00859 }
00860
00861 arg_shifter.consume_arg ();
00862 }
00863 else
00864 {
00865 strcmp_result =
00866 arg_shifter.cur_arg_strncasecmp (
00867 ACE_TEXT ("-ORBDaemon"));
00868
00869 if (0 == strcmp_result)
00870 {
00871
00872 if (apply_values)
00873 {
00874 len = svc_config_argv.length ();
00875 svc_config_argv.length (len + 1);
00876
00877 svc_config_argv[len] =
00878 CORBA::string_dup ("-b");
00879 }
00880
00881 arg_shifter.consume_arg ();
00882 }
00883
00884
00885 else
00886 {
00887
00888
00889 arg_shifter.ignore_arg ();
00890 }
00891 }
00892 }
00893 }
00894 }
00895
00896 return 0;
00897 }
00898 }