diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2014-11-10 11:14:32 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2014-11-10 11:14:32 +0000 |
commit | 885f75de7f993ba47a92aa81aa56eda1b51940fa (patch) | |
tree | ab728eae5848a235cd809db3959a5dd91401450e | |
parent | 0c987338dd7306689ed6b5a6d5a83637a0e778ab (diff) | |
download | ATCD-885f75de7f993ba47a92aa81aa56eda1b51940fa.tar.gz |
Mon Nov 10 11:12:45 UTC 2014 Johnny Willemsen <jwillemsen@remedy.nl>
* orbsvcs/orbsvcs/CosEvent/CEC_Default_Factory.cpp:
Initialise pointers with 0
* orbsvcs/orbsvcs/CosEvent/CEC_Factory.h:
* orbsvcs/tests/CosEvent/Timeout/TestEventConsumer_i.cpp:
* orbsvcs/tests/CosEvent/Timeout/run_test.pl:
* orbsvcs/tests/CosEvent/lib/Counting_Consumer.cpp:
Layout changes
* orbsvcs/tests/CosEvent/Timeout/TimeoutTestMain.cpp:
shutdown s_orb when it is not nil, fixes valgrind reported
leaks at shutdown
-rw-r--r-- | TAO/ChangeLog | 15 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/CosEvent/CEC_Default_Factory.cpp | 8 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/CosEvent/CEC_Factory.h | 2 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/CosEvent/Timeout/TestEventConsumer_i.cpp | 2 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/CosEvent/Timeout/TimeoutTestMain.cpp | 11 | ||||
-rwxr-xr-x | TAO/orbsvcs/tests/CosEvent/Timeout/run_test.pl | 1 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/CosEvent/lib/Counting_Consumer.cpp | 2 |
7 files changed, 29 insertions, 12 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index 080b769cfc2..e391200b1cb 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,18 @@ +Mon Nov 10 11:12:45 UTC 2014 Johnny Willemsen <jwillemsen@remedy.nl> + + * orbsvcs/orbsvcs/CosEvent/CEC_Default_Factory.cpp: + Initialise pointers with 0 + + * orbsvcs/orbsvcs/CosEvent/CEC_Factory.h: + * orbsvcs/tests/CosEvent/Timeout/TestEventConsumer_i.cpp: + * orbsvcs/tests/CosEvent/Timeout/run_test.pl: + * orbsvcs/tests/CosEvent/lib/Counting_Consumer.cpp: + Layout changes + + * orbsvcs/tests/CosEvent/Timeout/TimeoutTestMain.cpp: + shutdown s_orb when it is not nil, fixes valgrind reported + leaks at shutdown + Mon Nov 10 11:02:11 UTC 2014 Martin Corino <mcorino@remedy.nl> * orbsvcs/orbsvcs/CosEvent/CEC_Event_Loader.cpp: diff --git a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_Default_Factory.cpp b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_Default_Factory.cpp index fd7a706fa0b..7780681aaf0 100644 --- a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_Default_Factory.cpp +++ b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_Default_Factory.cpp @@ -550,7 +550,7 @@ TAO_CEC_Default_Factory::destroy_supplier_admin (TAO_CEC_TypedSupplierAdmin *x) TAO_CEC_ProxyPushSupplier* TAO_CEC_Default_Factory::create_proxy_push_supplier (TAO_CEC_EventChannel *ec) { - TAO_CEC_ProxyPushSupplier *created; + TAO_CEC_ProxyPushSupplier *created = 0; ACE_Time_Value timeout = this->consumer_control_ ? this->consumer_timeout_ : ACE_Time_Value::zero; ACE_NEW_RETURN (created, TAO_CEC_ProxyPushSupplier (ec, timeout), 0); @@ -561,7 +561,7 @@ TAO_CEC_Default_Factory::create_proxy_push_supplier (TAO_CEC_EventChannel *ec) TAO_CEC_ProxyPushSupplier* TAO_CEC_Default_Factory::create_proxy_push_supplier (TAO_CEC_TypedEventChannel *ec) { - TAO_CEC_ProxyPushSupplier *created; + TAO_CEC_ProxyPushSupplier *created = 0; ACE_Time_Value timeout = this->consumer_control_ ? this->consumer_timeout_ : ACE_Time_Value::zero; ACE_NEW_RETURN (created, TAO_CEC_ProxyPushSupplier (ec, timeout), 0); @@ -594,7 +594,7 @@ TAO_CEC_Default_Factory::destroy_proxy_pull_supplier (TAO_CEC_ProxyPullSupplier TAO_CEC_ProxyPushConsumer* TAO_CEC_Default_Factory::create_proxy_push_consumer (TAO_CEC_EventChannel *ec) { - TAO_CEC_ProxyPushConsumer *created; + TAO_CEC_ProxyPushConsumer *created = 0; ACE_Time_Value timeout = this->supplier_control_ ? this->supplier_timeout_ : ACE_Time_Value::zero; ACE_NEW_RETURN (created, TAO_CEC_ProxyPushConsumer (ec, timeout), 0); @@ -605,7 +605,7 @@ TAO_CEC_Default_Factory::create_proxy_push_consumer (TAO_CEC_EventChannel *ec) TAO_CEC_TypedProxyPushConsumer* TAO_CEC_Default_Factory::create_proxy_push_consumer (TAO_CEC_TypedEventChannel *ec) { - TAO_CEC_TypedProxyPushConsumer *created; + TAO_CEC_TypedProxyPushConsumer *created = 0; ACE_Time_Value timeout = this->supplier_control_ ? this->supplier_timeout_ : ACE_Time_Value::zero; ACE_NEW_RETURN (created, TAO_CEC_TypedProxyPushConsumer (ec, timeout), 0); diff --git a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_Factory.h b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_Factory.h index 787bdca5177..f5b3559784b 100644 --- a/TAO/orbsvcs/orbsvcs/CosEvent/CEC_Factory.h +++ b/TAO/orbsvcs/orbsvcs/CosEvent/CEC_Factory.h @@ -26,7 +26,7 @@ #if defined (TAO_HAS_TYPED_EVENT_CHANNEL) #include "tao/AnyTypeCode/AnyTypeCode_methods.h" -#endif +#endif /* TAO_HAS_TYPED_EVENT_CHANNEL */ #include "tao/Policy_ForwardC.h" #include "tao/Versioned_Namespace.h" diff --git a/TAO/orbsvcs/tests/CosEvent/Timeout/TestEventConsumer_i.cpp b/TAO/orbsvcs/tests/CosEvent/Timeout/TestEventConsumer_i.cpp index ca61bc932a7..a49ab22c6d3 100644 --- a/TAO/orbsvcs/tests/CosEvent/Timeout/TestEventConsumer_i.cpp +++ b/TAO/orbsvcs/tests/CosEvent/Timeout/TestEventConsumer_i.cpp @@ -4,7 +4,6 @@ #include "ace/Log_Msg.h" - TestEventConsumer_i::TestEventConsumer_i (CORBA::ORB_ptr orb, bool hang) : orb_ (CORBA::ORB::_duplicate (orb)), hang_ (hang), @@ -39,7 +38,6 @@ TestEventConsumer_i::ORB_task::svc () return 0; } - void TestEventConsumer_i::push (const CORBA::Any & data) { diff --git a/TAO/orbsvcs/tests/CosEvent/Timeout/TimeoutTestMain.cpp b/TAO/orbsvcs/tests/CosEvent/Timeout/TimeoutTestMain.cpp index 7fbc7de4fe0..3f7f9c1a164 100644 --- a/TAO/orbsvcs/tests/CosEvent/Timeout/TimeoutTestMain.cpp +++ b/TAO/orbsvcs/tests/CosEvent/Timeout/TimeoutTestMain.cpp @@ -61,6 +61,7 @@ int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { // Initialize the ORB. CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); + CORBA::ORB_var s_orb; // Find the Naming Service. CORBA::Object_var obj = orb->resolve_initial_references ("NameService"); @@ -133,8 +134,8 @@ int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) int no_args = 0; ACE_TCHAR **no_argv = 0; - CORBA::ORB_var s_orb = CORBA::ORB_init (no_args, no_argv, - "Supplier_pure_client_ORB"); + s_orb = CORBA::ORB_init (no_args, no_argv, + "Supplier_pure_client_ORB"); CORBA::Object_var s_ec_obj = s_orb->string_to_object (ec_str.in ()); @@ -167,6 +168,12 @@ int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) orb->run (); ACE_Thread_Manager::instance ()->wait (); + + if (!CORBA::is_nil (s_orb.in ())) + { + s_orb->destroy (); + } + orb->destroy (); return 0; } diff --git a/TAO/orbsvcs/tests/CosEvent/Timeout/run_test.pl b/TAO/orbsvcs/tests/CosEvent/Timeout/run_test.pl index 76f860d3f32..0733beabda8 100755 --- a/TAO/orbsvcs/tests/CosEvent/Timeout/run_test.pl +++ b/TAO/orbsvcs/tests/CosEvent/Timeout/run_test.pl @@ -116,7 +116,6 @@ if ($client_status != 0) { $SV2->Kill (); $SV1->Kill (); - $server1->DeleteFile($ior1file); $server2->DeleteFile($ior2file); $server2->DeleteFile($ior1file); diff --git a/TAO/orbsvcs/tests/CosEvent/lib/Counting_Consumer.cpp b/TAO/orbsvcs/tests/CosEvent/lib/Counting_Consumer.cpp index 92c6b7f9f71..cf49bf0f69b 100644 --- a/TAO/orbsvcs/tests/CosEvent/lib/Counting_Consumer.cpp +++ b/TAO/orbsvcs/tests/CosEvent/lib/Counting_Consumer.cpp @@ -3,8 +3,6 @@ #include "Counting_Consumer.h" #include "ace/OS_NS_unistd.h" - - CEC_Counting_Consumer::CEC_Counting_Consumer (const char* name) : event_count (0), disconnect_count (0), |