summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-03-19 17:25:41 +0000
committercoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-03-19 17:25:41 +0000
commit6e6851754591996846352bda336f29c4ae6ff204 (patch)
treef4bd4f780bc072e18d074dada059a8bdc26ff571
parentd97e653bf47bc49da9872e109c0efb92e05cd5c2 (diff)
downloadATCD-6e6851754591996846352bda336f29c4ae6ff204.tar.gz
ChangeLogTag:Mon Mar 19 09:05:40 2001 Carlos O'Ryan <coryan@uci.edu>
-rw-r--r--TAO/ChangeLogs/ChangeLog-02a211
-rw-r--r--TAO/orbsvcs/orbsvcs/CosEvent/CEC_Dispatching_Task.cpp1
-rw-r--r--TAO/orbsvcs/tests/Concurrency/CC_tests.cpp2
-rw-r--r--TAO/orbsvcs/tests/CosEvent/Basic/Random.cpp1
-rw-r--r--TAO/orbsvcs/tests/CosEvent/lib/Counting_Consumer.cpp2
-rw-r--r--TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.cpp19
-rw-r--r--TAO/tao/RT_Invocation_Endpoint_Selectors.cpp14
-rw-r--r--TAO/tao/Transport.cpp65
-rw-r--r--TAO/tao/Typecode.cpp67
9 files changed, 223 insertions, 159 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a
index dbb1c0a7fbd..7cfb8710b38 100644
--- a/TAO/ChangeLogs/ChangeLog-02a
+++ b/TAO/ChangeLogs/ChangeLog-02a
@@ -1,149 +1,172 @@
+Mon Mar 19 09:05:40 2001 Carlos O'Ryan <coryan@uci.edu>
+
+ * tao/Typecode.cpp:
+ The code was not checking for exceptions with ACE_CHECK or
+ ACE_CHECK_RETURN, but was using the return values. This is
+ clearly broken and can result in some nasty behavior on
+ platforms without native exceptions.
+
+ * tao/Transport.cpp:
+ Cosmetic fixes to fit the ACE-guidelines.
+
+ * tao/RT_Invocation_Endpoint_Selectors.cpp:
+ Don't use ACE_UNUSED_ARG() when simply removing the argument
+ name would do.
+
+ * tao/RT_Invocation_Endpoint_Selectors.cpp:
+ * orbsvcs/tests/EC_Mcast/EC_Mcast.cpp:
+ * orbsvcs/tests/CosEvent/lib/Counting_Consumer.cpp:
+ * orbsvcs/tests/CosEvent/Basic/Random.cpp:
+ * orbsvcs/tests/Concurrency/CC_tests.cpp:
+ * orbsvcs/orbsvcs/CosEvent/CEC_Dispatching_Task.cpp:
+ Add missing ACE_CHECK, ACE_CHECK_RETURN or ACE_TRY_CHECK
+
Mon Mar 19 10:03:01 2001 Balachandran Natarajan <bala@cs.wustl.edu>
- * tests/POA/Single_Threaded_POA/Single_Threaded_POA.cpp (main):
- Fixed a warning in KCC builds.
+ * tests/POA/Single_Threaded_POA/Single_Threaded_POA.cpp (main):
+ Fixed a warning in KCC builds.
Mon Mar 19 06:23:05 2001 Balachandran Natarajan <bala@cs.wustl.edu>
- * orbsvcs/examples/RtEC/Schedule/Service.cpp: Commented out the
- guard for RECONFIG_SCHED type. Theoretically the guard may not
- be needed. This should solve one of the compile problems on Lynx
- I386 builds.
+ * orbsvcs/examples/RtEC/Schedule/Service.cpp: Commented out the
+ guard for RECONFIG_SCHED type. Theoretically the guard may not
+ be needed. This should solve one of the compile problems on Lynx
+ I386 builds.
Mon Mar 19 03:02:11 2001 Ossama Othman <ossama@uci.edu>
- * orbsvcs/orbsvcs/SSLIOP/SSLIOP_Current_Impl.cpp (get_attributes):
-
- Fixed memory access violations.
-
- * orbsvcs/tests/Security/Secure_Invocation/Foo.idl:
- * orbsvcs/tests/Security/Secure_Invocation/Foo_i.cpp:
- * orbsvcs/tests/Security/Secure_Invocation/Foo_i.h:
- * orbsvcs/tests/Security/Secure_Invocation/README:
- * orbsvcs/tests/Security/Secure_Invocation/Secure_Invocation.dsw:
- * orbsvcs/tests/Security/Secure_Invocation/cacert.pem:
- * orbsvcs/tests/Security/Secure_Invocation/client.conf:
- * orbsvcs/tests/Security/Secure_Invocation/client.cpp:
- * orbsvcs/tests/Security/Secure_Invocation/client.dsp:
- * orbsvcs/tests/Security/Secure_Invocation/client_cert.pem:
- * orbsvcs/tests/Security/Secure_Invocation/client_key.pem:
- * orbsvcs/tests/Security/Secure_Invocation/client_key_nopasswd.pem:
- * orbsvcs/tests/Security/Secure_Invocation/client_nopasswd.conf:
- * orbsvcs/tests/Security/Secure_Invocation/run_test.pl:
- * orbsvcs/tests/Security/Secure_Invocation/server.conf:
- * orbsvcs/tests/Security/Secure_Invocation/server.cpp:
- * orbsvcs/tests/Security/Secure_Invocation/server.dsp:
- * orbsvcs/tests/Security/Secure_Invocation/server_cert.pem:
- * orbsvcs/tests/Security/Secure_Invocation/server_key.pem:
- * orbsvcs/tests/Security/Secure_Invocation/server_key_nopasswd.pem:
- * orbsvcs/tests/Security/Secure_Invocation/server_none.conf:
- * orbsvcs/tests/Security/Secure_Invocation/server_nopasswd.conf:
-
- New test that verifies secure invocations are working properly,
- and to some extent the "SecurityCurrent" object.
+ * orbsvcs/orbsvcs/SSLIOP/SSLIOP_Current_Impl.cpp (get_attributes):
+
+ Fixed memory access violations.
+
+ * orbsvcs/tests/Security/Secure_Invocation/Foo.idl:
+ * orbsvcs/tests/Security/Secure_Invocation/Foo_i.cpp:
+ * orbsvcs/tests/Security/Secure_Invocation/Foo_i.h:
+ * orbsvcs/tests/Security/Secure_Invocation/README:
+ * orbsvcs/tests/Security/Secure_Invocation/Secure_Invocation.dsw:
+ * orbsvcs/tests/Security/Secure_Invocation/cacert.pem:
+ * orbsvcs/tests/Security/Secure_Invocation/client.conf:
+ * orbsvcs/tests/Security/Secure_Invocation/client.cpp:
+ * orbsvcs/tests/Security/Secure_Invocation/client.dsp:
+ * orbsvcs/tests/Security/Secure_Invocation/client_cert.pem:
+ * orbsvcs/tests/Security/Secure_Invocation/client_key.pem:
+ * orbsvcs/tests/Security/Secure_Invocation/client_key_nopasswd.pem:
+ * orbsvcs/tests/Security/Secure_Invocation/client_nopasswd.conf:
+ * orbsvcs/tests/Security/Secure_Invocation/run_test.pl:
+ * orbsvcs/tests/Security/Secure_Invocation/server.conf:
+ * orbsvcs/tests/Security/Secure_Invocation/server.cpp:
+ * orbsvcs/tests/Security/Secure_Invocation/server.dsp:
+ * orbsvcs/tests/Security/Secure_Invocation/server_cert.pem:
+ * orbsvcs/tests/Security/Secure_Invocation/server_key.pem:
+ * orbsvcs/tests/Security/Secure_Invocation/server_key_nopasswd.pem:
+ * orbsvcs/tests/Security/Secure_Invocation/server_none.conf:
+ * orbsvcs/tests/Security/Secure_Invocation/server_nopasswd.conf:
+
+ New test that verifies secure invocations are working properly,
+ and to some extent the "SecurityCurrent" object.
Mon Mar 19 00:16:13 2001 Ossama Othman <ossama@uci.edu>
- * orbsvcs/orbsvcs/Security.dsp:
+ * orbsvcs/orbsvcs/Security.dsp:
- Added missing custom IDL build steps to the "Release"
- configuration.
+ Added missing custom IDL build steps to the "Release"
+ configuration.
Sun Mar 18 23:50:28 2001 Angelo Corsaro <corsaro@cs.wustl.edu>
- * tests/RTCORBA/Banded_Connections/run_test.pl:
+ * tests/RTCORBA/Banded_Connections/run_test.pl:
- Changed the parameter passed to the server and the client.
+ Changed the parameter passed to the server and the client.
- * tests/RTCORBA/Banded_Connections/bands.unix:
+ * tests/RTCORBA/Banded_Connections/bands.unix:
- Changed the bands to be adjacent.
+ Changed the bands to be adjacent.
- * tests/RTCORBA/Banded_Connections/bands.nt:
+ * tests/RTCORBA/Banded_Connections/bands.nt:
- Changed the priority bands to cover all the available priority
- range available on win32.
+ Changed the priority bands to cover all the available priority
+ range available on win32.
- * tests/RTCORBA/Banded_Connections/server.cpp:
+ * tests/RTCORBA/Banded_Connections/server.cpp:
- It was creating and activating two CORBA object using the same
- servant and using the UNIQUE_ID policy. This problem has been
- fixed by using two different servant.
+ It was creating and activating two CORBA object using the same
+ servant and using the UNIQUE_ID policy. This problem has been
+ fixed by using two different servant.
- * tests/RTCORBA/Banded_Connections/client.cpp:
+ * tests/RTCORBA/Banded_Connections/client.cpp:
- Fixed wront diagnostic message that was erroneously signaling an
- error condition in case of success.
+ Fixed wront diagnostic message that was erroneously signaling an
+ error condition in case of success.
- * tao/RT_Invocation_Endpoint_Selectors.cpp (select_endpoint):
+ * tao/RT_Invocation_Endpoint_Selectors.cpp (select_endpoint):
- Changed the logic used to select the ORB endpoint that should
- be used to send a GIOP request in presence of priority bands.
- Before if the client was exposing a priority that was different
- from one of the server ORB endpoint's priority, an exception
- would have been raised even if the priority exposed by the
- client was within one of the bands used by the server ORB.
- The decision logic assume that the endpoint priority exported in
- the server ORB are associated with the maximum value of the
- relative bands.
+ Changed the logic used to select the ORB endpoint that should
+ be used to send a GIOP request in presence of priority bands.
+ Before if the client was exposing a priority that was different
+ from one of the server ORB endpoint's priority, an exception
+ would have been raised even if the priority exposed by the
+ client was within one of the bands used by the server ORB.
+ The decision logic assume that the endpoint priority exported in
+ the server ORB are associated with the maximum value of the
+ relative bands.
Sun Mar 18 21:13:36 2001 Ossama Othman <ossama@uci.edu>
- * tao/IORInfo.cpp (add_ior_component_to_profile):
- * tao/Object_Ref_Table.cpp (register_initial_reference):
- * tao/PolicyFactory_Registry.cpp (register_policy_factory):
+ * tao/IORInfo.cpp (add_ior_component_to_profile):
+ * tao/Object_Ref_Table.cpp (register_initial_reference):
+ * tao/PolicyFactory_Registry.cpp (register_policy_factory):
- Added missing OMG assigned exception minor codes to ACE_THROW
- expressions.
+ Added missing OMG assigned exception minor codes to ACE_THROW
+ expressions.
- * tao/corbafwd.h:
- * tao/CORBALOC_Parser.cpp (parse_string_count_helper):
- * tao/CORBANAME_Parser.cpp (parse_string_dynamic_request_helper):
+ * tao/corbafwd.h:
+ * tao/CORBALOC_Parser.cpp (parse_string_count_helper):
+ * tao/CORBANAME_Parser.cpp (parse_string_dynamic_request_helper):
- Removed uses of needless TAO_OMG_MINOR_BAD_PARAM_10 macro.
+ Removed uses of needless TAO_OMG_MINOR_BAD_PARAM_10 macro.
Sun Mar 18 16:28:03 2001 Ossama Othman <ossama@uci.edu>
- * tao/Exception.h:
- * tao/corbafwd.h:
+ * tao/Exception.h:
+ * tao/corbafwd.h:
- Added missing CODESET_INCOMPATIBLE and BAD_QOS to the list of
- CORBA system exceptions (see CORBA 2.4.2 spec).
+ Added missing CODESET_INCOMPATIBLE and BAD_QOS to the list of
+ CORBA system exceptions (see CORBA 2.4.2 spec).
- * tao/Exception.cpp (_tao_get_omg_exception_description):
+ * tao/Exception.cpp (_tao_get_omg_exception_description):
- Return the description of the OMG minor code for a given
- CORBA::SystemException. Descriptions correspond to those found
- in the CORBA 2.4.2 spec and the recently adopted Portable
- Interceptors spec. [Bug 827]
+ Return the description of the OMG minor code for a given
+ CORBA::SystemException. Descriptions correspond to those found
+ in the CORBA 2.4.2 spec and the recently adopted Portable
+ Interceptors spec. [Bug 827]
Sun Mar 18 18:09:05 2001 Ossama Othman <ossama@uci.edu>
- * tests/Param_Test/ub_any_seq.cpp (init_parameters):
+ * tests/Param_Test/ub_any_seq.cpp (init_parameters):
- Fixed warnings issued by g++ 2.95.2.
+ Fixed warnings issued by g++ 2.95.2.
Sun Mar 18 13:30:00 2001 Ossama Othman <ossama@uci.edu>
- * tao/Exception.cpp (_info):
+ * tao/Exception.cpp (_info):
- Fixed _is_a() call on CORBA::BAD_PARAM() exception. The
- repository ID passed to the _is_a() call was missing the
- version.
+ Fixed _is_a() call on CORBA::BAD_PARAM() exception. The
+ repository ID passed to the _is_a() call was missing the
+ version.
Sun Mar 18 11:50:57 2001 Ossama Othman <ossama@uci.edu>
- * tao/Exception.cpp (_info):
+ * tao/Exception.cpp (_info):
- Fixed exception informational message so that it displays the
- properly masked TAO and OMG minor codes, rather than the raw
- minor codes. The masked minor codes are more meaningful.
+ Fixed exception informational message so that it displays the
+ properly masked TAO and OMG minor codes, rather than the raw
+ minor codes. The masked minor codes are more meaningful.
- * tao/ORB_Core.i (check_shutdown):
+ * tao/ORB_Core.i (check_shutdown):
- Bitwise-OR the minor code in the CORBA::BAD_INV_ORDER()
- exception being thrown with the TAO_OMG_VMCID constant/macro.
- The minor code in use is one assigned by the OMG.
+ Bitwise-OR the minor code in the CORBA::BAD_INV_ORDER()
+ exception being thrown with the TAO_OMG_VMCID constant/macro.
+ The minor code in use is one assigned by the OMG.
Sun Mar 18 12:34:44 2001 Carlos O'Ryan <coryan@uci.edu>
diff --git a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_Dispatching_Task.cpp b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_Dispatching_Task.cpp
index 7c91e11ae66..9f8324e6d51 100644
--- a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_Dispatching_Task.cpp
+++ b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_Dispatching_Task.cpp
@@ -98,6 +98,7 @@ int
TAO_CEC_Push_Command::execute (CORBA::Environment& ACE_TRY_ENV)
{
this->proxy_->push_to_consumer (this->event_, ACE_TRY_ENV);
+ ACE_CHECK_RETURN (-1);
return 0;
}
diff --git a/TAO/orbsvcs/tests/Concurrency/CC_tests.cpp b/TAO/orbsvcs/tests/Concurrency/CC_tests.cpp
index 46fb2157294..815a98cabcc 100644
--- a/TAO/orbsvcs/tests/Concurrency/CC_tests.cpp
+++ b/TAO/orbsvcs/tests/Concurrency/CC_tests.cpp
@@ -325,6 +325,8 @@ Test_Release_Not_Held_Lock::run (int /* times_to_run */)
{
// lock the lock
cc_lock_set_->lock (mode_, ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+
ACE_DEBUG ((LM_DEBUG,
"%s lock set\n",
get_lock_mode_name (mode_)));
diff --git a/TAO/orbsvcs/tests/CosEvent/Basic/Random.cpp b/TAO/orbsvcs/tests/CosEvent/Basic/Random.cpp
index 3c2ce9101f3..661e634b344 100644
--- a/TAO/orbsvcs/tests/CosEvent/Basic/Random.cpp
+++ b/TAO/orbsvcs/tests/CosEvent/Basic/Random.cpp
@@ -278,6 +278,7 @@ RND_Driver::timer (const CORBA::Any &e,
recursion++;
new_event <<= recursion;
this->supplier_.push (new_event, ACE_TRY_ENV);
+ ACE_CHECK;
}
}
break;
diff --git a/TAO/orbsvcs/tests/CosEvent/lib/Counting_Consumer.cpp b/TAO/orbsvcs/tests/CosEvent/lib/Counting_Consumer.cpp
index f6526df1daa..03b818763a6 100644
--- a/TAO/orbsvcs/tests/CosEvent/lib/Counting_Consumer.cpp
+++ b/TAO/orbsvcs/tests/CosEvent/lib/Counting_Consumer.cpp
@@ -174,8 +174,10 @@ CEC_Pull_Counting_Consumer::try_pull (CORBA::Boolean_out has_event,
has_event = 0;
return 0;
}
+
CORBA::Any_var event =
this->supplier_proxy_->try_pull (has_event, ACE_TRY_ENV);
+ ACE_CHECK_RETURN (0);
if (has_event)
this->event_count++;
diff --git a/TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.cpp b/TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.cpp
index 3e7143a7c68..8a271d2bd4d 100644
--- a/TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.cpp
+++ b/TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.cpp
@@ -841,7 +841,7 @@ ECM_Consumer::disconnect (CORBA::Environment& ACE_TRY_ENV)
|| CORBA::is_nil (this->consumer_admin_.in ()))
return;
-
+
RtecEventChannelAdmin::ProxyPushSupplier_var tmp =
this->supplier_proxy_._retn ();
tmp->disconnect_push_supplier (ACE_TRY_ENV);
@@ -851,9 +851,20 @@ ECM_Consumer::disconnect (CORBA::Environment& ACE_TRY_ENV)
void
ECM_Consumer::close (CORBA::Environment &ACE_TRY_ENV)
{
- this->disconnect (ACE_TRY_ENV);
- this->consumer_admin_ =
- RtecEventChannelAdmin::ConsumerAdmin::_nil ();
+ ACE_TRY
+ {
+ this->disconnect (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+ this->consumer_admin_ =
+ RtecEventChannelAdmin::ConsumerAdmin::_nil ();
+ }
+ ACE_CATCHANY
+ {
+ this->consumer_admin_ =
+ RtecEventChannelAdmin::ConsumerAdmin::_nil ();
+ ACE_RE_THROW;
+ }
+ ACE_ENDTRY;
}
void
diff --git a/TAO/tao/RT_Invocation_Endpoint_Selectors.cpp b/TAO/tao/RT_Invocation_Endpoint_Selectors.cpp
index da654d4b39f..991cf9ff4ac 100644
--- a/TAO/tao/RT_Invocation_Endpoint_Selectors.cpp
+++ b/TAO/tao/RT_Invocation_Endpoint_Selectors.cpp
@@ -39,6 +39,7 @@ TAO_Priority_Endpoint_Selector::select_endpoint (TAO_GIOP_Invocation
this->next (invocation, ACE_TRY_ENV);
ACE_CHECK;
this->select_endpoint (invocation, ACE_TRY_ENV);
+ ACE_CHECK;
}
else if (invocation->profile_->endpoint_count () == 1)
@@ -146,10 +147,11 @@ TAO_Bands_Endpoint_Selector::select_endpoint (TAO_GIOP_Invocation
this->next (invocation, ACE_TRY_ENV);
ACE_CHECK;
this->select_endpoint (invocation, ACE_TRY_ENV);
+ ACE_CHECK;
}
-
else
{
+
// Find the endpoint for the band of interest.
TAO_Endpoint *endpoint = 0;
for (TAO_Endpoint *endp = invocation->profile_->endpoint ();
@@ -272,12 +274,14 @@ TAO_Protocol_Endpoint_Selector::select_endpoint (TAO_GIOP_Invocation
// protocol, try another protocol.
invocation->endpoint_selection_state_.client_protocol_index_++;
this->select_endpoint (invocation, ACE_TRY_ENV);
+ ACE_CHECK;
}
else
{
// Found the profile - get the endpoint.
invocation->profile_ = profile;
this->endpoint (invocation, ACE_TRY_ENV);
+ ACE_CHECK;
}
}
@@ -292,10 +296,8 @@ TAO_Protocol_Endpoint_Selector::endpoint (TAO_GIOP_Invocation *invocation,
void
TAO_Protocol_Endpoint_Selector::next (TAO_GIOP_Invocation
*invocation,
- CORBA::Environment &ACE_TRY_ENV)
+ CORBA::Environment &)
{
- ACE_UNUSED_ARG (ACE_TRY_ENV);
-
invocation->endpoint_selection_state_.client_protocol_index_++;
// If we ran out of profiles to try - this will be detected and
// exception thrown once <endpoint> is called.
@@ -427,10 +429,8 @@ TAO_Client_Priority_Policy_Selector::select_endpoint (TAO_GIOP_Invocation
void
TAO_Client_Priority_Policy_Selector::next (TAO_GIOP_Invocation
*invocation,
- CORBA::Environment &ACE_TRY_ENV)
+ CORBA::Environment &)
{
- ACE_UNUSED_ARG (ACE_TRY_ENV);
-
invocation->endpoint_selection_state_.client_protocol_index_++;
// If we ran out of profiles to try - this will be detected and
// exception thrown once <endpoint> is called.
diff --git a/TAO/tao/Transport.cpp b/TAO/tao/Transport.cpp
index 66f48938f4c..a9ca20720d9 100644
--- a/TAO/tao/Transport.cpp
+++ b/TAO/tao/Transport.cpp
@@ -237,9 +237,10 @@ TAO_Transport::connection_handler_closing (void)
this->transition_handler_state ();
// purge_entry on the Transport_Cache
- if (this->cache_map_entry_ != 0) {
- this->orb_core_->transport_cache ().purge_entry (this->cache_map_entry_);
- }
+ if (this->cache_map_entry_ != 0)
+ {
+ this->orb_core_->transport_cache ().purge_entry (this->cache_map_entry_);
+ }
// This should be the last thing we do here
TAO_Transport::release(this);
@@ -252,48 +253,58 @@ TAO_Transport::connection_handler (void) const
}
TAO_Transport*
-TAO_Transport::_duplicate(TAO_Transport* transport)
+TAO_Transport::_duplicate (TAO_Transport* transport)
{
- if (transport != 0) {
- transport->increment();
+ if (transport != 0)
+ {
+ transport->increment();
#if 0
-ACE_hthread_t self;
-ACE_OS::thr_self(self);
-printf("DEBUG: Thread == %2d %s (%x) storing %8x TAO_Transport::_duplicate count == %d\n", self, what, who, transport, transport->refcount());
+ ACE_DEBUG ((LM_DEBUG,
+ "(%P|%t) TAO_Transport::duplicate, "
+ "%s (%x) releasing %8x "
+ "TAO_Transport::release count == %d\n",
+ what, who, transport, count));
#endif
}
return transport;
}
void
-TAO_Transport::release(TAO_Transport* transport)
+TAO_Transport::release (TAO_Transport* transport)
{
- if (transport != 0) {
- int count = transport->decrement();
+ if (transport != 0)
+ {
+ int count = transport->decrement ();
#if 0
-ACE_hthread_t self;
-ACE_OS::thr_self(self);
-printf("DEBUG: Thread == %2d %s (%x) releasing %8x TAO_Transport::release count == %d\n", self, what, who, transport, count);
-#endif
- if (count == 0) {
- delete transport;
- }
- else if (count < 0) {
ACE_DEBUG ((LM_DEBUG,
- "Refrence count in TAO_Transport::release "
- "is less than zero: %d\n", count));
- ACE_OS::abort ();
+ "(%P|%t) TAO_Transport::release, "
+ "%s (%x) releasing %8x "
+ "TAO_Transport::release count == %d\n",
+ what, who, transport, count));
+#endif
+ if (count == 0)
+ {
+ delete transport;
+ }
+ else if (count < 0)
+ {
+ ACE_ERROR ((LM_ERROR,
+ "(%P|%t) TAO_Transport::release, "
+ "reference countis less than zero: %d\n",
+ count));
+ ACE_OS::abort ();
+ }
}
- }
}
int
TAO_Transport::recache_transport (TAO_Transport_Descriptor_Interface *desc)
{
// First purge our entry
- if (this->cache_map_entry_ != 0) {
- this->orb_core_->transport_cache ().purge_entry (this->cache_map_entry_);
- }
+ if (this->cache_map_entry_ != 0)
+ {
+ this->orb_core_->transport_cache ().purge_entry (this->cache_map_entry_);
+ }
// Then add ourselves to the cache
return this->orb_core_->transport_cache ().cache_transport (desc,
diff --git a/TAO/tao/Typecode.cpp b/TAO/tao/Typecode.cpp
index 6b63091fd44..8fd6a4a8f69 100644
--- a/TAO/tao/Typecode.cpp
+++ b/TAO/tao/Typecode.cpp
@@ -330,10 +330,12 @@ CORBA_TypeCode::discriminator_type (CORBA::Environment &ACE_TRY_ENV) const
return CORBA_TypeCode::_duplicate (
this->private_state_->tc_discriminator_type_
);
- else
- return CORBA_TypeCode::_duplicate (
- this->private_discriminator_type (ACE_TRY_ENV)
- );
+
+ CORBA::TypeCode_ptr type =
+ this->private_discriminator_type (ACE_TRY_ENV);
+ ACE_CHECK_RETURN (CORBA::TypeCode::_nil ());
+
+ return CORBA_TypeCode::_duplicate (type);
}
// only applicable to CORBA::tk_unions
@@ -381,9 +383,13 @@ CORBA_TypeCode::content_type (CORBA::Environment &ACE_TRY_ENV) const
this->private_state_->tc_content_type_
);
else
- return CORBA_TypeCode::_duplicate (
- this->private_content_type (ACE_TRY_ENV)
- );
+ {
+ CORBA::TypeCode_ptr tmp =
+ this->private_content_type (ACE_TRY_ENV);
+ ACE_CHECK_RETURN (CORBA::TypeCode::_nil ());
+
+ return CORBA_TypeCode::_duplicate (tmp);
+ }
}
else
ACE_THROW_RETURN (CORBA::TypeCode::BadKind (), 0);
@@ -635,8 +641,9 @@ CORBA_TypeCode::equ_common (CORBA::TypeCode_ptr tc,
ACE_CHECK_RETURN (0);
}
- status = (tc->kind (ACE_TRY_ENV) == CORBA::tk_alias);
+ CORBA::TCKind kind = tc->kind (ACE_TRY_ENV);
ACE_CHECK_RETURN (0);
+ status = (kind == CORBA::tk_alias);
// Added by Bala to check for leaks as content_type duplicates the
// pointers
@@ -649,30 +656,36 @@ CORBA_TypeCode::equ_common (CORBA::TypeCode_ptr tc,
tcvar = tcvar->content_type (ACE_TRY_ENV);
ACE_CHECK_RETURN (0);
- status = (tcvar->kind (ACE_TRY_ENV) == CORBA::tk_alias);
+ kind = tcvar->kind (ACE_TRY_ENV);
ACE_CHECK_RETURN (0);
+ status = (kind == CORBA::tk_alias);
}
- if (rcvr->kind (ACE_TRY_ENV) != tcvar->kind (ACE_TRY_ENV))
- // simple case
- return 0;
- else
- // typecode kinds are same
- return rcvr->private_equal (tcvar.in (),
- equiv_only,
- ACE_TRY_ENV);
- }
- else
- {
- if (this->kind_ != tc->kind (ACE_TRY_ENV))
+ kind = rcvr->kind (ACE_TRY_ENV);
+ ACE_CHECK_RETURN (0);
+ CORBA::TCKind other_kind = tcvar->kind (ACE_TRY_ENV);
+ ACE_CHECK_RETURN (0);
+
+ if (kind != other_kind)
// simple case
return 0;
- else
- // typecode kinds are same
- return this->private_equal (tc,
- equiv_only,
- ACE_TRY_ENV);
+
+ // typecode kinds are same
+ return rcvr->private_equal (tcvar.in (),
+ equiv_only,
+ ACE_TRY_ENV);
}
+
+ CORBA::TCKind kind = tc->kind (ACE_TRY_ENV);
+ ACE_CHECK_RETURN (0);
+ if (this->kind_ != kind)
+ // simple case
+ return 0;
+
+ // typecode kinds are same
+ return this->private_equal (tc,
+ equiv_only,
+ ACE_TRY_ENV);
}
// check if typecodes are equal. Equality is based on a mix of structural
@@ -1939,7 +1952,7 @@ CORBA_TypeCode::private_member_label (CORBA::ULong n,
// If we are computing the label for the default index,
// the label must contain an octet value of 0.
- if (i == (ACE_static_cast (CORBA::ULong,
+ if (i == (ACE_static_cast (CORBA::ULong,
this->private_default_index_i ())))
{
label_tc = CORBA::_tc_octet;