diff options
author | bala <balanatarajan@users.noreply.github.com> | 2003-06-08 15:38:57 +0000 |
---|---|---|
committer | bala <balanatarajan@users.noreply.github.com> | 2003-06-08 15:38:57 +0000 |
commit | 48db2d88c6cd44567f353c1b412a9d91d1dacdbb (patch) | |
tree | e88f35a11e8c3c653e030143e0f0520c6390427f | |
parent | 96f50a94900c0bd24aad72f69eaf411bbf1cbda3 (diff) | |
download | ATCD-48db2d88c6cd44567f353c1b412a9d91d1dacdbb.tar.gz |
ChangeLogTag:Sun Jun 8 10:10:36 2003 Balachandran Natarajan <bala@dre.vanderbilt.edu>
-rw-r--r-- | TAO/ChangeLog | 5 | ||||
-rw-r--r-- | TAO/tao/ORB_Core.cpp | 23 |
2 files changed, 20 insertions, 8 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index 62b0bdc6404..8f9082b6a42 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,8 @@ +Sun Jun 8 10:10:36 2003 Balachandran Natarajan <bala@dre.vanderbilt.edu> + + * tao/ORB_Core.cpp (get_protocols_hooks): Fixed a small problem in + logic that lead to crashes in the daily builds. + Sun Jun 8 10:20:47 2003 Jeff Parsons <j.parsons@vanderbilt.edu> * orbsvcs/orbsvcs/IFRServiceComponentContainer_i.cpp: diff --git a/TAO/tao/ORB_Core.cpp b/TAO/tao/ORB_Core.cpp index fcb8351f91e..1a931b75765 100644 --- a/TAO/tao/ORB_Core.cpp +++ b/TAO/tao/ORB_Core.cpp @@ -1033,8 +1033,13 @@ TAO_ORB_Core::init (int &argc, char *argv[] ACE_ENV_ARG_DECL) this->get_protocols_hooks (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (-1); - int status = tph->set_default_policies (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + int status = 0; + + if (tph) + { + status = tph->set_default_policies (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK_RETURN (-1); + } if (status != 0) ACE_THROW_RETURN (CORBA::INITIALIZE ( @@ -1044,7 +1049,6 @@ TAO_ORB_Core::init (int &argc, char *argv[] ACE_ENV_ARG_DECL) CORBA::COMPLETED_NO), -1); - // Look for BiDirectional library here. If the user has svc.conf // file, load the library at this point. int ret = this->bidirectional_giop_init (ACE_ENV_SINGLE_ARG_PARAMETER); @@ -1337,7 +1341,7 @@ TAO_Protocols_Hooks * TAO_ORB_Core::get_protocols_hooks (ACE_ENV_SINGLE_ARG_DECL) { // Check if there is a cached reference. - if (this->protocols_hooks_ != 0 && + if (this->protocols_hooks_ == 0 && this->protocols_hooks_checked_ == false) { // We need synchronization here since this is called in the @@ -1353,10 +1357,13 @@ TAO_ORB_Core::get_protocols_hooks (ACE_ENV_SINGLE_ARG_DECL) ACE_Dynamic_Service<TAO_Protocols_Hooks>::instance (TAO_ORB_Core_Static_Resources::instance ()->protocols_hooks_name_.c_str()); - // Initialize the protocols hooks instance. - this->protocols_hooks_->init_hooks (this - ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (0); + if (this->protocols_hooks_) + { + // Initialize the protocols hooks instance. + this->protocols_hooks_->init_hooks (this + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN (0); + } this->protocols_hooks_checked_ = true; } |