summaryrefslogtreecommitdiff
path: root/TAO
diff options
context:
space:
mode:
authorharrisb <harrisb@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2013-02-11 20:10:48 +0000
committerharrisb <harrisb@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2013-02-11 20:10:48 +0000
commit94a07187f3dbea6da67f3f80d515ab19d8ceb634 (patch)
tree0d96a2a90c93a069665bba9f722c61f78dce8214 /TAO
parentad38cc7c456c22490a327469ff369a5e60258d9a (diff)
downloadATCD-94a07187f3dbea6da67f3f80d515ab19d8ceb634.tar.gz
Mon Feb 11 20:08:11 UTC 2013 Byron Harris <harrisb@ociweb.com>
Diffstat (limited to 'TAO')
-rw-r--r--TAO/ChangeLog10
-rw-r--r--TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Naming_Manager.cpp12
-rw-r--r--TAO/tao/Synch_Invocation.cpp142
3 files changed, 92 insertions, 72 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 7e2f2f290f4..3486939d51f 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,13 @@
+Mon Feb 11 20:08:11 UTC 2013 Byron Harris <harrisb@ociweb.com>
+
+ * orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Naming_Manager.cpp:
+
+ Fix Coverity 972906: Unchecked return value.
+
+ * tao/Synch_Invocation.cpp:
+
+ Fix Coverity 972926: Dereference after null check.
+
Mon Feb 11 17:46:21 UTC 2013 Kevin Stanley <stanleyk@ociweb.com>
* orbsvcs/orbsvcs/PortableGroup/PG_ObjectGroupManager.h:
diff --git a/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Naming_Manager.cpp b/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Naming_Manager.cpp
index cea3c933e83..899dcd33f4e 100644
--- a/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Naming_Manager.cpp
+++ b/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Naming_Manager.cpp
@@ -172,7 +172,17 @@ TAO_FT_Naming_Manager::groups (::FT_Naming::LoadBalancingStrategyValue target_st
lb_strat_property_name[0].id = CORBA::string_dup (::FT_Naming::TAO_FT_LOAD_BALANCING_STRATEGY);
PortableGroup::Properties_var props = this->get_properties (obj_group);
PortableGroup::Value value;
- TAO_PG::get_property_value (lb_strat_property_name, props.in (), value);
+ if (!TAO_PG::get_property_value (lb_strat_property_name, props.in (), value))
+ {
+ (*group_names)[i] =
+ CORBA::string_dup ("<group without LB property>");
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("%T %n (%P|%t) - FT_Naming_Manager::groups: no LB ")
+ ACE_TEXT ("property set on group.\n")
+ ));
+ continue;
+ }
+
::FT_Naming::LoadBalancingStrategyValue lb_strategy_val;
value >>= lb_strategy_val;
diff --git a/TAO/tao/Synch_Invocation.cpp b/TAO/tao/Synch_Invocation.cpp
index 71ef977e300..2913c657d20 100644
--- a/TAO/tao/Synch_Invocation.cpp
+++ b/TAO/tao/Synch_Invocation.cpp
@@ -759,18 +759,15 @@ namespace TAO
if (!transport)
{
if (this->retry_state_ &&
- this->retry_state_->forward_on_exception_limit_used ())
+ this->retry_state_->forward_on_exception_increment(FOE_TRANSIENT))
{
- if (this->retry_state_->forward_on_exception_increment(FOE_TRANSIENT))
- {
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_INFO,
- ACE_TEXT ("TAO (%P|%t) - Synch_Oneway_Invocation::")
- ACE_TEXT ("remote_oneway retrying on TRANSIENT ")
- ACE_TEXT ("exception\n")));
- this->retry_state_->next_profile_retry (*this->stub ());
- return TAO_INVOKE_RESTART;
- }
+ if (TAO_debug_level > 0)
+ ACE_DEBUG ((LM_INFO,
+ ACE_TEXT ("TAO (%P|%t) - Synch_Oneway_Invocation::")
+ ACE_TEXT ("remote_oneway retrying on TRANSIENT ")
+ ACE_TEXT ("exception\n")));
+ this->retry_state_->next_profile_retry (*this->stub ());
+ return TAO_INVOKE_RESTART;
}
else
{
@@ -781,75 +778,78 @@ namespace TAO
}
}
+ else
+ {
+ ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, transport->output_cdr_lock (),
+ TAO_INVOKE_FAILURE);
- {
- ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, transport->output_cdr_lock (),
- TAO_INVOKE_FAILURE);
-
- TAO_OutputCDR &cdr = transport->out_stream ();
+ TAO_OutputCDR &cdr = transport->out_stream ();
- cdr.message_attributes (this->details_.request_id (),
- this->resolver_.stub (),
- TAO_Message_Semantics (TAO_Message_Semantics::TAO_ONEWAY_REQUEST),
- max_wait_time);
+ cdr.message_attributes (this->details_.request_id (),
+ this->resolver_.stub (),
+ TAO_Message_Semantics (TAO_Message_Semantics::
+ TAO_ONEWAY_REQUEST),
+ max_wait_time);
- this->write_header (cdr);
+ this->write_header (cdr);
- this->marshal_data (cdr);
+ this->marshal_data (cdr);
- countdown.update ();
+ countdown.update ();
- if (transport->is_connected ())
- {
- // We have a connected transport so we can send the message
- s = this->send_message (cdr,
- TAO_Message_Semantics (TAO_Message_Semantics::TAO_ONEWAY_REQUEST),
- max_wait_time);
+ if (transport->is_connected ())
+ {
+ // We have a connected transport so we can send the message
+ s = this->send_message (cdr,
+ TAO_Message_Semantics (TAO_Message_Semantics::
+ TAO_ONEWAY_REQUEST),
+ max_wait_time);
+
+ if (transport->wait_strategy ()->non_blocking () == 0 &&
+ transport->orb_core ()->client_factory ()->use_cleanup_options ())
+ {
+ if (!transport->wait_strategy ()->is_registered())
+ {
+ ACE_Event_Handler * const eh =
+ transport->event_handler_i ();
+
+ ACE_Reactor * const r =
+ transport->orb_core ()->reactor ();
+
+ if (r->register_handler (eh, ACE_Event_Handler::READ_MASK) == -1)
+ {
+ if (TAO_debug_level > 0)
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("TAO (%P|%t) - Synch_Oneway_Invocation::")
+ ACE_TEXT ("remote_oneway transport[%d] ")
+ ACE_TEXT ("registration withreactor ")
+ ACE_TEXT ("returned an error\n"),
+ transport->id ()));
+ }
+ else
+ {
+ // Only set this flag when registration succeeds
+ transport->wait_strategy ()->is_registered (true);
+ }
+ }
+ }
- if (transport->wait_strategy ()->non_blocking () == 0 &&
- transport->orb_core ()->client_factory ()->use_cleanup_options ())
- {
- if (!transport->wait_strategy ()->is_registered())
- {
- ACE_Event_Handler * const eh =
- transport->event_handler_i ();
-
- ACE_Reactor * const r =
- transport->orb_core ()->reactor ();
-
- if (r->register_handler (eh, ACE_Event_Handler::READ_MASK) == -1)
- {
- if (TAO_debug_level > 0)
- ACE_ERROR ((LM_ERROR,
+ }
+ else
+ {
+ if (TAO_debug_level > 4)
+ ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("TAO (%P|%t) - Synch_Oneway_Invocation::")
- ACE_TEXT ("remote_oneway transport[%d] registration with")
- ACE_TEXT ("reactor returned an error\n"),
- transport->id ()));
- }
- else
- {
- // Only set this flag when registration succeeds
- transport->wait_strategy ()->is_registered (true);
- }
- }
- }
+ ACE_TEXT ("remote_oneway, queueing message\n")));
- }
- else
- {
- if (TAO_debug_level > 4)
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("TAO (%P|%t) - Synch_Oneway_Invocation::")
- ACE_TEXT ("remote_oneway, queueing message\n")));
-
- if (transport->format_queue_message (cdr,
- max_wait_time,
- this->resolver_.stub()) != 0)
- {
- s = TAO_INVOKE_FAILURE;
- }
- }
- }
+ if (transport->format_queue_message (cdr,
+ max_wait_time,
+ this->resolver_.stub()) != 0)
+ {
+ s = TAO_INVOKE_FAILURE;
+ }
+ }
+ }
#if TAO_HAS_INTERCEPTORS == 1
s = this->receive_other_interception ();