From 66e6099ec237652a3d9a9071d45c5f6cba091aac Mon Sep 17 00:00:00 2001 From: crodrigu Date: Sun, 11 Nov 2001 16:17:58 +0000 Subject: ChangeLogTag: Sun Nov 11 11:02:23 2001 Craig Rodrigues --- TAO/ChangeLogs/ChangeLog-02a | 27 ++++++++++++++++++++++ TAO/orbsvcs/ImplRepo_Service/Options.cpp | 4 ++-- TAO/orbsvcs/ImplRepo_Service/Options.h | 4 ++-- TAO/orbsvcs/Notify_Service/Notify_Service.cpp | 2 +- .../orbsvcs/CosEvent/CEC_Default_Factory.cpp | 5 +++- TAO/orbsvcs/orbsvcs/Event/EC_Default_Factory.cpp | 4 +++- TAO/orbsvcs/tests/CosEvent/Basic/Random.cpp | 8 +++---- TAO/orbsvcs/tests/Event/Basic/BCast.cpp | 2 +- TAO/orbsvcs/tests/Event/Basic/Observer.cpp | 2 +- TAO/orbsvcs/tests/Event/Basic/Random.cpp | 8 +++---- TAO/orbsvcs/tests/Event/Performance/Connect.cpp | 4 ++-- TAO/orbsvcs/tests/Event/Performance/Inversion.cpp | 2 +- TAO/orbsvcs/tests/Event/lib/Driver.cpp | 2 +- .../tests/Notify/Basic/AdminProperties_Test.cpp | 2 +- .../tests/Notify/Basic/ConnectDisconnect.cpp | 2 +- TAO/orbsvcs/tests/Notify/Basic/Events_Test.cpp | 2 +- TAO/orbsvcs/tests/Notify/Basic/IdAssignment.cpp | 2 +- TAO/orbsvcs/tests/Notify/Basic/LifeCycleTest.cpp | 2 +- TAO/orbsvcs/tests/Notify/Basic/Simple.cpp | 2 +- TAO/orbsvcs/tests/Notify/Basic/Updates.cpp | 2 +- .../performance-tests/RedGreen/RedGreen_Test.cpp | 2 +- .../performance-tests/Throughput/Throughput.cpp | 2 +- TAO/orbsvcs/tests/Trading/TT_Info.cpp | 4 ++-- TAO/tests/Exposed_Policies/Policy_Verifier.cpp | 2 +- 24 files changed, 65 insertions(+), 33 deletions(-) diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a index cfc5d303239..2083a1ea84e 100644 --- a/TAO/ChangeLogs/ChangeLog-02a +++ b/TAO/ChangeLogs/ChangeLog-02a @@ -1,3 +1,30 @@ +Sun Nov 11 11:02:23 2001 Craig Rodrigues + + * orbsvcs/orbsvcs/CosEvent/CEC_Default_Factory.cpp: + * orbsvcs/orbsvcs/Event/EC_Default_Factory.cpp: + * tests/Exposed_Policies/Policy_Verifier.cpp: + * orbsvcs/Notify_Service/Notify_Service.cpp: + * orbsvcs/ImplRepo_Service/Options.h: + * orbsvcs/ImplRepo_Service/Options.cpp: + * orbsvcs/tests/Event/lib: + * orbsvcs/tests/Event/Basic/Observer.cpp: + * orbsvcs/tests/Event/Basic/BCast.cpp: + * orbsvcs/tests/Event/Basic/Random.cpp: + * orbsvcs/tests/Event/Performance/Connect.cpp: + * orbsvcs/tests/Event/Performance/Inversion.cpp: + * orbsvcs/tests/CosEvent/Basic/Random.cpp: + * orbsvcs/tests/Trading/TT_Info.cpp: + * orbsvcs/tests/Notify/Basic/LifeCycleTest.cpp: + * orbsvcs/tests/Notify/Basic/ConnectDisconnect.cpp: + * orbsvcs/tests/Notify/Basic/IdAssignment.cpp: + * orbsvcs/tests/Notify/Basic/Events_Test.cpp: + * orbsvcs/tests/Notify/Basic/AdminProperties_Test.cpp: + * orbsvcs/tests/Notify/Basic/Simple.cpp: + * orbsvcs/tests/Notify/Basic/Updates.cpp: + * orbsvcs/tests/Notify/performance-tests/RedGreen/RedGreen_Test.cpp: + * orbsvcs/tests/Notify/performance-tests/Throughput/Throughput.cpp: + More const char * fixes. + Sat Nov 10 23:13:37 2001 Ossama Othman * orbsvcs/tests/Security/Secure_Invocation/run_test.pl: diff --git a/TAO/orbsvcs/ImplRepo_Service/Options.cpp b/TAO/orbsvcs/ImplRepo_Service/Options.cpp index ddb1f17324c..3554299ae63 100644 --- a/TAO/orbsvcs/ImplRepo_Service/Options.cpp +++ b/TAO/orbsvcs/ImplRepo_Service/Options.cpp @@ -317,7 +317,7 @@ Options::print_usage (void) const * @retval -1 Failure */ int -Options::initialize_file_persistence (ACE_TCHAR *filename) +Options::initialize_file_persistence (const ACE_TCHAR *filename) { if (this->config_ != 0) { @@ -424,7 +424,7 @@ Options::initialize_non_persistence (void) * @todo Update to unicode */ int -Options::run_service_command (ACE_TCHAR *command) +Options::run_service_command (const ACE_TCHAR *command) { #if defined (ACE_WIN32) SERVICE::instance ()->name (IMR_SERVICE_NAME, IMR_DISPLAY_NAME); diff --git a/TAO/orbsvcs/ImplRepo_Service/Options.h b/TAO/orbsvcs/ImplRepo_Service/Options.h index 01dcec2d7c6..b4565636b38 100644 --- a/TAO/orbsvcs/ImplRepo_Service/Options.h +++ b/TAO/orbsvcs/ImplRepo_Service/Options.h @@ -76,7 +76,7 @@ private: void print_usage (void) const; /// Initialize file persistence. - int initialize_file_persistence (ACE_TCHAR *filename); + int initialize_file_persistence (const ACE_TCHAR *filename); /// Initialize Registry persistence. int initialize_registry_persistence (void); @@ -85,7 +85,7 @@ private: int initialize_non_persistence (void); /// Run a service command. - int run_service_command (ACE_TCHAR *command); + int run_service_command (const ACE_TCHAR *command); /// Loads ORB options from the registry int load_registry_options (ACE_ARGV &orb_options); diff --git a/TAO/orbsvcs/Notify_Service/Notify_Service.cpp b/TAO/orbsvcs/Notify_Service/Notify_Service.cpp index 1c62ffdc3bf..b6d7d999dd6 100644 --- a/TAO/orbsvcs/Notify_Service/Notify_Service.cpp +++ b/TAO/orbsvcs/Notify_Service/Notify_Service.cpp @@ -297,7 +297,7 @@ Notify_Service::parse_args (int argc, char *argv[]) { ACE_Arg_Shifter arg_shifter (argc, argv); - char *current_arg = 0; + const char *current_arg = 0; while (arg_shifter.is_anything_left ()) { if ((current_arg = arg_shifter.get_the_parameter ("-Factory"))) diff --git a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_Default_Factory.cpp b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_Default_Factory.cpp index 9ec5f5b75ac..534244a0800 100644 --- a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_Default_Factory.cpp +++ b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_Default_Factory.cpp @@ -148,9 +148,12 @@ TAO_CEC_Default_Factory::init (int argc, char* argv[]) if (arg_shifter.is_parameter_next ()) { - const char* opt = arg_shifter.get_current (); + const char *current_arg = arg_shifter.get_current(); + char* opt = ACE_OS::strdup(current_arg); this->supplier_collection_ = this->parse_collection_arg (opt); + + ACE_OS::free(opt); arg_shifter.consume_arg (); } } diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Default_Factory.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Default_Factory.cpp index 6c8c0dd4902..cc4d0ee876b 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_Default_Factory.cpp +++ b/TAO/orbsvcs/orbsvcs/Event/EC_Default_Factory.cpp @@ -246,7 +246,8 @@ TAO_EC_Default_Factory::init (int argc, char* argv[]) if (arg_shifter.is_parameter_next ()) { - const char* opt = arg_shifter.get_current (); + const char *current_arg = arg_shifter.get_current(); + char* opt = ACE_OS::strdup(current_arg); int collection_type = 0; int synch_type = 0; int iteration_type = 0; @@ -278,6 +279,7 @@ TAO_EC_Default_Factory::init (int argc, char* argv[]) "unknown collection modifier <%s>\n", arg)); } + ACE_OS::free(opt); this->supplier_collection_ = (synch_type << 8) | (collection_type << 4) | iteration_type; arg_shifter.consume_arg (); diff --git a/TAO/orbsvcs/tests/CosEvent/Basic/Random.cpp b/TAO/orbsvcs/tests/CosEvent/Basic/Random.cpp index 661e634b344..eded9b188bf 100644 --- a/TAO/orbsvcs/tests/CosEvent/Basic/Random.cpp +++ b/TAO/orbsvcs/tests/CosEvent/Basic/Random.cpp @@ -55,7 +55,7 @@ RND_Driver::run (int argc, char *argv[]) while (arg_shifter.is_anything_left ()) { - char *arg = arg_shifter.get_current (); + const char *arg = arg_shifter.get_current (); if (ACE_OS::strcasecmp (arg, "-suppliers") == 0) { @@ -63,7 +63,7 @@ RND_Driver::run (int argc, char *argv[]) if (arg_shifter.is_parameter_next ()) { - char* opt = arg_shifter.get_current (); + const char* opt = arg_shifter.get_current (); int n = ACE_OS::atoi (opt); if (n >= 1) this->nsuppliers_ = n; @@ -76,7 +76,7 @@ RND_Driver::run (int argc, char *argv[]) if (arg_shifter.is_parameter_next ()) { - char* opt = arg_shifter.get_current (); + const char* opt = arg_shifter.get_current (); int n = ACE_OS::atoi (opt); if (n >= 1) this->nconsumers_ = n; @@ -89,7 +89,7 @@ RND_Driver::run (int argc, char *argv[]) if (arg_shifter.is_parameter_next ()) { - char* opt = arg_shifter.get_current (); + const char* opt = arg_shifter.get_current (); int n = ACE_OS::atoi (opt); if (n >= 0) this->max_recursion_ = n; diff --git a/TAO/orbsvcs/tests/Event/Basic/BCast.cpp b/TAO/orbsvcs/tests/Event/Basic/BCast.cpp index 7d922724794..8d723e09ebe 100644 --- a/TAO/orbsvcs/tests/Event/Basic/BCast.cpp +++ b/TAO/orbsvcs/tests/Event/Basic/BCast.cpp @@ -35,7 +35,7 @@ EC_BCast::parse_args (int& argc, char* argv[]) while (arg_shifter.is_anything_left ()) { - char *arg = arg_shifter.get_current (); + const char *arg = arg_shifter.get_current (); if (ACE_OS::strcmp (arg, "-port") == 0) { diff --git a/TAO/orbsvcs/tests/Event/Basic/Observer.cpp b/TAO/orbsvcs/tests/Event/Basic/Observer.cpp index 5e8dc9b7e37..3a53241333a 100644 --- a/TAO/orbsvcs/tests/Event/Basic/Observer.cpp +++ b/TAO/orbsvcs/tests/Event/Basic/Observer.cpp @@ -196,7 +196,7 @@ EC_Master::parse_args (int &argc, char *argv []) while (arg_shifter.is_anything_left ()) { - char *arg = arg_shifter.get_current (); + const char *arg = arg_shifter.get_current (); if (ACE_OS::strcmp (arg, "-channels") == 0) { diff --git a/TAO/orbsvcs/tests/Event/Basic/Random.cpp b/TAO/orbsvcs/tests/Event/Basic/Random.cpp index e62436746f8..942b3a23fc6 100644 --- a/TAO/orbsvcs/tests/Event/Basic/Random.cpp +++ b/TAO/orbsvcs/tests/Event/Basic/Random.cpp @@ -62,7 +62,7 @@ RND_Driver::run (int argc, char *argv[]) while (arg_shifter.is_anything_left ()) { - char *arg = arg_shifter.get_current (); + const char *arg = arg_shifter.get_current (); if (ACE_OS::strcasecmp (arg, "-suppliers") == 0) { @@ -70,7 +70,7 @@ RND_Driver::run (int argc, char *argv[]) if (arg_shifter.is_parameter_next ()) { - char* opt = arg_shifter.get_current (); + const char* opt = arg_shifter.get_current (); int n = ACE_OS::atoi (opt); if (n >= 1) this->nsuppliers_ = n; @@ -83,7 +83,7 @@ RND_Driver::run (int argc, char *argv[]) if (arg_shifter.is_parameter_next ()) { - char* opt = arg_shifter.get_current (); + const char* opt = arg_shifter.get_current (); int n = ACE_OS::atoi (opt); if (n >= 1) this->nconsumers_ = n; @@ -96,7 +96,7 @@ RND_Driver::run (int argc, char *argv[]) if (arg_shifter.is_parameter_next ()) { - char* opt = arg_shifter.get_current (); + const char* opt = arg_shifter.get_current (); int n = ACE_OS::atoi (opt); if (n >= 0) this->max_recursion_ = n; diff --git a/TAO/orbsvcs/tests/Event/Performance/Connect.cpp b/TAO/orbsvcs/tests/Event/Performance/Connect.cpp index d9cba9424f4..351dcdbc917 100644 --- a/TAO/orbsvcs/tests/Event/Performance/Connect.cpp +++ b/TAO/orbsvcs/tests/Event/Performance/Connect.cpp @@ -39,7 +39,7 @@ EC_Connect::parse_args (int& argc, char* argv[]) while (arg_shifter.is_anything_left ()) { - char *arg = arg_shifter.get_current (); + const char *arg = arg_shifter.get_current (); if (ACE_OS::strcmp (arg, "-connection_order") == 0) { @@ -47,7 +47,7 @@ EC_Connect::parse_args (int& argc, char* argv[]) if (arg_shifter.is_parameter_next ()) { - char* opt = arg_shifter.get_current (); + const char* opt = arg_shifter.get_current (); if (ACE_OS::strcasecmp (opt, "consumers") == 0) this->order_ = 0; else if (ACE_OS::strcasecmp (opt, "suppliers") == 0) diff --git a/TAO/orbsvcs/tests/Event/Performance/Inversion.cpp b/TAO/orbsvcs/tests/Event/Performance/Inversion.cpp index d43a17b0895..cb9d8629241 100644 --- a/TAO/orbsvcs/tests/Event/Performance/Inversion.cpp +++ b/TAO/orbsvcs/tests/Event/Performance/Inversion.cpp @@ -31,7 +31,7 @@ EC_Inversion::parse_args (int &argc, char *argv []) while (arg_shifter.is_anything_left ()) { - char *arg = arg_shifter.get_current (); + const char *arg = arg_shifter.get_current (); if (ACE_OS::strcmp (arg, "-same_events") == 0) { diff --git a/TAO/orbsvcs/tests/Event/lib/Driver.cpp b/TAO/orbsvcs/tests/Event/lib/Driver.cpp index d68381cc654..06644290629 100644 --- a/TAO/orbsvcs/tests/Event/lib/Driver.cpp +++ b/TAO/orbsvcs/tests/Event/lib/Driver.cpp @@ -816,7 +816,7 @@ EC_Driver::parse_args (int &argc, char *argv []) while (arg_shifter.is_anything_left ()) { - char *arg = arg_shifter.get_current (); + const char *arg = arg_shifter.get_current (); if (ACE_OS::strcmp (arg, "-verbose") == 0) { diff --git a/TAO/orbsvcs/tests/Notify/Basic/AdminProperties_Test.cpp b/TAO/orbsvcs/tests/Notify/Basic/AdminProperties_Test.cpp index 6ec52be8691..2c9446e889d 100644 --- a/TAO/orbsvcs/tests/Notify/Basic/AdminProperties_Test.cpp +++ b/TAO/orbsvcs/tests/Notify/Basic/AdminProperties_Test.cpp @@ -26,7 +26,7 @@ AdminProperties_Test::parse_args(int argc, char *argv[]) { ACE_Arg_Shifter arg_shifter (argc, argv); - char *current_arg = 0; + const char *current_arg = 0; while (arg_shifter.is_anything_left ()) { if ((current_arg = arg_shifter.get_the_parameter ("-max_queue_length"))) diff --git a/TAO/orbsvcs/tests/Notify/Basic/ConnectDisconnect.cpp b/TAO/orbsvcs/tests/Notify/Basic/ConnectDisconnect.cpp index 5205383b411..d2dbf62a7db 100644 --- a/TAO/orbsvcs/tests/Notify/Basic/ConnectDisconnect.cpp +++ b/TAO/orbsvcs/tests/Notify/Basic/ConnectDisconnect.cpp @@ -115,7 +115,7 @@ ConnectDisconnect::parse_args(int argc, char *argv[]) { ACE_Arg_Shifter arg_shifter (argc, argv); - char *current_arg = 0; + const char *current_arg = 0; while (arg_shifter.is_anything_left ()) { if ((current_arg = arg_shifter.get_the_parameter ("-count"))) diff --git a/TAO/orbsvcs/tests/Notify/Basic/Events_Test.cpp b/TAO/orbsvcs/tests/Notify/Basic/Events_Test.cpp index 4382caa1a48..09c7187dc62 100644 --- a/TAO/orbsvcs/tests/Notify/Basic/Events_Test.cpp +++ b/TAO/orbsvcs/tests/Notify/Basic/Events_Test.cpp @@ -112,7 +112,7 @@ Events_Test::parse_args(int argc, char *argv[]) { ACE_Arg_Shifter arg_shifter (argc, argv); - char *current_arg = 0; + const char *current_arg = 0; while (arg_shifter.is_anything_left ()) { if ((current_arg = arg_shifter.get_the_parameter ("-events"))) diff --git a/TAO/orbsvcs/tests/Notify/Basic/IdAssignment.cpp b/TAO/orbsvcs/tests/Notify/Basic/IdAssignment.cpp index 20169c5fd08..930b704b64a 100644 --- a/TAO/orbsvcs/tests/Notify/Basic/IdAssignment.cpp +++ b/TAO/orbsvcs/tests/Notify/Basic/IdAssignment.cpp @@ -25,7 +25,7 @@ IdAssignment::parse_args(int argc, char *argv[]) { ACE_Arg_Shifter arg_shifter (argc, argv); - char *current_arg = 0; + const char *current_arg = 0; while (arg_shifter.is_anything_left ()) { if ((current_arg = arg_shifter.get_the_parameter ("-iter"))) diff --git a/TAO/orbsvcs/tests/Notify/Basic/LifeCycleTest.cpp b/TAO/orbsvcs/tests/Notify/Basic/LifeCycleTest.cpp index ecfa0aa81d6..48926181bba 100644 --- a/TAO/orbsvcs/tests/Notify/Basic/LifeCycleTest.cpp +++ b/TAO/orbsvcs/tests/Notify/Basic/LifeCycleTest.cpp @@ -24,7 +24,7 @@ LifeCycleTest::parse_args(int argc, char *argv[]) { ACE_Arg_Shifter arg_shifter (argc, argv); - char *current_arg = 0; + const char *current_arg = 0; while (arg_shifter.is_anything_left ()) { if ((current_arg = arg_shifter.get_the_parameter ("-count"))) diff --git a/TAO/orbsvcs/tests/Notify/Basic/Simple.cpp b/TAO/orbsvcs/tests/Notify/Basic/Simple.cpp index 6e5a3cccc79..bc5a9d903ea 100644 --- a/TAO/orbsvcs/tests/Notify/Basic/Simple.cpp +++ b/TAO/orbsvcs/tests/Notify/Basic/Simple.cpp @@ -112,7 +112,7 @@ Simple_Test::parse_args(int argc, char *argv[]) { ACE_Arg_Shifter arg_shifter (argc, argv); - char *current_arg = 0; + const char *current_arg = 0; while (arg_shifter.is_anything_left ()) { if ((current_arg = arg_shifter.get_the_parameter ("-events"))) diff --git a/TAO/orbsvcs/tests/Notify/Basic/Updates.cpp b/TAO/orbsvcs/tests/Notify/Basic/Updates.cpp index c0531942005..f375cbc5464 100644 --- a/TAO/orbsvcs/tests/Notify/Basic/Updates.cpp +++ b/TAO/orbsvcs/tests/Notify/Basic/Updates.cpp @@ -131,7 +131,7 @@ Updates::parse_args(int argc, char *argv[]) { ACE_Arg_Shifter arg_shifter (argc, argv); - char *current_arg = 0; + const char *current_arg = 0; while (arg_shifter.is_anything_left ()) { if ((current_arg = arg_shifter.get_the_parameter ("-updates"))) diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/RedGreen_Test.cpp b/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/RedGreen_Test.cpp index 9639e2df92e..4407eed9915 100644 --- a/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/RedGreen_Test.cpp +++ b/TAO/orbsvcs/tests/Notify/performance-tests/RedGreen/RedGreen_Test.cpp @@ -26,7 +26,7 @@ RedGreen_Test::parse_args(int argc, char *argv[]) { ACE_Arg_Shifter arg_shifter (argc, argv); - char *current_arg = 0; + const char *current_arg = 0; while (arg_shifter.is_anything_left ()) { if ((current_arg = arg_shifter.get_the_parameter ("-burst_size"))) diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/Throughput/Throughput.cpp b/TAO/orbsvcs/tests/Notify/performance-tests/Throughput/Throughput.cpp index aa9240f2cc5..42acc73fe89 100644 --- a/TAO/orbsvcs/tests/Notify/performance-tests/Throughput/Throughput.cpp +++ b/TAO/orbsvcs/tests/Notify/performance-tests/Throughput/Throughput.cpp @@ -283,7 +283,7 @@ Notify_Throughput::parse_args(int argc, char *argv[]) { ACE_Arg_Shifter arg_shifter (argc, argv); - char *current_arg = 0; + const char *current_arg = 0; while (arg_shifter.is_anything_left ()) { if (arg_shifter.cur_arg_strncasecmp ("-colocated_ec") == 0) diff --git a/TAO/orbsvcs/tests/Trading/TT_Info.cpp b/TAO/orbsvcs/tests/Trading/TT_Info.cpp index 5429f5dd272..06d39cb1576 100644 --- a/TAO/orbsvcs/tests/Trading/TT_Info.cpp +++ b/TAO/orbsvcs/tests/Trading/TT_Info.cpp @@ -274,7 +274,7 @@ TT_Parse_Args::TT_Parse_Args (int& argc, char** argv) while (arg_shifter.is_anything_left ()) { - char *current_arg = arg_shifter.get_current (); + const char *current_arg = arg_shifter.get_current (); if (ACE_OS::strcmp (current_arg, "-f") == 0 || ACE_OS::strcmp (current_arg, "-federate") == 0) @@ -296,7 +296,7 @@ TT_Parse_Args::TT_Parse_Args (int& argc, char** argv) if (arg_shifter.is_parameter_next ()) { - char* file_name = arg_shifter.get_current (); + const char* file_name = arg_shifter.get_current (); ior_file = ACE_OS::fopen (file_name, "r"); if (ior_file == 0) diff --git a/TAO/tests/Exposed_Policies/Policy_Verifier.cpp b/TAO/tests/Exposed_Policies/Policy_Verifier.cpp index 4563dfaa62a..9ef23562029 100644 --- a/TAO/tests/Exposed_Policies/Policy_Verifier.cpp +++ b/TAO/tests/Exposed_Policies/Policy_Verifier.cpp @@ -29,7 +29,7 @@ Policy_Verifier::init (int argc, while (arg_shifter.is_anything_left ()) { - char *arg; + const char *arg = 0; // IOR File Name Option. if ((arg = arg_shifter.get_the_parameter ("-POAConfigFile"))) { -- cgit v1.2.1