summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOssama Othman <ossama-othman@users.noreply.github.com>2000-08-06 21:18:33 +0000
committerOssama Othman <ossama-othman@users.noreply.github.com>2000-08-06 21:18:33 +0000
commit6e5047e7f46d7b53d3de885c0c2649e659c79c8a (patch)
treea86d8ac6ddaa072cc74bf77fff136567d3595034
parent4aac0dc52a6821c3c3d0fb8ac3d49723792cdadf (diff)
downloadATCD-6e5047e7f46d7b53d3de885c0c2649e659c79c8a.tar.gz
ChangeLogTag:Sun Aug 06 17:14:52 2000 Ossama Othman <ossama@uci.edu>
-rw-r--r--TAO/ChangeLogs/ChangeLog-02a8
-rw-r--r--TAO/tao/ORB.cpp15
2 files changed, 16 insertions, 7 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a
index 24d63084bcd..76cceb9fdd2 100644
--- a/TAO/ChangeLogs/ChangeLog-02a
+++ b/TAO/ChangeLogs/ChangeLog-02a
@@ -1,3 +1,11 @@
+Sun Aug 06 17:14:52 2000 Ossama Othman <ossama@uci.edu>
+
+ * tao/ORB.cpp (ORB_init, init_orb_globals):
+
+ Placed ORB initialization count back in
+ CORBA::ORB::init_orb_globals() since the count variable is
+ private within the context of CORBA::ORB_init().
+
Sun Aug 06 17:01:53 2000 Ossama Othman <ossama@uci.edu>
* tao/TAO_Static.dsp:
diff --git a/TAO/tao/ORB.cpp b/TAO/tao/ORB.cpp
index 7bbdac0ade0..1fa8deec50e 100644
--- a/TAO/tao/ORB.cpp
+++ b/TAO/tao/ORB.cpp
@@ -1274,6 +1274,12 @@ CORBA_ORB::init_orb_globals (CORBA::Environment &ACE_TRY_ENV)
// This method should be invoked atomically. It is the caller's
// responsibility to ensure that this condition is satisfied.
+ // Prevent multiple initializations.
+ if (CORBA::ORB::orb_init_count_ != 0)
+ return;
+ else
+ CORBA::ORB::orb_init_count_++;
+
#if defined(ACE_HAS_EXCEPTIONS)
set_unexpected (CORBA_ORB::_tao_unexpected_exception);
#endif /* ACE_HAS_EXCEPTIONS */
@@ -1358,13 +1364,8 @@ CORBA::ORB_init (int &argc,
if (TAO_Singleton_Manager::instance ()->init () == -1)
return CORBA::ORB::_nil ();
- if (CORBA::ORB::orb_init_count_ == 0)
- {
- CORBA_ORB::init_orb_globals (ACE_TRY_ENV);
- ACE_CHECK_RETURN (CORBA::ORB::_nil ());
-
- CORBA::ORB::orb_init_count_++;
- }
+ CORBA_ORB::init_orb_globals (ACE_TRY_ENV);
+ ACE_CHECK_RETURN (CORBA::ORB::_nil ());
// Make sure the following is done after the global ORB
// initialization since we need to have exceptions initialized.