summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOssama Othman <ossama-othman@users.noreply.github.com>1999-05-24 03:22:03 +0000
committerOssama Othman <ossama-othman@users.noreply.github.com>1999-05-24 03:22:03 +0000
commit74f90b33bdc560f876ba2b7fd20fcdf2dd0d0fe8 (patch)
tree43f0f22b7209222e00114011741a102ea52d30c7
parenta1450f848d49bf3795783d7e760926af67e0afbe (diff)
downloadATCD-74f90b33bdc560f876ba2b7fd20fcdf2dd0d0fe8.tar.gz
segfault fixes in endpoint parser
iiop appears to work
-rw-r--r--TAO/tao/Makefile4
-rw-r--r--TAO/tao/ORB_Core.cpp17
-rw-r--r--TAO/tao/params.cpp2
3 files changed, 16 insertions, 7 deletions
diff --git a/TAO/tao/Makefile b/TAO/tao/Makefile
index e1b1a9c12f7..7a4781ba668 100644
--- a/TAO/tao/Makefile
+++ b/TAO/tao/Makefile
@@ -3867,6 +3867,8 @@ realclean:
$(TAO_ROOT)/tao/Sequence.i \
$(TAO_ROOT)/tao/Object_KeyC.i \
$(TAO_ROOT)/tao/IIOP_Profile.i \
+ $(TAO_ROOT)/tao/MProfile.h \
+ $(TAO_ROOT)/tao/MProfile.i \
$(TAO_ROOT)/tao/ORB_Core.h \
$(TAO_ROOT)/tao/Environment.h \
$(TAO_ROOT)/tao/Environment.i \
@@ -4963,6 +4965,8 @@ realclean:
$(TAO_ROOT)/tao/Sequence.i \
$(TAO_ROOT)/tao/Object_KeyC.i \
$(TAO_ROOT)/tao/UIOP_Profile.i \
+ $(TAO_ROOT)/tao/MProfile.h \
+ $(TAO_ROOT)/tao/MProfile.i \
$(TAO_ROOT)/tao/ORB_Core.h \
$(TAO_ROOT)/tao/Environment.h \
$(TAO_ROOT)/tao/Environment.i \
diff --git a/TAO/tao/ORB_Core.cpp b/TAO/tao/ORB_Core.cpp
index f84686ca3c5..8b0844b3262 100644
--- a/TAO/tao/ORB_Core.cpp
+++ b/TAO/tao/ORB_Core.cpp
@@ -115,6 +115,13 @@ TAO_ORB_Core::init (int &argc, char *argv[])
argv0 = argv[0];
svc_config_argv[svc_config_argc++] = CORBA::string_dup (argv0);
+ // Initialize the container for the ORB parameters.
+ // orb_params_ must be initialized before the command line parsing loop
+ // since some of the parsing code expects it to have been already
+ // initialized.
+ if (this->orb_params_ == 0)
+ ACE_NEW_RETURN (this->orb_params_, TAO_ORB_Parameters, 0);
+
// @@ This should be an IIOP default, more generally each
// loaded protocol should have it's own default defined by the
// implemention. This is currently defined to be a zero, fredk
@@ -254,7 +261,9 @@ TAO_ORB_Core::init (int &argc, char *argv[])
if (arg_shifter.is_parameter_next())
{
- this->orb_params ()->endpoints ((arg_shifter.get_current ()));
+ ACE_CString endpts (arg_shifter.get_current ());
+
+ this->orb_params ()->endpoints (endpts);
arg_shifter.consume_arg ();
}
}
@@ -491,7 +500,7 @@ TAO_ORB_Core::init (int &argc, char *argv[])
ACE_CString p;
- if (ACE_OS::strstr ("://", preconnections) == 0)
+ if (ACE_OS::strstr (preconnections, "://") == 0)
{
// Handle old style preconnects for backward compatibility
@@ -669,10 +678,6 @@ TAO_ORB_Core::init (int &argc, char *argv[])
//this->leader_follower_lock_ptr_ = this->client_factory ()
// ->create_leader_follower_lock ();
- // Initialize the container for the ORB parameters.
- if (this->orb_params_ == 0)
- ACE_NEW_RETURN (this->orb_params_, TAO_ORB_Parameters, 0);
-
// Set all kinds of orb parameters whose setting needed to be
// deferred until after the service config entries had been
// determined.
diff --git a/TAO/tao/params.cpp b/TAO/tao/params.cpp
index bda3677d7f9..b4406777aa8 100644
--- a/TAO/tao/params.cpp
+++ b/TAO/tao/params.cpp
@@ -65,7 +65,7 @@ TAO_ORB_Parameters::parse_endpoints (ACE_CString &endpoints,
int begin = 0;
int end = endpoints.find (endpoints_delimiter);
- for (int i = 1; i < endpoints_count; ++i)
+ for (int i = 0; i < endpoints_count; ++i)
{
if (end == 0)
{