summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOssama Othman <ossama-othman@users.noreply.github.com>2002-02-06 22:17:23 +0000
committerOssama Othman <ossama-othman@users.noreply.github.com>2002-02-06 22:17:23 +0000
commit9b1becf54038223986b3fe6f4dd4428f62d292bc (patch)
treef4384c726f052df953d158ef9983484ea0749406
parent4c504063b9d804cf9ffc6c2157d989445f1ddc84 (diff)
downloadATCD-9b1becf54038223986b3fe6f4dd4428f62d292bc.tar.gz
ChangeLogTag:Wed Feb 6 13:36:00 2002 Ossama Othman <ossama@uci.edu>
-rw-r--r--TAO/ChangeLogs/ChangeLog-02a9
-rw-r--r--TAO/tao/ORB_Core.cpp20
2 files changed, 22 insertions, 7 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a
index 299314f7185..18314b3b0a9 100644
--- a/TAO/ChangeLogs/ChangeLog-02a
+++ b/TAO/ChangeLogs/ChangeLog-02a
@@ -1,8 +1,15 @@
+Wed Feb 6 13:36:00 2002 Ossama Othman <ossama@uci.edu>
+
+ * tao/ORB_Core.cpp (shutdown):
+
+ Synchronize the ORB Core state during shutdown. Fixes a race
+ condition.
+
Tue Feb 05 15:37:15 2002 Boris Kolpackov <bosk@ipmce.ru>
* TAO_IDL/be/be_visitor_valuetype/valuetype.cpp
Fixed minor bug with type selection for field visitor.
-
+
Mon Feb 04 09:19:53 2002 Carlos O'Ryan <coryan@uci.edu>
* TAO_IDL/be/be_visitor_amh_pre_proc.cpp:
diff --git a/TAO/tao/ORB_Core.cpp b/TAO/tao/ORB_Core.cpp
index 512718ba636..fdcbe1103e5 100644
--- a/TAO/tao/ORB_Core.cpp
+++ b/TAO/tao/ORB_Core.cpp
@@ -149,13 +149,13 @@ TAO_ORB_Core::TAO_ORB_Core (const char *orbid)
use_tss_resources_ (0),
tss_resources_ (),
orb_resources_ (),
- has_shutdown_ (1),
+ has_shutdown_ (1), // Start the ORB in a "shutdown" state. Only
+ // after CORBA::ORB_init() is called will the
+ // ORB no longer be shutdown. This does not
+ // mean that the ORB can be reinitialized. It
+ // can only be initialized once.
thread_per_connection_use_timeout_ (1),
endpoint_selector_factory_ (0),
- // Start the ORB in a "shutdown" state. Only after
- // CORBA::ORB_init() is called will the ORB no longer be shutdown.
- // This does not mean that the ORB can be reinitialized. It can
- // only be initialized once.
#if (TAO_HAS_BUFFERING_CONSTRAINT_POLICY == 1)
eager_buffering_sync_strategy_ (0),
delayed_buffering_sync_strategy_ (0),
@@ -373,6 +373,8 @@ TAO_ORB_Core::init (int &argc, char *argv[] ACE_ENV_ARG_DECL)
this->set_endpoint_helper (current_arg
ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (-1);
+
arg_shifter.consume_arg ();
}
else if ((current_arg = arg_shifter.get_the_parameter
@@ -762,7 +764,9 @@ TAO_ORB_Core::init (int &argc, char *argv[] ACE_ENV_ARG_DECL)
// used.
this->set_endpoint_helper (current_arg
- ACE_ENV_ARG_PARAMETER);
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK_RETURN (-1);
+
arg_shifter.consume_arg ();
}
else if ((current_arg = arg_shifter.get_the_parameter
@@ -775,6 +779,8 @@ TAO_ORB_Core::init (int &argc, char *argv[] ACE_ENV_ARG_DECL)
// set.
// Fill in later
// @@ To do later: Priyanka.
+
+ ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), -1);
}
////////////////////////////////////////////////////////////////
// catch any unknown -ORB args //
@@ -1748,6 +1754,8 @@ void
TAO_ORB_Core::shutdown (CORBA::Boolean wait_for_completion
ACE_ENV_ARG_DECL)
{
+ ACE_GUARD (TAO_SYNCH_MUTEX, monitor, this->lock_);
+
if (this->has_shutdown () == 0)
{
this->adapter_registry_.check_close (wait_for_completion