diff options
author | Phil Mesnier <mesnierp@ociweb.com> | 2017-04-02 07:27:45 -0500 |
---|---|---|
committer | Phil Mesnier <mesnierp@ociweb.com> | 2017-04-02 07:28:50 -0500 |
commit | bbf57e200c60ae961a4ef8d15772c89d6a24b524 (patch) | |
tree | 9a4a16680f57146e797e44b8f9e27f46f6fedfb8 | |
parent | 21017ce12a93b2f0cb6059217e18bbf25e2abf35 (diff) | |
download | ATCD-bbf57e200c60ae961a4ef8d15772c89d6a24b524.tar.gz |
Misc. fixes for coverity issues an test output.
3 files changed, 19 insertions, 24 deletions
diff --git a/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Naming_Replication_Manager.cpp b/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Naming_Replication_Manager.cpp index ce69843d5a6..ae540b2cd65 100644 --- a/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Naming_Replication_Manager.cpp +++ b/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Naming_Replication_Manager.cpp @@ -81,7 +81,9 @@ TAO_FT_Naming_Replication_Manager::TAO_FT_Naming_Replication_Manager (TAO_FT_Nam to_send_ (10), endpoint_ (owner.ft_endpoint ()), update_delay_ (owner.ft_update_delay ()), - replica_ior_ () + replica_ior_ (), + send_combos_ (false), + refresh_peer_ (false) { } diff --git a/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Naming_Server.cpp b/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Naming_Server.cpp index 506d4efafde..af033e0e448 100644 --- a/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Naming_Server.cpp +++ b/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Naming_Server.cpp @@ -129,11 +129,11 @@ TAO_FT_Naming_Server::update_info (FT_Naming::UpdateInfoSeq &infos) CORBA::ULong count = infos.length(); FT_Naming::UpdateInfo* guts = infos.get_buffer(true); - FT_Naming::UpdateInfoSeq* block = 0; + FT_Naming::UpdateInfoSeq_var block = 0; ACE_NEW(block, FT_Naming::UpdateInfoSeq (count,count,guts,true)); { ACE_GUARD(TAO_SYNCH_MUTEX, guard, this->info_lock_); - this->u_infos_.enqueue_tail (block); + this->u_infos_.enqueue_tail (block._retn()); } this->orb_->orb_core ()->reactor ()->notify (&this->info_notifier_); diff --git a/TAO/orbsvcs/tests/FT_Naming/Replication/client.cpp b/TAO/orbsvcs/tests/FT_Naming/Replication/client.cpp index e8b2620e2a5..315a7f9ac0d 100644 --- a/TAO/orbsvcs/tests/FT_Naming/Replication/client.cpp +++ b/TAO/orbsvcs/tests/FT_Naming/Replication/client.cpp @@ -218,7 +218,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) } catch (const CosNaming::NamingContext::NotFound& ex) { - ex._tao_print_exception ("Unable to resolve object from replica.\n"); + ACE_ERROR ((ACE_TEXT("Did not resolve object from replica on first.\n"))); // Try again... try { @@ -227,7 +227,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) // We did find the object on the replica, but only after a wait. // This would be caused by a race condition to access the variable. ACE_ERROR ((LM_ERROR, - "Object appeared after a short wait.\n")); + ACE_TEXT("Object appeared after a short wait.\n"))); } catch (const CosNaming::NamingContext::NotFound& second_ex) { @@ -290,7 +290,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) } catch (const CosNaming::NamingContext::NotFound& ex) { - ex._tao_print_exception ("Unable to resolve wide context object from replica.\n"); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT("Unable to resolve wide context object from replica.\n"))); // Try again to see if it just was a race condition try { @@ -298,12 +298,12 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) root_context_2->resolve (wide); // We did find the object on the replica, but only after a wait. // This would be caused by a race condition to access the variable. - ACE_ERROR ((LM_ERROR, - "Object appeared after a short wait.\n")); + ACE_DEBUG ((LM_DEBUG, + ACE_TEXT("Object appeared after a short wait.\n"))); } catch (const CosNaming::NamingContext::NotFound& second_ex) { - second_ex._tao_print_exception ("It really is not there. Failing...\n"); + second_ex._tao_print_exception (ACE_TEXT ("It really is not there. Failing...\n")); return -1; } } @@ -411,7 +411,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) // Not on replica --- as it should be. if (retried) // Was found on the retry ACE_ERROR ((LM_ERROR, - "Was removed after short wait.\n")); + ACE_TEXT("Was removed after short wait.\n"))); } } catch (const CORBA::Exception& ex) @@ -441,9 +441,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) } catch (const CORBA::Exception& ex) { - ex._tao_print_exception ( - ACE_TEXT ( - "Unable to resolve object from redundant server")); + ex._tao_print_exception (ACE_TEXT ("Unable to resolve object from redundant server")); return -1; } @@ -499,8 +497,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) } catch (const CORBA::Exception& ex) { - ex._tao_print_exception ( - ACE_TEXT ("Unexpected Exception received.\n")); + ex._tao_print_exception (ACE_TEXT ("Unexpected Exception received.\n")); return -1; } @@ -524,8 +521,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) } catch (const CORBA::Exception& ex) { - ex._tao_print_exception ( - ACE_TEXT ("Unexpected Exception received.\n")); + ex._tao_print_exception (ACE_TEXT ("Unexpected Exception received.\n")); return -1; } @@ -581,8 +577,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) catch (const CORBA::Exception& ex) { ex._tao_print_exception ( - ACE_TEXT ( - "Unable to resolve deep context from redundant server")); + ACE_TEXT ("Unable to resolve deep context from redundant server")); return -1; } @@ -629,8 +624,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) ACE_UINT32 usecs = ACE_UINT32(elapsed_time / gsf); double secs = usecs / 1000000.0; - ACE_DEBUG ((LM_DEBUG, - "Bound %i objects in %.2f secs\n", + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Bound %i objects in %.2f secs\n"), test_runs, secs)); // Test how long it takes to resolve @@ -650,7 +644,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) secs = ((ACE_INT32) usecs) / 1000000.0; ACE_DEBUG ((LM_DEBUG, - "Resolved %i objects in %.2f secs\n", + ACE_DEBUG ("Resolved %i objects in %.2f secs\n"), test_runs, secs)); // Test how long it takes to unbind @@ -669,8 +663,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) usecs = ACE_UINT32(elapsed_time / gsf); secs = ((ACE_INT32) usecs) / 1000000.0; - ACE_DEBUG ((LM_DEBUG, - "Unbound %i objects in %.2f secs\n", + ACE_DEBUG ((LM_DEBUG, ACE_TEXT("Unbound %i objects in %.2f secs\n"), test_runs, secs)); |