summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbdullah Sowayan <sowayan@users.noreply.github.com>2008-06-16 00:55:02 +0000
committerAbdullah Sowayan <sowayan@users.noreply.github.com>2008-06-16 00:55:02 +0000
commitfdbb34bf50e4c67dc355e922a87849c706e1d699 (patch)
tree2d88dd1435fe862e009b80bfbf022273eba55f8d
parent31953125c1968dd60753522ff715e3410f56933b (diff)
downloadATCD-fdbb34bf50e4c67dc355e922a87849c706e1d699.tar.gz
Mon Jun 16 00:51:02 UTC 2008 Abdullah Sowayan <abdullah.sowayan@lmco.com>
-rw-r--r--TAO/ChangeLog60
-rw-r--r--TAO/tests/AMI/ami_test_i.h5
-rw-r--r--TAO/tests/Bug_1361_Regression/Server_Thread_Pool.cpp2
-rw-r--r--TAO/tests/Bug_1383_Regression/SimpleClient.cpp151
-rw-r--r--TAO/tests/Bug_1383_Regression/SimpleServer.cpp21
-rw-r--r--TAO/tests/Bug_1383_Regression/simple_i.cpp20
-rw-r--r--TAO/tests/Bug_1383_Regression/simple_i.h11
-rw-r--r--TAO/tests/Bug_1676_Regression/Hello.cpp80
-rw-r--r--TAO/tests/Bug_1676_Regression/Hello.h16
-rw-r--r--TAO/tests/Bug_1676_Regression/client.cpp44
-rw-r--r--TAO/tests/Bug_2084_Regression/Client_Task.cpp4
-rw-r--r--TAO/tests/Bug_2243_Regression/ORB_object_to_string.cpp70
-rw-r--r--TAO/tests/Bug_2289_Regression/client.cpp8
-rw-r--r--TAO/tests/Bug_2319_Regression/server.cpp205
-rw-r--r--TAO/tests/Bug_2417_Regression/client.cpp71
-rw-r--r--TAO/tests/Bug_2417_Regression/publisher_impl.h23
-rw-r--r--TAO/tests/Bug_2417_Regression/server.cpp105
-rw-r--r--TAO/tests/Bug_2417_Regression/subscriber_impl.cpp18
-rw-r--r--TAO/tests/Bug_2417_Regression/subscriber_impl.h27
-rw-r--r--TAO/tests/Bug_2678_Regression/server.cpp5
-rw-r--r--TAO/tests/Bug_2768_Regression/client.cpp2
-rw-r--r--TAO/tests/Bug_2768_Regression/server.cpp74
-rw-r--r--TAO/tests/Bug_2805_Regression/ami_test_i.h2
-rw-r--r--TAO/tests/Bug_933_Regression/MessengerClient.cpp2
-rw-r--r--TAO/tests/CDR/growth.cpp10
-rw-r--r--TAO/tests/COIOP/Client_Task.cpp5
-rw-r--r--TAO/tests/CodeSets/simple/client.cpp4
-rw-r--r--TAO/tests/Collocation_Exception_Test/Client_Task.cpp6
-rw-r--r--TAO/tests/Collocation_Oneway_Tests/Client_Task.cpp6
-rw-r--r--TAO/tests/Collocation_Tests/Client_Task.cpp6
-rw-r--r--TAO/tests/DII_AMI_Forward/server.cpp81
-rw-r--r--TAO/tests/DII_AMI_Forward/test_i.cpp10
-rw-r--r--TAO/tests/DII_AMI_Forward/test_i.h20
-rw-r--r--TAO/tests/DII_Collocation_Tests/oneway/Client_Task.cpp4
-rw-r--r--TAO/tests/DII_Collocation_Tests/twoway/Client_Task.cpp4
-rw-r--r--TAO/tests/Faults/ping.cpp2
-rw-r--r--TAO/tests/HandleExhaustion/server.cpp51
-rw-r--r--TAO/tests/ICMG_Any_Bug/Hello.cpp4
-rw-r--r--TAO/tests/ICMG_Any_Bug/server.cpp6
-rw-r--r--TAO/tests/MProfile/client.cpp2
-rw-r--r--TAO/tests/Monitor/Marshal_Buffer/client.cpp28
-rw-r--r--TAO/tests/Monitor/Marshal_Buffer/server.cpp18
-rw-r--r--TAO/tests/OBV/Collocated/Forward/Client_Task.cpp4
-rw-r--r--TAO/tests/OBV/Supports/Supports_Test_impl.cpp4
-rw-r--r--TAO/tests/OBV/Supports/server.cpp50
-rw-r--r--TAO/tests/Portable_Interceptors/Bug_1559/client_interceptor.cpp2
-rw-r--r--TAO/tests/Portable_Interceptors/Bug_2510_Regression/client.cpp11
-rw-r--r--TAO/tests/RTCORBA/common_args.cpp6
-rw-r--r--TAO/tests/RTScheduling/DT_Spawn/Thread_Action.h22
-rw-r--r--TAO/tests/RTScheduling/DT_Spawn/test.cpp83
-rw-r--r--TAO/tests/RTScheduling/Scheduling_Interceptor/test_client.cpp6
-rw-r--r--TAO/tests/RTScheduling/Scheduling_Interceptor/test_server.cpp96
-rw-r--r--TAO/tests/RTScheduling/Thread_Cancel/test.cpp14
-rw-r--r--TAO/tests/RTScheduling/VoidData/test.h4
-rw-r--r--TAO/tests/Timed_Buffered_Oneways/client.cpp11
-rw-r--r--TAO/tests/objref_comparison_test/main.cpp33
56 files changed, 841 insertions, 798 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 1bfa624d57f..bc747b6af87 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,63 @@
+Mon Jun 16 00:51:02 UTC 2008 Abdullah Sowayan <abdullah.sowayan@lmco.com>
+
+ * tests/AMI/ami_test_i.h:
+ * tests/Bug_1361_Regression/Server_Thread_Pool.cpp:
+ * tests/Bug_1383_Regression/SimpleClient.cpp:
+ * tests/Bug_1383_Regression/SimpleServer.cpp:
+ * tests/Bug_1383_Regression/simple_i.h:
+ * tests/Bug_1383_Regression/simple_i.cpp:
+ * tests/Bug_1676_Regression/Hello.h:
+ * tests/Bug_1676_Regression/Hello.cpp:
+ * tests/Bug_1676_Regression/client.cpp:
+ * tests/Bug_2084_Regression/Client_Task.cpp:
+ * tests/Bug_2243_Regression/ORB_object_to_string.cpp:
+ * tests/Bug_2289_Regression/client.cpp:
+ * tests/Bug_2319_Regression/server.cpp:
+ * tests/Bug_2417_Regression/client.cpp:
+ * tests/Bug_2417_Regression/publisher_impl.h:
+ * tests/Bug_2417_Regression/server.cpp:
+ * tests/Bug_2417_Regression/subscriber_impl.h:
+ * tests/Bug_2417_Regression/subscriber_impl.cpp:
+ * tests/Bug_2678_Regression/server.cpp:
+ * tests/Bug_2768_Regression/client.cpp:
+ * tests/Bug_2768_Regression/server.cpp:
+ * tests/Bug_2805_Regression/ami_test_i.h:
+ * tests/Bug_933_Regression/MessengerClient.cpp:
+ * tests/CDR/growth.cpp:
+ * tests/COIOP/Client_Task.cpp:
+ * tests/CodeSets/simple/client.cpp:
+ * tests/Collocation_Exception_Test/Client_Task.cpp:
+ * tests/Collocation_Oneway_Tests/Client_Task.cpp:
+ * tests/Collocation_Tests/Client_Task.cpp:
+ * tests/DII_AMI_Forward/server.cpp:
+ * tests/DII_AMI_Forward/test_i.h:
+ * tests/DII_AMI_Forward/test_i.cpp:
+ * tests/DII_Collocation_Tests/oneway/Client_Task.cpp:
+ * tests/DII_Collocation_Tests/twoway/Client_Task.cpp:
+ * tests/Faults/ping.cpp:
+ * tests/HandleExhaustion/server.cpp:
+ * tests/ICMG_Any_Bug/Hello.cpp:
+ * tests/ICMG_Any_Bug/server.cpp:
+ * tests/MProfile/client.cpp:
+ * tests/Monitor/Marshal_Buffer/client.cpp:
+ * tests/Monitor/Marshal_Buffer/server.cpp:
+ * tests/OBV/Collocated/Forward/Client_Task.cpp:
+ * tests/OBV/Supports/Supports_Test_impl.cpp:
+ * tests/OBV/Supports/server.cpp:
+ * tests/Portable_Interceptors/Bug_1559/client_interceptor.cpp:
+ * tests/Portable_Interceptors/Bug_2510_Regression/client.cpp:
+ * tests/RTCORBA/common_args.cpp:
+ * tests/RTScheduling/DT_Spawn/Thread_Action.h:
+ * tests/RTScheduling/DT_Spawn/test.cpp:
+ * tests/RTScheduling/Scheduling_Interceptor/test_client.cpp:
+ * tests/RTScheduling/Scheduling_Interceptor/test_server.cpp:
+ * tests/RTScheduling/Thread_Cancel/test.cpp:
+ * tests/RTScheduling/VoidData/test.h:
+ * tests/Timed_Buffered_Oneways/client.cpp:
+ * tests/objref_comparison_test/main.cpp:
+
+ Untabify.
+
Sun Jun 15 15:59:40 UTC 2008 Abdullah Sowayan <abdullah.sowayan@lmco.com>
* orbsvcs/PSS/PSDL_l.cpp:
diff --git a/TAO/tests/AMI/ami_test_i.h b/TAO/tests/AMI/ami_test_i.h
index 9ff1fe8cfb8..06ea83ef20f 100644
--- a/TAO/tests/AMI/ami_test_i.h
+++ b/TAO/tests/AMI/ami_test_i.h
@@ -27,8 +27,9 @@ class AMI_Test_i : public POA_A::AMI_Test
public:
/// ctor
AMI_Test_i (CORBA::ORB_ptr orb,
- CORBA::Long in_l = 0, const char * in_str = 0,
- bool check_params = false);
+ CORBA::Long in_l = 0,
+ const char * in_str = 0,
+ bool check_params = false);
// The AMI_Test methods.
CORBA::Long foo (CORBA::Long_out out_l,
diff --git a/TAO/tests/Bug_1361_Regression/Server_Thread_Pool.cpp b/TAO/tests/Bug_1361_Regression/Server_Thread_Pool.cpp
index 7395e2c733e..897dc94f960 100644
--- a/TAO/tests/Bug_1361_Regression/Server_Thread_Pool.cpp
+++ b/TAO/tests/Bug_1361_Regression/Server_Thread_Pool.cpp
@@ -164,7 +164,7 @@ Thread_Pool::svc (void)
}
catch (const CORBA::Exception&)
{
- // Just forget the exception and continue
+ // Just forget the exception and continue
}
}
diff --git a/TAO/tests/Bug_1383_Regression/SimpleClient.cpp b/TAO/tests/Bug_1383_Regression/SimpleClient.cpp
index de2d75756f6..ed18d6ab57b 100644
--- a/TAO/tests/Bug_1383_Regression/SimpleClient.cpp
+++ b/TAO/tests/Bug_1383_Regression/SimpleClient.cpp
@@ -12,101 +12,106 @@ CORBA::ORB_var orb;
ACE_THR_FUNC_RETURN RunFunc(void *)
{
ACE_DEBUG ((LM_DEBUG, "running the orb\n"));
- orb->run();
+ orb->run();
ACE_DEBUG ((LM_DEBUG, "done running orb\n"));
- return 0;
+ return 0;
}
int main(int argc, char * argv[])
{
- // initialize the ORB
- orb = CORBA::ORB_init(argc, argv);
+ // initialize the ORB
+ orb = CORBA::ORB_init(argc, argv);
- // Get the "RootPOA"
+ // Get the "RootPOA"
CORBA::Object_var obj = orb->resolve_initial_references("RootPOA");
PortableServer::POA_var poa = PortableServer::POA::_narrow(obj.in ());
- // activate its managers so it can handle incoming requests
- poa->the_POAManager()->activate();
+ // activate its managers so it can handle incoming requests
+ poa->the_POAManager()->activate();
- // get a thread going to handle incoming requests
- ACE_Thread::spawn(RunFunc);
+ // get a thread going to handle incoming requests
+ ACE_Thread::spawn(RunFunc);
- // we could also use the corbaloc syntax to get a reference to the
- // object. This will cause the orb to talk directly to the other
- // orb with no name service or common file involved.
+ // we could also use the corbaloc syntax to get a reference to the
+ // object. This will cause the orb to talk directly to the other
+ // orb with no name service or common file involved.
obj = orb->string_to_object("corbaloc::localhost:9999/Simple");
- if (CORBA::is_nil(obj.in ())) {
- ACE_ERROR ((LM_ERROR, "could not get reference\n"));
- return 1;
- }
+ if (CORBA::is_nil(obj.in ()))
+ {
+ ACE_ERROR ((LM_ERROR, "could not get reference\n"));
+ return 1;
+ }
- // narrow the reference to the particular type we wish to deal with
+ // narrow the reference to the particular type we wish to deal with
Simple_var simple = Simple::_narrow(obj.in ());
- if (CORBA::is_nil(simple.in ())) {
- ACE_ERROR ((LM_ERROR, "could not get reference\n"));
- return 1;
- }
-
- // create an object reference that has a bogus value for the first
- // profile
- obj = orb->resolve_initial_references("IORManipulation");
- TAO_IOP::TAO_IOR_Manipulation_var iorm =
- TAO_IOP::TAO_IOR_Manipulation::_narrow(obj.in());
-
- // Status: The following scenarios appear to work:
- // - first profile invalid host name, second profile valid.
- // - first profile invalid ip number, second profiel valid.
- // - first profiel invalid port number, second profile valid.
- //
- // The following causes a core dump of the server:
- // - first and second invalid
- //
- // Note that he iormanip is being used since it is not practical
- // to have a test case that depends on a VPN being present.
- //
+ if (CORBA::is_nil(simple.in ()))
+ {
+ ACE_ERROR ((LM_ERROR, "could not get reference\n"));
+ return 1;
+ }
+
+ // create an object reference that has a bogus value for the first
+ // profile
+ obj = orb->resolve_initial_references("IORManipulation");
+ TAO_IOP::TAO_IOR_Manipulation_var iorm =
+ TAO_IOP::TAO_IOR_Manipulation::_narrow(obj.in());
+
+ // Status: The following scenarios appear to work:
+ // - first profile invalid host name, second profile valid.
+ // - first profile invalid ip number, second profiel valid.
+ // - first profiel invalid port number, second profile valid.
+ //
+ // The following causes a core dump of the server:
+ // - first and second invalid
+ //
+ // Note that he iormanip is being used since it is not practical
+ // to have a test case that depends on a VPN being present.
+ //
CORBA::Object_var name1 =
- orb->string_to_object ("corbaloc:iiop:10.0.2.3:6060/xyz");
+ orb->string_to_object ("corbaloc:iiop:10.0.2.3:6060/xyz");
CORBA::Object_var name2 =
- orb->string_to_object ("corbaloc:iiop:daisnot:7070/xyz");
+ orb->string_to_object ("corbaloc:iiop:daisnot:7070/xyz");
CORBA::String_var name1_ior = orb->object_to_string(name1.in());
CORBA::String_var name2_ior = orb->object_to_string(name2.in());
- // create a callback object
- Callee_i * callee_i = new Callee_i;
- // get the CORBA reference
- PortableServer::ObjectId_var id =
- poa->activate_object (callee_i);
-
- CORBA::Object_var object_act = poa->id_to_reference (id.in ());
-
- Callee_var callee = Callee::_narrow (object_act.in ());
-
- if (CORBA::is_nil(callee.in ())) {
- ACE_ERROR ((LM_ERROR, "could not get callback object\n"));
- return 1;
- } else {
- CORBA::String_var str = orb->object_to_string(callee.in ());
- FILE *output_file= ACE_OS::fopen ("ior", "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: ior\n"),
+ // create a callback object
+ Callee_i * callee_i = new Callee_i;
+ // get the CORBA reference
+ PortableServer::ObjectId_var id =
+ poa->activate_object (callee_i);
+
+ CORBA::Object_var object_act = poa->id_to_reference (id.in ());
+
+ Callee_var callee = Callee::_narrow (object_act.in ());
+
+ if (CORBA::is_nil(callee.in ()))
+ {
+ ACE_ERROR ((LM_ERROR, "could not get callback object\n"));
+ return 1;
+ }
+ else
+ {
+ CORBA::String_var str = orb->object_to_string(callee.in ());
+ FILE *output_file= ACE_OS::fopen ("ior", "w");
+ if (output_file == 0)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Cannot open output file for writing IOR: ior\n"),
1);
- ACE_OS::fprintf (output_file, "%s", str.in ());
- ACE_OS::fclose (output_file);
- }
-
- // create a reference with two profiles with the first on being
- // bogus. If things work as they should the callback should be
- // succesful with the ORB trying the second profile.
- TAO_IOP::TAO_IOR_Manipulation::IORList iors (2);
- iors.length (2);
- iors [0] = name1;
- iors [1] = name2;
+ ACE_OS::fprintf (output_file, "%s", str.in ());
+ ACE_OS::fclose (output_file);
+ }
+
+ // create a reference with two profiles with the first on being
+ // bogus. If things work as they should the callback should be
+ // succesful with the ORB trying the second profile.
+ TAO_IOP::TAO_IOR_Manipulation::IORList iors (2);
+ iors.length (2);
+ iors [0] = name1;
+ iors [1] = name2;
CORBA::Object_var merged = iorm->merge_iors(iors);
- Callee_var doubleCallee = Callee::_unchecked_narrow(merged.in());
+ Callee_var doubleCallee = Callee::_unchecked_narrow(merged.in());
ACE_DEBUG ((LM_DEBUG, "Profile count is %d\n",
iorm->get_profile_count(merged.in())));
@@ -119,5 +124,5 @@ int main(int argc, char * argv[])
orb->shutdown(1);
- return 0;
+ return 0;
}
diff --git a/TAO/tests/Bug_1383_Regression/SimpleServer.cpp b/TAO/tests/Bug_1383_Regression/SimpleServer.cpp
index db025f79365..6fd0cbe1707 100644
--- a/TAO/tests/Bug_1383_Regression/SimpleServer.cpp
+++ b/TAO/tests/Bug_1383_Regression/SimpleServer.cpp
@@ -7,18 +7,21 @@
void advertise(CORBA::ORB_ptr orb, CORBA::Object_ptr obj)
{
// advertise our object in the IORTable so that it can be
- // accessed by a client using the "cobaloc" syntax
+ // accessed by a client using the "cobaloc" syntax
CORBA::String_var str = orb->object_to_string(obj);
CORBA::Object_var tmp = orb->resolve_initial_references("IORTable");
IORTable::Table_var iorTable = IORTable::Table::_narrow(tmp.in ());
- if (CORBA::is_nil(iorTable.in ())) {
- ACE_ERROR ((LM_ERROR, "could not get the IORTable, will not register\n"));
- } else {
- iorTable->rebind("Simple", str.in());
- ACE_DEBUG ((LM_DEBUG, "regisered\n"));
- }
- // we could also advertise the object reference to a naming and/or
- // trading service
+ if (CORBA::is_nil(iorTable.in ()))
+ {
+ ACE_ERROR ((LM_ERROR, "could not get the IORTable, will not register\n"));
+ }
+ else
+ {
+ iorTable->rebind("Simple", str.in());
+ ACE_DEBUG ((LM_DEBUG, "regisered\n"));
+ }
+ // we could also advertise the object reference to a naming and/or
+ // trading service
}
int main(int argc, char * argv[])
diff --git a/TAO/tests/Bug_1383_Regression/simple_i.cpp b/TAO/tests/Bug_1383_Regression/simple_i.cpp
index fb3b868ca90..db619308dbc 100644
--- a/TAO/tests/Bug_1383_Regression/simple_i.cpp
+++ b/TAO/tests/Bug_1383_Regression/simple_i.cpp
@@ -5,27 +5,25 @@
#include "ace/Reactor.h"
Simple_i::Simple_i(CORBA::ORB_ptr orb)
- : m_orb(orb->_duplicate(orb))
+ : m_orb(orb->_duplicate(orb))
{
}
void Simple_i::registerCallee(Callee_ptr value)
{
ACE_DEBUG ((LM_DEBUG, "registerCallee invoked\n"));
- // retain a reference so we can callback later
- m_callee = value->_duplicate(value);
+ // retain a reference so we can callback later
+ m_callee = value->_duplicate(value);
- // register a callback with the reactor so we can invoke the
- // callback method
+ // register a callback with the reactor so we can invoke the
+ // callback method
m_orb->orb_core()->reactor()->schedule_timer(this, 0, ACE_Time_Value(5));
}
-int Simple_i::handle_timeout(
- const ACE_Time_Value &,
- const void *
- )
+int Simple_i::handle_timeout(const ACE_Time_Value &,
+ const void *)
{
ACE_DEBUG ((LM_DEBUG, "timer expired\n"));
- m_callee->callback("got timeout");
- return 0;
+ m_callee->callback("got timeout");
+ return 0;
}
diff --git a/TAO/tests/Bug_1383_Regression/simple_i.h b/TAO/tests/Bug_1383_Regression/simple_i.h
index d03790b4684..f8c1a8285dc 100644
--- a/TAO/tests/Bug_1383_Regression/simple_i.h
+++ b/TAO/tests/Bug_1383_Regression/simple_i.h
@@ -9,16 +9,17 @@
#include "simpleS.h"
#include "calleeC.h"
-class Simple_i : public POA_Simple, ACE_Event_Handler {
+class Simple_i : public POA_Simple, ACE_Event_Handler
+{
public:
- Simple_i(CORBA::ORB_ptr orb);
+ Simple_i(CORBA::ORB_ptr orb);
void registerCallee(Callee_ptr value);
- int handle_timeout(const ACE_Time_Value & currentTime, const void * data);
+ int handle_timeout(const ACE_Time_Value & currentTime, const void * data);
private:
- CORBA::ORB_ptr m_orb;
- Callee_var m_callee;
+ CORBA::ORB_ptr m_orb;
+ Callee_var m_callee;
};
#endif
diff --git a/TAO/tests/Bug_1676_Regression/Hello.cpp b/TAO/tests/Bug_1676_Regression/Hello.cpp
index 5c007ea38aa..d1c31b7ac8d 100644
--- a/TAO/tests/Bug_1676_Regression/Hello.cpp
+++ b/TAO/tests/Bug_1676_Regression/Hello.cpp
@@ -19,62 +19,58 @@ Hello::get_string (void)
#endif
::Test::StringList *
-Hello::get_stringList (
- //
- )
+Hello::get_stringList ()
{
- Test::StringList * seq;
- ACE_NEW_RETURN (seq,
- Test::StringList(10),
- 0);
- seq->length(10);
- for (CORBA::ULong i = 0; i<seq->length(); i++)
- {
- char tmp[255] = {0};
- ACE_OS::sprintf(tmp, "Hello World %d", i);
- (*seq)[i] = CORBA::string_dup(tmp);
- }
+ Test::StringList * seq;
+ ACE_NEW_RETURN (seq,
+ Test::StringList(10),
+ 0);
+ seq->length(10);
+ for (CORBA::ULong i = 0; i<seq->length(); i++)
+ {
+ char tmp[255] = {0};
+ ACE_OS::sprintf(tmp, "Hello World %d", i);
+ (*seq)[i] = CORBA::string_dup(tmp);
+ }
- return seq;
+ return seq;
}
void
-Hello::get_stringList2 (
- ::CORBA::Boolean initialize,
- ::Test::StringList_out osl
- )
+Hello::get_stringList2 (::CORBA::Boolean initialize,
+ ::Test::StringList_out osl)
{
- // CORBA::String_var the_string = osl->length();
- // ACE_DEBUG ((LM_DEBUG, "(%P|%t) - Entering get_stringList2(%.4d)\n", osl));
+ // CORBA::String_var the_string = osl->length();
+ // ACE_DEBUG ((LM_DEBUG, "(%P|%t) - Entering get_stringList2(%.4d)\n", osl));
- if (initialize) {
- ACE_NEW (osl,
- Test::StringList(10));
+ if (initialize)
+ {
+ ACE_NEW (osl,
+ Test::StringList(10));
- osl->length(5);
- for (CORBA::ULong i = 0; i<osl->length(); i++)
- {
- char tmp[255] = {0};
- ACE_OS::sprintf(tmp, "Hello Again %d", i);
- (*osl)[i] = CORBA::string_dup(tmp);
- }
+ osl->length(5);
+ for (CORBA::ULong i = 0; i<osl->length(); i++)
+ {
+ char tmp[255] = {0};
+ ACE_OS::sprintf(tmp, "Hello Again %d", i);
+ (*osl)[i] = CORBA::string_dup(tmp);
+ }
}
}
void
-Hello::mod_stringList (
- ::Test::StringList & iosl
- )
+Hello::mod_stringList (::Test::StringList & iosl)
{
- // osl->length(10);
- for (CORBA::ULong i = 0; i<iosl.length(); i++)
- {
- char tmp[255] = {0};
- ACE_OS::sprintf(tmp, "Hello Client %d", i);
- if (i%2) {
- iosl[i] = CORBA::string_dup(tmp);
+ // osl->length(10);
+ for (CORBA::ULong i = 0; i<iosl.length(); i++)
+ {
+ char tmp[255] = {0};
+ ACE_OS::sprintf(tmp, "Hello Client %d", i);
+ if (i%2)
+ {
+ iosl[i] = CORBA::string_dup(tmp);
}
- }
+ }
}
void
diff --git a/TAO/tests/Bug_1676_Regression/Hello.h b/TAO/tests/Bug_1676_Regression/Hello.h
index 6c20db104e5..b7e293a5fe2 100644
--- a/TAO/tests/Bug_1676_Regression/Hello.h
+++ b/TAO/tests/Bug_1676_Regression/Hello.h
@@ -9,25 +9,19 @@
#include "TestS.h"
/// Implement the Test::Hello interface
-class Hello
- : public virtual POA_Test::Hello
+class Hello : public virtual POA_Test::Hello
{
public:
/// Constructor
Hello (CORBA::ORB_ptr orb);
// = The skeleton methods
- virtual ::Test::StringList * get_stringList (
- );
+ virtual ::Test::StringList * get_stringList ();
- virtual void get_stringList2 (
- ::CORBA::Boolean initialize,
- ::Test::StringList_out osl
- );
+ virtual void get_stringList2 (::CORBA::Boolean initialize,
+ ::Test::StringList_out osl);
- virtual void mod_stringList (
- ::Test::StringList & iosl
- );
+ virtual void mod_stringList (::Test::StringList & iosl);
virtual void shutdown (void);
diff --git a/TAO/tests/Bug_1676_Regression/client.cpp b/TAO/tests/Bug_1676_Regression/client.cpp
index 1f3e9589d0e..03a0f732496 100644
--- a/TAO/tests/Bug_1676_Regression/client.cpp
+++ b/TAO/tests/Bug_1676_Regression/client.cpp
@@ -65,22 +65,24 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
Test::StringList_var seq =
hello->get_stringList ();
- for (CORBA::ULong i = 0; i<seq->length(); i++) {
- CORBA::String_var the_string = CORBA::string_dup ((*seq)[i]);
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) - string returned <%s>\n",
- the_string.in ()));
- }
+ for (CORBA::ULong i = 0; i<seq->length(); i++)
+ {
+ CORBA::String_var the_string = CORBA::string_dup ((*seq)[i]);
+ ACE_DEBUG ((LM_DEBUG, "(%P|%t) - string returned <%s>\n",
+ the_string.in ()));
+ }
ACE_DEBUG ((LM_DEBUG, "\n(%P|%t) - get_stringList2 with initialization\n"));
Test::StringList_var seq2;
hello->get_stringList2(true, seq2.out());
- for (CORBA::ULong i = 0; i<seq2->length(); i++) {
- CORBA::String_var the_string = seq2.in()[i].in();
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) - string returned <%s>\n",
- the_string.in ()));
- }
+ for (CORBA::ULong i = 0; i<seq2->length(); i++)
+ {
+ CORBA::String_var the_string = seq2.in()[i].in();
+ ACE_DEBUG ((LM_DEBUG, "(%P|%t) - string returned <%s>\n",
+ the_string.in ()));
+ }
ACE_DEBUG ((LM_DEBUG, "\n(%P|%t) - get_stringList2 without initialization\n"));
@@ -90,11 +92,12 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
hello->mod_stringList(seq.inout());
- for (CORBA::ULong i = 0; i<seq->length(); i++) {
- CORBA::String_var the_string = CORBA::string_dup ((*seq)[i]);
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) - string returned <%s>\n",
- the_string.in ()));
- }
+ for (CORBA::ULong i = 0; i<seq->length(); i++)
+ {
+ CORBA::String_var the_string = CORBA::string_dup ((*seq)[i]);
+ ACE_DEBUG ((LM_DEBUG, "(%P|%t) - string returned <%s>\n",
+ the_string.in ()));
+ }
hello->shutdown ();
@@ -118,11 +121,12 @@ void get_stringList2(Test::Hello_var hello)
// Shutdown the ORB and block until the shutdown is complete.
hello->get_stringList2(false, seq2.out());
- for (CORBA::ULong i = 0; i<seq2->length(); i++) {
- CORBA::String_var the_string = seq2.in()[i].in ();
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) - string returned <%s>\n",
- the_string.in ()));
- }
+ for (CORBA::ULong i = 0; i<seq2->length(); i++)
+ {
+ CORBA::String_var the_string = seq2.in()[i].in ();
+ ACE_DEBUG ((LM_DEBUG, "(%P|%t) - string returned <%s>\n",
+ the_string.in ()));
+ }
}
catch (const CORBA::BAD_PARAM& )
{
diff --git a/TAO/tests/Bug_2084_Regression/Client_Task.cpp b/TAO/tests/Bug_2084_Regression/Client_Task.cpp
index 0219846bc87..344cdc5f847 100644
--- a/TAO/tests/Bug_2084_Regression/Client_Task.cpp
+++ b/TAO/tests/Bug_2084_Regression/Client_Task.cpp
@@ -13,8 +13,8 @@ ACE_RCSID(Bug_2084_Regression,
"$Id$")
Client_Task::Client_Task (const char *ior,
- CORBA::ORB_ptr corb,
- ACE_Thread_Manager *thr_mgr)
+ CORBA::ORB_ptr corb,
+ ACE_Thread_Manager *thr_mgr)
: ACE_Task_Base (thr_mgr)
, input_ (ior)
, corb_ (CORBA::ORB::_duplicate (corb))
diff --git a/TAO/tests/Bug_2243_Regression/ORB_object_to_string.cpp b/TAO/tests/Bug_2243_Regression/ORB_object_to_string.cpp
index b6f01416f55..c0ab3ab8f45 100644
--- a/TAO/tests/Bug_2243_Regression/ORB_object_to_string.cpp
+++ b/TAO/tests/Bug_2243_Regression/ORB_object_to_string.cpp
@@ -26,55 +26,59 @@ int
ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
try
- {
+ {
CORBA::ORB_var orb =
CORBA::ORB_init (argc, argv);
- // --------------------------------------------------------
- // Create an object (but don't narrow() it) so we can test
- // that we can stringify it later
- // --------------------------------------------------------
+ // --------------------------------------------------------
+ // Create an object (but don't narrow() it) so we can test
+ // that we can stringify it later
+ // --------------------------------------------------------
CORBA::Object_var object = orb->string_to_object (IOR);
CORBA::String_var object_ref_str = orb->object_to_string (object.in());
if (0 == object_ref_str.in())
- {
- ACE_DEBUG ((LM_ERROR,
- "\n"
- "ORB_object_to_string test failed with TAO test IOR.\n"));
- return 1;
- } else {
- ACE_DEBUG ((LM_INFO,
- "\n"
- "ORB_object_to_string test passed with TAO test IOR."));
- }
+ {
+ ACE_DEBUG ((LM_ERROR,
+ "\n"
+ "ORB_object_to_string test failed with TAO test IOR.\n"));
+ return 1;
+ }
+ else
+ {
+ ACE_DEBUG ((LM_INFO,
+ "\n"
+ "ORB_object_to_string test passed with TAO test IOR."));
+ }
object = orb->string_to_object (ORBIT2_IOR);
object_ref_str = orb->object_to_string (object.in());
- if (0 == object_ref_str.in()) {
- ACE_DEBUG ((LM_ERROR,
- "\n"
- "ORB_object_to_string test failed with ORBit2 test IOR.\n"));
- return 1;
- } else {
- ACE_DEBUG ((LM_INFO,
- "\n"
- "ORB_object_to_string test passed with ORBit2 test IOR."));
- }
-
- }
+ if (0 == object_ref_str.in())
+ {
+ ACE_DEBUG ((LM_ERROR,
+ "\n"
+ "ORB_object_to_string test failed with ORBit2 test IOR.\n"));
+ return 1;
+ }
+ else
+ {
+ ACE_DEBUG ((LM_INFO,
+ "\n"
+ "ORB_object_to_string test passed with ORBit2 test IOR."));
+ }
+ }
catch (const CORBA::Exception& ex)
{
ex._tao_print_exception ("Exception caught:");
ACE_DEBUG ((LM_ERROR,
- "\n"
- "ORB_object_to_string test failed.\n"));
+ "\n"
+ "ORB_object_to_string test failed.\n"));
return 1;
}
- ACE_DEBUG ((LM_INFO,
- "\n"
- "ORB_object_to_string test completed successfully.\n"));
+ ACE_DEBUG ((LM_INFO,
+ "\n"
+ "ORB_object_to_string test completed successfully.\n"));
- return 0;
+ return 0;
}
diff --git a/TAO/tests/Bug_2289_Regression/client.cpp b/TAO/tests/Bug_2289_Regression/client.cpp
index c836db9bc48..abb57eb74b1 100644
--- a/TAO/tests/Bug_2289_Regression/client.cpp
+++ b/TAO/tests/Bug_2289_Regression/client.cpp
@@ -115,12 +115,12 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
if (temp)
{
ACE_DEBUG ((LM_DEBUG, "Test succeeded\n"));
- }
+ }
else
{
- ACE_DEBUG ((LM_ERROR, "Test failed\n"));
- result = 1;
- }
+ ACE_DEBUG ((LM_ERROR, "Test failed\n"));
+ result = 1;
+ }
//hello->shutdown ();
diff --git a/TAO/tests/Bug_2319_Regression/server.cpp b/TAO/tests/Bug_2319_Regression/server.cpp
index ca59cc05a1c..ec1ab8dfec3 100644
--- a/TAO/tests/Bug_2319_Regression/server.cpp
+++ b/TAO/tests/Bug_2319_Regression/server.cpp
@@ -24,21 +24,17 @@ const char *ior_file = "test.ior";
/*** Servant Declaration ***/
/***************************/
-class ST_AMH_Servant
- : public virtual POA_Test::AMH_Roundtrip
- {
- public:
-
- ST_AMH_Servant (CORBA::ORB_ptr orb);
-
- void test_method (Test::AMH_RoundtripResponseHandler_ptr _tao_rh,
- Test::Timestamp send_time);
-
- protected:
- CORBA::ORB_ptr orb_;
- };
+class ST_AMH_Servant : public virtual POA_Test::AMH_Roundtrip
+{
+public:
+ ST_AMH_Servant (CORBA::ORB_ptr orb);
+ void test_method (Test::AMH_RoundtripResponseHandler_ptr _tao_rh,
+ Test::Timestamp send_time);
+protected:
+ CORBA::ORB_ptr orb_;
+};
/****************************/
/**** Server Declaration ****/
@@ -49,48 +45,44 @@ class ST_AMH_Servant
all the AMH servers and 'hides' all the common ORB functions.
*/
class ST_AMH_Server
- {
- public:
- ST_AMH_Server (int *argc, char **argv);
- virtual ~ST_AMH_Server ();
-
- /// ORB inititalisation stuff
- int start_orb_and_poa (const CORBA::ORB_var &_orb);
-
- /// register the servant with the poa
- virtual void register_servant (ST_AMH_Servant *servant);
+{
+public:
+ ST_AMH_Server (int *argc, char **argv);
+ virtual ~ST_AMH_Server ();
- /// orb-perform_work () abstraction
- virtual void run_event_loop ();
+ /// ORB inititalisation stuff
+ int start_orb_and_poa (const CORBA::ORB_var &_orb);
- public:
+ /// register the servant with the poa
+ virtual void register_servant (ST_AMH_Servant *servant);
- protected:
- int *argc_;
- char **argv_;
- char *ior_output_file_;
- CORBA::ORB_ptr orb_;
- PortableServer::POA_var root_poa_;
+ /// orb-perform_work () abstraction
+ virtual void run_event_loop ();
- private:
- /// Write servant IOR to file specified with the '-o' option
- int write_ior_to_file (CORBA::String_var ior);
- };
+public:
+protected:
+ int *argc_;
+ char **argv_;
+ char *ior_output_file_;
+ CORBA::ORB_ptr orb_;
+ PortableServer::POA_var root_poa_;
+private:
+ /// Write servant IOR to file specified with the '-o' option
+ int write_ior_to_file (CORBA::String_var ior);
+};
// ------------------------------------------------------------------------
// ------------------------------------------------------------------------
// ------------------------------------------------------------------------
-
-
// ------------------------------------------------------------------------
//
int parse_args (int argc, char *argv[])
{
-ACE_Get_Opt get_opts (argc, argv, "n:");
-int c;
+ ACE_Get_Opt get_opts (argc, argv, "n:");
+ int c;
while ((c = get_opts ()) != -1)
switch (c)
@@ -104,9 +96,6 @@ int c;
return 0;
}
-
-
-
/***************************/
/*** Servant Definition ***/
/***************************/
@@ -124,21 +113,17 @@ void
ST_AMH_Servant::test_method (Test::AMH_RoundtripResponseHandler_ptr _tao_rh,
Test::Timestamp send_time)
{
- ACE_OS::printf("Recieved Timestamp # %d \n", calls_received);
- ACE_OS::sleep(1);
- calls_received++;
+ ACE_OS::printf("Recieved Timestamp # %d \n", calls_received);
+ ACE_OS::sleep(1);
+ calls_received++;
- ACE_UNUSED_ARG (send_time);
- ACE_UNUSED_ARG (_tao_rh);
+ ACE_UNUSED_ARG (send_time);
+ ACE_UNUSED_ARG (_tao_rh);
// When _tao_rh destructor is called, it shouldn't send anything to
// the client as well
}
-
-
-
-
/*** Server Declaration ***/
// ------------------------------------------------------------------------
@@ -153,15 +138,14 @@ ST_AMH_Server::ST_AMH_Server (int* argc, char **argv)
//
ST_AMH_Server::~ST_AMH_Server ()
{
- try
- {
- this->root_poa_->destroy (1, 1);
- }
- catch (const CORBA::Exception& ex)
- {
- ex._tao_print_exception ("Exception caught:");
- }
-
+ try
+ {
+ this->root_poa_->destroy (1, 1);
+ }
+ catch (const CORBA::Exception& ex)
+ {
+ ex._tao_print_exception ("Exception caught:");
+ }
}
// ------------------------------------------------------------------------
@@ -233,7 +217,7 @@ void ST_AMH_Server::run_event_loop ()
{
ACE_Time_Value period (1, 0);
while (1)
- {
+ {
this->orb_->perform_work (&period);
// when all calls from client have been recieved, exit
@@ -242,7 +226,8 @@ void ST_AMH_Server::run_event_loop ()
}
}
catch (const CORBA::Exception&)
- {}
+ {
+ }
}
// ------------------------------------------------------------------------
@@ -270,29 +255,29 @@ ST_AMH_Server::write_ior_to_file (CORBA::String_var iorstr)
//
static ACE_THR_FUNC_RETURN start_server(void* _arg)
{
-ST_AMH_Server *amh_server = static_cast<ST_AMH_Server*>(_arg);
- amh_server->run_event_loop();
- return 0;
+ ST_AMH_Server *amh_server = static_cast<ST_AMH_Server*>(_arg);
+ amh_server->run_event_loop();
+ return 0;
}
// ------------------------------------------------------------------------
//
static ACE_THR_FUNC_RETURN start_client(void* _arg)
{
-Test::Roundtrip_var roundtrip(static_cast<Test::Roundtrip_ptr>(_arg));
+ Test::Roundtrip_var roundtrip(static_cast<Test::Roundtrip_ptr>(_arg));
- // Do a couple of calls on the server. If the sever is trying to
- // do something stupid like sending an exception to us, then it
- // won't be able to handle more than 1 request from us.
-Test::Timestamp time = 10;
+ // Do a couple of calls on the server. If the sever is trying to
+ // do something stupid like sending an exception to us, then it
+ // won't be able to handle more than 1 request from us.
+ Test::Timestamp time = 10;
- for (int i = 0; i < num_calls; i++)
- {
- roundtrip->test_method(time);
- ACE_DEBUG ((LM_DEBUG, "Sent call # %d \n", i));
- }
+ for (int i = 0; i < num_calls; i++)
+ {
+ roundtrip->test_method(time);
+ ACE_DEBUG ((LM_DEBUG, "Sent call # %d \n", i));
+ }
- return 0;
+ return 0;
}
@@ -300,52 +285,50 @@ Test::Timestamp time = 10;
//
int main (int argc, char *argv[])
{
- if (parse_args (argc, argv) != 0)
- return 1;
+ if (parse_args (argc, argv) != 0)
+ return 1;
-ST_AMH_Server amh_server (&argc, argv);
-CORBA::ORB_var orb = CORBA::ORB_init(argc, argv, "");
+ ST_AMH_Server amh_server (&argc, argv);
+ CORBA::ORB_var orb = CORBA::ORB_init(argc, argv, "");
- amh_server.start_orb_and_poa(orb);
+ amh_server.start_orb_and_poa(orb);
-ST_AMH_Servant servant(orb.in());
+ ST_AMH_Servant servant(orb.in());
- amh_server.register_servant(&servant);
+ amh_server.register_servant(&servant);
- CORBA::Object_var object = orb->string_to_object(ior);
+ CORBA::Object_var object = orb->string_to_object(ior);
- Test::Roundtrip_var roundtrip = Test::Roundtrip::_narrow(object.in ());
+ Test::Roundtrip_var roundtrip = Test::Roundtrip::_narrow(object.in ());
- if (CORBA::is_nil(roundtrip.in()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Nil Test::Roundtrip reference <%s>\n",
- ior),
- 1);
- }
+ if (CORBA::is_nil(roundtrip.in()))
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Nil Test::Roundtrip reference <%s>\n",
+ ior),
+ 1);
+ }
- ACE_thread_t serverThr;
- ACE_thread_t clientThr;
+ ACE_thread_t serverThr;
+ ACE_thread_t clientThr;
- ACE_Thread_Manager::instance()->spawn(start_server,
- (void*)&amh_server,
- THR_NEW_LWP | THR_JOINABLE,
- &serverThr
- );
+ ACE_Thread_Manager::instance()->spawn(start_server,
+ (void*)&amh_server,
+ THR_NEW_LWP | THR_JOINABLE,
+ &serverThr);
- ACE_Thread_Manager::instance()->spawn(start_client,
- (void*)roundtrip.in (),
- THR_NEW_LWP | THR_JOINABLE,
- &clientThr
- );
+ ACE_Thread_Manager::instance()->spawn(start_client,
+ (void*)roundtrip.in (),
+ THR_NEW_LWP | THR_JOINABLE,
+ &clientThr);
- ACE_Thread_Manager::instance()->join(clientThr);
- ACE_OS::printf("End client\n");
- ACE_Thread_Manager::instance()->join(serverThr);
- ACE_OS::printf("End server\n");
+ ACE_Thread_Manager::instance()->join(clientThr);
+ ACE_OS::printf("End client\n");
+ ACE_Thread_Manager::instance()->join(serverThr);
+ ACE_OS::printf("End server\n");
- orb->destroy();
+ orb->destroy();
- return 0;
+ return 0;
}
diff --git a/TAO/tests/Bug_2417_Regression/client.cpp b/TAO/tests/Bug_2417_Regression/client.cpp
index 4cef41e9e91..e47d276294f 100644
--- a/TAO/tests/Bug_2417_Regression/client.cpp
+++ b/TAO/tests/Bug_2417_Regression/client.cpp
@@ -8,57 +8,62 @@
class ThreadPool : public ACE_Task_Base
{
public:
- ThreadPool (CORBA::ORB_ptr orb);
- virtual int svc (void);
+ ThreadPool (CORBA::ORB_ptr orb);
+ virtual int svc (void);
private:
- CORBA::ORB_var orb_;
+ CORBA::ORB_var orb_;
};
int
ACE_TMAIN(int argc, ACE_TCHAR *argv[])
{
- try
+ try
{
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv);
- CORBA::Object_var poa_object = orb->resolve_initial_references("RootPOA");
+ CORBA::ORB_var orb = CORBA::ORB_init (argc, argv);
+ CORBA::Object_var poa_object = orb->resolve_initial_references("RootPOA");
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR, " (%P|%t) Unable to initialize the POA.\n"), 1);
+ if (CORBA::is_nil (poa_object.in ()))
+ ACE_ERROR_RETURN ((LM_ERROR,
+ " (%P|%t) Unable to initialize the POA.\n"),
+ 1);
- PortableServer::POA_var root_poa = PortableServer::POA::_narrow (poa_object.in ());
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager();
+ PortableServer::POA_var root_poa = PortableServer::POA::_narrow (
+ poa_object.in ());
+ PortableServer::POAManager_var poa_manager =
+ root_poa->the_POAManager();
- Subscriber_impl subscriber(orb.in ());
- PortableServer::ObjectId_var id =
- root_poa->activate_object (&subscriber);
+ Subscriber_impl subscriber(orb.in ());
+ PortableServer::ObjectId_var id =
+ root_poa->activate_object (&subscriber);
- CORBA::Object_var object = root_poa->id_to_reference (id.in ());
+ CORBA::Object_var object = root_poa->id_to_reference (id.in ());
- Subscriber_var subscriber_var = Subscriber::_narrow (object.in ());
+ Subscriber_var subscriber_var = Subscriber::_narrow (object.in ());
- object = orb->string_to_object("file://ior.out");
- Publisher_var publisher = Publisher::_narrow(object.in());
+ object = orb->string_to_object("file://ior.out");
+ Publisher_var publisher = Publisher::_narrow(object.in());
- publisher->subscribe(subscriber_var.in());
+ publisher->subscribe(subscriber_var.in());
- poa_manager->activate();
+ poa_manager->activate();
- ThreadPool pool (orb.in ());
- if (pool.activate(THR_NEW_LWP | THR_JOINABLE, 5) != 0)
- ACE_ERROR_RETURN ((LM_ERROR, "Cannot activate client threads\n"), 1);
+ ThreadPool pool (orb.in ());
+ if (pool.activate(THR_NEW_LWP | THR_JOINABLE, 5) != 0)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Cannot activate client threads\n"),
+ 1);
- pool.thr_mgr ()->wait ();
+ pool.thr_mgr ()->wait ();
- ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
- }
- catch (const CORBA::Exception& ex)
+ ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
+ }
+ catch (const CORBA::Exception& ex)
{
ex._tao_print_exception ("Exception caught:");
return 1;
}
- return 0;
+ return 0;
}
// ****************************************************************
@@ -70,12 +75,12 @@ ThreadPool::ThreadPool(CORBA::ORB_ptr orb)
int ThreadPool::svc (void)
{
- try
- {
- this->orb_->run ();
+ try
+ {
+ this->orb_->run ();
}
- catch (...)
+ catch (...)
{
}
- return 0;
+ return 0;
}
diff --git a/TAO/tests/Bug_2417_Regression/publisher_impl.h b/TAO/tests/Bug_2417_Regression/publisher_impl.h
index ec64ca450f6..e33169f5ad5 100644
--- a/TAO/tests/Bug_2417_Regression/publisher_impl.h
+++ b/TAO/tests/Bug_2417_Regression/publisher_impl.h
@@ -8,22 +8,19 @@
class Publisher_impl : public POA_Publisher
{
- public:
- Publisher_impl(CORBA::ORB_ptr orb);
- ~Publisher_impl();
+public:
+ Publisher_impl(CORBA::ORB_ptr orb);
+ ~Publisher_impl();
- virtual void subscribe (
- ::Subscriber_ptr subscriber
- );
+ virtual void subscribe (::Subscriber_ptr subscriber);
- virtual void shutdown (
- );
+ virtual void shutdown ();
- private:
- CORBA::ORB_var orb_;
- class Worker;
- friend class Worker;
- Worker * worker;
+private:
+ CORBA::ORB_var orb_;
+ class Worker;
+ friend class Worker;
+ Worker * worker;
};
#endif
diff --git a/TAO/tests/Bug_2417_Regression/server.cpp b/TAO/tests/Bug_2417_Regression/server.cpp
index 32a267a7a7d..0c92fe55d2e 100644
--- a/TAO/tests/Bug_2417_Regression/server.cpp
+++ b/TAO/tests/Bug_2417_Regression/server.cpp
@@ -9,72 +9,79 @@
class ThreadPool : public ACE_Task_Base
{
public:
- ThreadPool (CORBA::ORB_ptr orb);
- virtual int svc (void);
+ ThreadPool (CORBA::ORB_ptr orb);
+ virtual int svc (void);
private:
- CORBA::ORB_var orb_;
+ CORBA::ORB_var orb_;
};
int
ACE_TMAIN(int argc, ACE_TCHAR *argv[])
{
- try
+ try
{
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv);
- CORBA::Object_var poa_object = orb->resolve_initial_references("RootPOA");
+ CORBA::ORB_var orb = CORBA::ORB_init (argc, argv);
+ CORBA::Object_var poa_object = orb->resolve_initial_references("RootPOA");
- if (CORBA::is_nil (poa_object.in ()))
- ACE_ERROR_RETURN ((LM_ERROR, " (%P|%t) Unable to initialize the POA.\n"), 1);
+ if (CORBA::is_nil (poa_object.in ()))
+ ACE_ERROR_RETURN ((LM_ERROR,
+ " (%P|%t) Unable to initialize the POA.\n"),
+ 1);
- PortableServer::POA_var root_poa = PortableServer::POA::_narrow (poa_object.in ());
- PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager();
+ PortableServer::POA_var root_poa = PortableServer::POA::_narrow (poa_object.in ());
+ PortableServer::POAManager_var poa_manager =
+ root_poa->the_POAManager();
- Publisher_impl publisher(orb.in ());
- PortableServer::ObjectId_var id =
- root_poa->activate_object (&publisher);
+ Publisher_impl publisher(orb.in ());
+ PortableServer::ObjectId_var id = root_poa->activate_object (&publisher);
- CORBA::Object_var object = root_poa->id_to_reference (id.in ());
+ CORBA::Object_var object = root_poa->id_to_reference (id.in ());
- Publisher_var publisher_var = Publisher::_narrow (object.in ());
+ Publisher_var publisher_var = Publisher::_narrow (object.in ());
- CORBA::String_var ior = orb->object_to_string(publisher_var.in());
- ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in()));
+ CORBA::String_var ior = orb->object_to_string(publisher_var.in());
+ ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in()));
- // output the ior
- FILE *output_file= ACE_OS::fopen ("ior.out", "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR, "Cannot open output file for writing IOR: ior.out"), 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
+ // output the ior
+ FILE *output_file= ACE_OS::fopen ("ior.out", "w");
+ if (output_file == 0)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Cannot open output file for writing IOR: ior.out"),
+ 1);
+ ACE_OS::fprintf (output_file, "%s", ior.in ());
+ ACE_OS::fclose (output_file);
- poa_manager->activate();
+ poa_manager->activate();
- const CORBA::Object_var pmobj ( orb->resolve_initial_references( "ORBPolicyManager" ) );
- CORBA::PolicyManager_var policy_manager = CORBA::PolicyManager::_narrow( pmobj.in() );
+ const CORBA::Object_var pmobj (orb->resolve_initial_references("ORBPolicyManager" ) );
+ CORBA::PolicyManager_var policy_manager = CORBA::PolicyManager::_narrow(pmobj.in() );
- CORBA::Any orb_level;
- orb_level <<= Messaging::SYNC_NONE;
- CORBA::PolicyList policy_list;
- policy_list.length(1);
- policy_list[0] = orb->create_policy(Messaging::SYNC_SCOPE_POLICY_TYPE, orb_level);
- policy_manager->set_policy_overrides(policy_list, CORBA::SET_OVERRIDE);
+ CORBA::Any orb_level;
+ orb_level <<= Messaging::SYNC_NONE;
+ CORBA::PolicyList policy_list;
+ policy_list.length(1);
+ policy_list[0] = orb->create_policy(Messaging::SYNC_SCOPE_POLICY_TYPE,
+ orb_level);
+ policy_manager->set_policy_overrides(policy_list,
+ CORBA::SET_OVERRIDE);
- ThreadPool pool (orb.in ());
- if (pool.activate(THR_NEW_LWP | THR_JOINABLE, 5) != 0)
- ACE_ERROR_RETURN ((LM_ERROR, "Cannot activate client threads\n"), 1);
+ ThreadPool pool (orb.in ());
+ if (pool.activate(THR_NEW_LWP | THR_JOINABLE, 5) != 0)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Cannot activate client threads\n"),
+ 1);
- pool.thr_mgr ()->wait ();
+ pool.thr_mgr ()->wait ();
- ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
- }
- catch (const CORBA::Exception& ex)
+ ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
+ }
+ catch (const CORBA::Exception& ex)
{
ex._tao_print_exception ("Exception caught:");
return 1;
}
- return 0;
+ return 0;
}
// ****************************************************************
@@ -86,12 +93,12 @@ ThreadPool::ThreadPool(CORBA::ORB_ptr orb)
int ThreadPool::svc (void)
{
- try
- {
- this->orb_->run ();
- }
- catch (...)
- {
- }
- return 0;
+ try
+ {
+ this->orb_->run ();
+ }
+ catch (...)
+ {
+ }
+ return 0;
}
diff --git a/TAO/tests/Bug_2417_Regression/subscriber_impl.cpp b/TAO/tests/Bug_2417_Regression/subscriber_impl.cpp
index 4538fd8508f..3f9d8c2101a 100644
--- a/TAO/tests/Bug_2417_Regression/subscriber_impl.cpp
+++ b/TAO/tests/Bug_2417_Regression/subscriber_impl.cpp
@@ -14,24 +14,20 @@ Subscriber_impl::~Subscriber_impl()
}
void
-Subscriber_impl::onData (
- ::CORBA::Double
- )
+Subscriber_impl::onData (::CORBA::Double)
{
- ++count;
- if (count > 100)
- this->shutdown();
+ ++count;
+ if (count > 100)
+ this->shutdown();
}
::CORBA::Boolean
-Subscriber_impl::isAlive (
- )
+Subscriber_impl::isAlive ()
{
- return true;
+ return true;
}
void Subscriber_impl::shutdown()
{
- this->orb_->shutdown (0);
+ this->orb_->shutdown (0);
}
-
diff --git a/TAO/tests/Bug_2417_Regression/subscriber_impl.h b/TAO/tests/Bug_2417_Regression/subscriber_impl.h
index f7d159d1294..94ec063bcf4 100644
--- a/TAO/tests/Bug_2417_Regression/subscriber_impl.h
+++ b/TAO/tests/Bug_2417_Regression/subscriber_impl.h
@@ -7,20 +7,19 @@
class Subscriber_impl : public POA_Subscriber
{
- public:
- Subscriber_impl(CORBA::ORB_ptr orb);
- ~Subscriber_impl();
-
- virtual void onData (
- ::CORBA::Double value
- );
- virtual ::CORBA::Boolean isAlive (
- );
-
- void shutdown();
- private:
- CORBA::ORB_var orb_;
- unsigned int count;
+public:
+ Subscriber_impl(CORBA::ORB_ptr orb);
+ ~Subscriber_impl();
+
+ virtual void onData (::CORBA::Double value);
+
+ virtual ::CORBA::Boolean isAlive ();
+
+ void shutdown();
+
+private:
+ CORBA::ORB_var orb_;
+ unsigned int count;
};
#endif
diff --git a/TAO/tests/Bug_2678_Regression/server.cpp b/TAO/tests/Bug_2678_Regression/server.cpp
index 438f52eba30..36c6d9680c0 100644
--- a/TAO/tests/Bug_2678_Regression/server.cpp
+++ b/TAO/tests/Bug_2678_Regression/server.cpp
@@ -48,8 +48,9 @@ AnySeq *Test_impl::RunTest(const AnySeq &params)
ACE_DEBUG ((LM_DEBUG, "%d %d %d %d %d\n", inner->value1, inner->value2, inner->value3, inner->value4, inner->value5));
}
}
- AnySeq *result = new AnySeq(params);
- return result;
+
+ AnySeq *result = new AnySeq(params);
+ return result;
}
int main (int argc, char *argv[])
diff --git a/TAO/tests/Bug_2768_Regression/client.cpp b/TAO/tests/Bug_2768_Regression/client.cpp
index e5681a4062c..81e37e7ff12 100644
--- a/TAO/tests/Bug_2768_Regression/client.cpp
+++ b/TAO/tests/Bug_2768_Regression/client.cpp
@@ -61,6 +61,6 @@ int main(int argc, char* argv[])
return 1;
}
- return 0;
+ return 0;
}
diff --git a/TAO/tests/Bug_2768_Regression/server.cpp b/TAO/tests/Bug_2768_Regression/server.cpp
index 1813c4a0422..96f3011bb6b 100644
--- a/TAO/tests/Bug_2768_Regression/server.cpp
+++ b/TAO/tests/Bug_2768_Regression/server.cpp
@@ -7,58 +7,58 @@ const char *ior_output_file = "server.ior";
int main(int argc, char * argv[])
{
- try {
- //init the orb
- CORBA::ORB_var orb=CORBA::ORB_init(argc, argv);
+ try
+ {
+ //init the orb
+ CORBA::ORB_var orb=CORBA::ORB_init(argc, argv);
- //get the root poa
- CORBA::Object_var poa_object = orb->resolve_initial_references ("RootPOA");
- PortableServer::POA_var poa = PortableServer::POA::_narrow (poa_object.in ());
+ //get the root poa
+ CORBA::Object_var poa_object = orb->resolve_initial_references ("RootPOA");
+ PortableServer::POA_var poa = PortableServer::POA::_narrow (poa_object.in ());
- PortableServer::POAManager_var poa_manager = poa->the_POAManager ();
- poa_manager->activate ();
+ PortableServer::POAManager_var poa_manager = poa->the_POAManager ();
+ poa_manager->activate ();
- // Get a reference to the IOR Table
- CORBA::Object_var tobj = orb->resolve_initial_references("IORTable");
- IORTable::Table_var table = IORTable::Table::_narrow(tobj.in());
+ // Get a reference to the IOR Table
+ CORBA::Object_var tobj = orb->resolve_initial_references("IORTable");
+ IORTable::Table_var table = IORTable::Table::_narrow(tobj.in());
- //get an object id for the name
- PortableServer::ObjectId_var oid =
+ //get an object id for the name
+ PortableServer::ObjectId_var oid =
PortableServer::string_to_ObjectId ("Messenger");
- //activate the object for the given id
- Messenger_i messenger (orb.in ());
- poa->activate_object_with_id(oid.in (), &messenger);
- CORBA::Object_var messenger_obj = poa->id_to_reference (oid.in ());
-
- //bind the ior string to the name
- CORBA::String_var messenger_ior_string = orb->object_to_string(messenger_obj.in());
- table->bind("Messenger", messenger_ior_string.in());
-
- // Output the IOR to the <ior_output_file>
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s\n",
- ior_output_file),
+ //activate the object for the given id
+ Messenger_i messenger (orb.in ());
+ poa->activate_object_with_id(oid.in (), &messenger);
+ CORBA::Object_var messenger_obj = poa->id_to_reference (oid.in ());
+
+ //bind the ior string to the name
+ CORBA::String_var messenger_ior_string = orb->object_to_string(messenger_obj.in());
+ table->bind("Messenger", messenger_ior_string.in());
+
+ // Output the IOR to the <ior_output_file>
+ FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ if (output_file == 0)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Cannot open output file for writing IOR: %s\n",
+ ior_output_file),
1);
- ACE_OS::fprintf (output_file, "%s", messenger_ior_string.in ());
- ACE_OS::fclose (output_file);
+ ACE_OS::fprintf (output_file, "%s", messenger_ior_string.in ());
+ ACE_OS::fclose (output_file);
- orb->run ();
+ orb->run ();
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
+ ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
- poa->destroy (1, 1);
+ poa->destroy (1, 1);
- orb->destroy ();
- }
+ orb->destroy ();
+ }
catch (const CORBA::Exception& ex)
{
ex._tao_print_exception ("Exception caught:");
return 1;
}
- return 0;
+ return 0;
}
-
diff --git a/TAO/tests/Bug_2805_Regression/ami_test_i.h b/TAO/tests/Bug_2805_Regression/ami_test_i.h
index 9ff1fe8cfb8..28db6672112 100644
--- a/TAO/tests/Bug_2805_Regression/ami_test_i.h
+++ b/TAO/tests/Bug_2805_Regression/ami_test_i.h
@@ -28,7 +28,7 @@ public:
/// ctor
AMI_Test_i (CORBA::ORB_ptr orb,
CORBA::Long in_l = 0, const char * in_str = 0,
- bool check_params = false);
+ bool check_params = false);
// The AMI_Test methods.
CORBA::Long foo (CORBA::Long_out out_l,
diff --git a/TAO/tests/Bug_933_Regression/MessengerClient.cpp b/TAO/tests/Bug_933_Regression/MessengerClient.cpp
index 109984f46b2..ee97a3c5689 100644
--- a/TAO/tests/Bug_933_Regression/MessengerClient.cpp
+++ b/TAO/tests/Bug_933_Regression/MessengerClient.cpp
@@ -23,7 +23,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
// Obtain a reference to the CodecFactory.
CORBA::Object_var obj2 =
- orb->resolve_initial_references ("CodecFactory");
+ orb->resolve_initial_references ("CodecFactory");
IOP::CodecFactory_var codec_factory =
IOP::CodecFactory::_narrow (obj2.in ());
diff --git a/TAO/tests/CDR/growth.cpp b/TAO/tests/CDR/growth.cpp
index 7f2a28f37e0..bf376fb991f 100644
--- a/TAO/tests/CDR/growth.cpp
+++ b/TAO/tests/CDR/growth.cpp
@@ -78,9 +78,9 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
{
switch (opt)
{
- case 'd':
- TAO_debug_level++;
- break;
+ case 'd':
+ TAO_debug_level++;
+ break;
case 'n':
n = ACE_OS::atoi (get_opt.opt_arg ());
break;
@@ -100,7 +100,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
default:
ACE_DEBUG ((LM_DEBUG,
"Usage: %s "
- "-d debug"
+ "-d debug"
"-l low "
"-h high "
"-s step "
@@ -121,7 +121,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
ACE_High_Res_Timer writing;
ACE_High_Res_Timer reading;
if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG, "\nx= %d\n", x));
+ ACE_DEBUG ((LM_DEBUG, "\nx= %d\n", x));
for (int i = 0; i < n; ++i)
{
diff --git a/TAO/tests/COIOP/Client_Task.cpp b/TAO/tests/COIOP/Client_Task.cpp
index fe518deb52b..5f61a06f071 100644
--- a/TAO/tests/COIOP/Client_Task.cpp
+++ b/TAO/tests/COIOP/Client_Task.cpp
@@ -41,8 +41,9 @@ Client_Task::svc (void)
CORBA::String_var the_string =
hello->get_string ();
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) - string returned <%s>\n",
- the_string.in ()));
+ ACE_DEBUG ((LM_DEBUG,
+ "(%P|%t) - string returned <%s>\n",
+ the_string.in ()));
if (!this->result_)
{
diff --git a/TAO/tests/CodeSets/simple/client.cpp b/TAO/tests/CodeSets/simple/client.cpp
index 850cdc4664c..7549ac25f6e 100644
--- a/TAO/tests/CodeSets/simple/client.cpp
+++ b/TAO/tests/CodeSets/simple/client.cpp
@@ -42,7 +42,7 @@ make_wstring (const char *str)
char *t = const_cast<char *> (str);
wstr[i] = static_cast<wchar_t> (*(t + i));
ACE_DEBUG ((LM_DEBUG,
- "wstr[%d] = %d\n", i, (short)wstr[i]));
+ "wstr[%d] = %d\n", i, (short)wstr[i]));
}
return wstr;
}
@@ -63,7 +63,7 @@ int main (int argc, char *argv[])
// Get IOR from command line (or file)
if (argc != 2)
{
- ACE_OS::strcpy (buf, "file://server.ior");
+ ACE_OS::strcpy (buf, "file://server.ior");
}
else
{
diff --git a/TAO/tests/Collocation_Exception_Test/Client_Task.cpp b/TAO/tests/Collocation_Exception_Test/Client_Task.cpp
index c272d6a800f..3ff95dfb3e0 100644
--- a/TAO/tests/Collocation_Exception_Test/Client_Task.cpp
+++ b/TAO/tests/Collocation_Exception_Test/Client_Task.cpp
@@ -7,8 +7,8 @@
ACE_RCSID(Collocation_Oneway_Tests, Client_Task, "$Id$")
Client_Task::Client_Task (const char *ior,
- CORBA::ORB_ptr corb,
- ACE_Thread_Manager *thr_mgr)
+ CORBA::ORB_ptr corb,
+ ACE_Thread_Manager *thr_mgr)
: ACE_Task_Base (thr_mgr)
, input_ (ior)
, corb_ (CORBA::ORB::_duplicate (corb))
@@ -107,7 +107,7 @@ Client_Task::svc (void)
CORBA::String_var the_string = hello->get_string ();
ACE_DEBUG ((LM_DEBUG, "(%P|%t) - string returned <%s>\n",
- the_string.in ()));
+ the_string.in ()));
this->test_system_exception (hello.in ());
diff --git a/TAO/tests/Collocation_Oneway_Tests/Client_Task.cpp b/TAO/tests/Collocation_Oneway_Tests/Client_Task.cpp
index a8ad8f92b03..fe3f056cbf6 100644
--- a/TAO/tests/Collocation_Oneway_Tests/Client_Task.cpp
+++ b/TAO/tests/Collocation_Oneway_Tests/Client_Task.cpp
@@ -10,9 +10,9 @@
ACE_RCSID(Collocation_Oneway_Tests, Client_Task, "$Id$")
Client_Task::Client_Task (const char *ior,
- CORBA::ORB_ptr corb,
+ CORBA::ORB_ptr corb,
Client_Task::ClientSyncModeEnum syncMode,
- ACE_Thread_Manager *thr_mgr)
+ ACE_Thread_Manager *thr_mgr)
: ACE_Task_Base (thr_mgr)
, input_ (ior)
, corb_ (CORBA::ORB::_duplicate (corb))
@@ -86,7 +86,7 @@ Client_Task::svc (void)
hello->get_string ();
ACE_DEBUG ((LM_DEBUG, "(%P|%t) - string returned <%s>\n",
- the_string.in ()));
+ the_string.in ()));
hello->onewayTest();
diff --git a/TAO/tests/Collocation_Tests/Client_Task.cpp b/TAO/tests/Collocation_Tests/Client_Task.cpp
index aabba8b790e..f5e9b2c1026 100644
--- a/TAO/tests/Collocation_Tests/Client_Task.cpp
+++ b/TAO/tests/Collocation_Tests/Client_Task.cpp
@@ -8,8 +8,8 @@
ACE_RCSID(Muxing, Client_Task, "$Id$")
Client_Task::Client_Task (const char *ior,
- CORBA::ORB_ptr corb,
- ACE_Thread_Manager *thr_mgr)
+ CORBA::ORB_ptr corb,
+ ACE_Thread_Manager *thr_mgr)
: ACE_Task_Base (thr_mgr)
, input_ (ior)
, corb_ (CORBA::ORB::_duplicate (corb))
@@ -40,7 +40,7 @@ Client_Task::svc (void)
hello->get_string ();
ACE_DEBUG ((LM_DEBUG, "(%P|%t) - string returned <%s>\n",
- the_string.in ()));
+ the_string.in ()));
hello->shutdown ();
}
diff --git a/TAO/tests/DII_AMI_Forward/server.cpp b/TAO/tests/DII_AMI_Forward/server.cpp
index b40842b0964..5fd3ccbc9d5 100644
--- a/TAO/tests/DII_AMI_Forward/server.cpp
+++ b/TAO/tests/DII_AMI_Forward/server.cpp
@@ -17,26 +17,26 @@ const char *ior_filename = "server.ior";
int
parse_args (int argc, char *argv[])
{
- ACE_Get_Opt get_opts (argc, argv, "o:m:n:t");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'o':
- ior_filename = get_opts.opt_arg ();
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s "
- "-o <iorfile>"
- "\n",
- argv [0]),
- -1);
- }
- // Indicates sucessful parsing of the command line
- return 0;
+ ACE_Get_Opt get_opts (argc, argv, "o:m:n:t");
+ int c;
+
+ while ((c = get_opts ()) != -1)
+ switch (c)
+ {
+ case 'o':
+ ior_filename = get_opts.opt_arg ();
+ break;
+ case '?':
+ default:
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "usage: %s "
+ "-o <iorfile>"
+ "\n",
+ argv [0]),
+ -1);
+ }
+ // Indicates sucessful parsing of the command line
+ return 0;
}
int
@@ -58,50 +58,49 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
// Now initialize the ORB.
CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, "");
CORBA::Object_var poa_object =
- orb->resolve_initial_references("RootPOA");
+ orb->resolve_initial_references("RootPOA");
if (CORBA::is_nil (poa_object.in ()))
{
ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the POA.\n"),
- 1);
+ " (%P|%t) Unable to initialize the POA.\n"),
+ 1);
}
PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in ());
+ PortableServer::POA::_narrow (poa_object.in ());
PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager ();
+ root_poa->the_POAManager ();
if (parse_args (argc, argv) != 0)
{
- return 1;
+ return 1;
}
- // Create the interceptor.
- ForwardTest_Request_Interceptor * server_interceptor =
- temp_initializer->server_interceptor();
-
+ // Create the interceptor.
+ ForwardTest_Request_Interceptor * server_interceptor =
+ temp_initializer->server_interceptor();
Forward_Test_i *final_impl = new Forward_Test_i(orb.in ());
PortableServer::ServantBase_var servant = final_impl;
Forward::Test_var target = final_impl->_this ();
- server_interceptor->forward_reference (target.in());
+ server_interceptor->forward_reference (target.in());
- Forward_Test_i *server_impl = new Forward_Test_i (orb.in());
+ Forward_Test_i *server_impl = new Forward_Test_i (orb.in());
servant = server_impl;
Forward::Test_var server = server_impl->_this ();
CORBA::String_var iorstr =
- orb->object_to_string (server.in ());
+ orb->object_to_string (server.in ());
FILE *output_file= ACE_OS::fopen (ior_filename, "w");
if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s\n",
- ior_filename),
- 1);
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Cannot open output file for writing IOR: %s\n",
+ ior_filename),
+ 1);
ACE_OS::fprintf (output_file, "%s", iorstr.in());
ACE_OS::fclose (output_file);
@@ -112,10 +111,10 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
}
catch (const CORBA::Exception& ex)
- {
- ex._tao_print_exception ("Server: exception caught - ");
- return 1;
- }
+ {
+ ex._tao_print_exception ("Server: exception caught - ");
+ return 1;
+ }
return 0;
}
diff --git a/TAO/tests/DII_AMI_Forward/test_i.cpp b/TAO/tests/DII_AMI_Forward/test_i.cpp
index 70321850649..934cafbbba7 100644
--- a/TAO/tests/DII_AMI_Forward/test_i.cpp
+++ b/TAO/tests/DII_AMI_Forward/test_i.cpp
@@ -8,19 +8,19 @@
#include "ace/OS_NS_unistd.h"
Forward_Test_i::Forward_Test_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb))
+ : orb_ (CORBA::ORB::_duplicate (orb))
{
}
char * Forward_Test_i::do_forward (const char *text)
{
- ACE_DEBUG ((LM_DEBUG,"Server echoing test string\n"));
- return CORBA::string_dup (text);
+ ACE_DEBUG ((LM_DEBUG,"Server echoing test string\n"));
+ return CORBA::string_dup (text);
}
void
Forward_Test_i::shutdown ()
{
- ACE_OS::sleep( 2 );
- this->orb_->shutdown (0);
+ ACE_OS::sleep( 2 );
+ this->orb_->shutdown (0);
}
diff --git a/TAO/tests/DII_AMI_Forward/test_i.h b/TAO/tests/DII_AMI_Forward/test_i.h
index e0c7bd25f41..d0968c6be9d 100644
--- a/TAO/tests/DII_AMI_Forward/test_i.h
+++ b/TAO/tests/DII_AMI_Forward/test_i.h
@@ -1,7 +1,7 @@
// -*- C++ -*-
//
-// $Id:$
+// $Id$
//
#ifndef TEST_I_H
@@ -11,21 +11,21 @@
class Forward_Test_i : public POA_Forward::Test
{
- // = TITLE
- // Location Forward exception tester
- //
- // = DESCRIPTION
- // servant throws a location forward exception when constructed with a
- // target IOR, otherwise it echos the source string.
+ // = TITLE
+ // Location Forward exception tester
+ //
+ // = DESCRIPTION
+ // servant throws a location forward exception when constructed with a
+ // target IOR, otherwise it echos the source string.
public:
- Forward_Test_i (CORBA::ORB_ptr orb);
+ Forward_Test_i (CORBA::ORB_ptr orb);
char * do_forward (const char *text);
- void shutdown ();
+ void shutdown ();
private:
- CORBA::ORB_var orb_;
+ CORBA::ORB_var orb_;
};
#endif /* TEST_I_H */
diff --git a/TAO/tests/DII_Collocation_Tests/oneway/Client_Task.cpp b/TAO/tests/DII_Collocation_Tests/oneway/Client_Task.cpp
index 7d2fd9d39c0..a50ee36bdc9 100644
--- a/TAO/tests/DII_Collocation_Tests/oneway/Client_Task.cpp
+++ b/TAO/tests/DII_Collocation_Tests/oneway/Client_Task.cpp
@@ -19,8 +19,8 @@ CORBA::Short TEST_SECOND = 59;
Client_Task::Client_Task (const char *ior,
const char *simple_test_ior,
- CORBA::ORB_ptr corb,
- ACE_Thread_Manager *thr_mgr)
+ CORBA::ORB_ptr corb,
+ ACE_Thread_Manager *thr_mgr)
: ACE_Task_Base (thr_mgr)
, input_ (ior)
, simple_test_input_ (simple_test_ior)
diff --git a/TAO/tests/DII_Collocation_Tests/twoway/Client_Task.cpp b/TAO/tests/DII_Collocation_Tests/twoway/Client_Task.cpp
index 41c7b613c38..70a68bb19bb 100644
--- a/TAO/tests/DII_Collocation_Tests/twoway/Client_Task.cpp
+++ b/TAO/tests/DII_Collocation_Tests/twoway/Client_Task.cpp
@@ -20,8 +20,8 @@ CORBA::Short TEST_SECOND = 59;
Client_Task::Client_Task (const char *ior,
const char *simple_test_ior,
- CORBA::ORB_ptr corb,
- ACE_Thread_Manager *thr_mgr)
+ CORBA::ORB_ptr corb,
+ ACE_Thread_Manager *thr_mgr)
: ACE_Task_Base (thr_mgr)
, input_ (ior)
, simple_test_input_ (simple_test_ior)
diff --git a/TAO/tests/Faults/ping.cpp b/TAO/tests/Faults/ping.cpp
index 747beb37361..08ac3b26f2c 100644
--- a/TAO/tests/Faults/ping.cpp
+++ b/TAO/tests/Faults/ping.cpp
@@ -76,7 +76,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
PingObject_i *server_impl = 0;
ACE_NEW_RETURN (server_impl,
- PingObject_i (orb.in (),
+ PingObject_i (orb.in (),
persistent_poa.in ()),
-1);
diff --git a/TAO/tests/HandleExhaustion/server.cpp b/TAO/tests/HandleExhaustion/server.cpp
index f358407042e..f60d69b165c 100644
--- a/TAO/tests/HandleExhaustion/server.cpp
+++ b/TAO/tests/HandleExhaustion/server.cpp
@@ -17,13 +17,16 @@ class Test_i: public virtual POA_Test
{
public:
Test_i (CORBA::ORB_ptr orb)
- : orb_ (CORBA::ORB::_duplicate (orb)) {
+ : orb_ (CORBA::ORB::_duplicate (orb))
+ {
}
- void simple (void) {
+ void simple (void)
+ {
}
- void shutdown (void) {
+ void shutdown (void)
+ {
this->orb_->shutdown ();
}
@@ -37,31 +40,37 @@ public:
Descriptors (void)
: slast_ (ACE_INVALID_HANDLE),
last_ (ACE_INVALID_HANDLE),
- ok_ (false) {
+ ok_ (false)
+ {
}
- int allow_accepts (void) {
+ int allow_accepts (void)
+ {
ACE_OS::close(this->slast_);
ACE_OS::close(this->last_);
this->ok_ = true;
return 0;
}
- void leak (const char* file) {
- for (size_t i = 0; i < 0xffff; i++) {
- ACE_HANDLE h = ACE_OS::open (file, O_RDONLY);
- if (h == ACE_INVALID_HANDLE) {
- break;
- }
+ void leak (const char* file)
+ {
+ for (size_t i = 0; i < 0xffff; i++)
+ {
+ ACE_HANDLE h = ACE_OS::open (file, O_RDONLY);
+ if (h == ACE_INVALID_HANDLE)
+ {
+ break;
+ }
- // Save the last two file handles so that they can be closed later
- // on. We need two for this test to work with SHMIOP.
- this->slast_ = this->last_;
- this->last_ = h;
- }
+ // Save the last two file handles so that they can be closed later
+ // on. We need two for this test to work with SHMIOP.
+ this->slast_ = this->last_;
+ this->last_ = h;
+ }
}
- bool ok (void) const {
+ bool ok (void) const
+ {
return this->ok_ && this->last_ != ACE_INVALID_HANDLE;
}
@@ -107,7 +116,7 @@ main (int argc, char *argv[])
// the size allowed (in the fd set) by the reactor. If it does, this
// test will fail (in a different way than expected) which is a
// completely different bug than this test is designed to address
- // (see Bug #3326).
+ // (see Bug #3326).
//
// We must also make sure that this happens before creating the first
// ORB. Otherwise, the reactor will be created with a maximum size of
@@ -116,10 +125,8 @@ main (int argc, char *argv[])
rlimit rlim;
if (ACE_OS::getrlimit(RLIMIT_NOFILE, &rlim) == 0)
{
- if (rlim.rlim_cur <
- static_cast<rlim_t> (ACE_DEFAULT_SELECT_REACTOR_SIZE) &&
- rlim.rlim_max >
- static_cast<rlim_t> (ACE_DEFAULT_SELECT_REACTOR_SIZE))
+ if (rlim.rlim_cur < static_cast<rlim_t> (ACE_DEFAULT_SELECT_REACTOR_SIZE) &&
+ rlim.rlim_max > static_cast<rlim_t> (ACE_DEFAULT_SELECT_REACTOR_SIZE))
{
rlim.rlim_cur = ACE_DEFAULT_SELECT_REACTOR_SIZE;
rlim.rlim_max = ACE_DEFAULT_SELECT_REACTOR_SIZE;
diff --git a/TAO/tests/ICMG_Any_Bug/Hello.cpp b/TAO/tests/ICMG_Any_Bug/Hello.cpp
index ee4dac0e4d1..785ca17bae2 100644
--- a/TAO/tests/ICMG_Any_Bug/Hello.cpp
+++ b/TAO/tests/ICMG_Any_Bug/Hello.cpp
@@ -17,8 +17,8 @@ Hello::get_helloworld (void)
{
HelloWorld *hello_world;
ACE_NEW_THROW_EX (hello_world,
- HelloWorld,
- CORBA::NO_MEMORY ());
+ HelloWorld,
+ CORBA::NO_MEMORY ());
PortableServer::ObjectId_var id =
this->poa_->activate_object (hello_world);
diff --git a/TAO/tests/ICMG_Any_Bug/server.cpp b/TAO/tests/ICMG_Any_Bug/server.cpp
index ff27ac5ac1b..a83a1b628c5 100644
--- a/TAO/tests/ICMG_Any_Bug/server.cpp
+++ b/TAO/tests/ICMG_Any_Bug/server.cpp
@@ -63,8 +63,8 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
Hello *hello_impl;
ACE_NEW_RETURN (hello_impl,
- Hello (orb.in (), root_poa.in ()),
- 1);
+ Hello (orb.in (), root_poa.in ()),
+ 1);
PortableServer::ServantBase_var owner_transfer (hello_impl);
PortableServer::ObjectId_var id =
@@ -84,7 +84,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
ACE_ERROR_RETURN ((LM_ERROR,
"Cannot open output file for writing IOR: %s",
ior_output_file),
- 1);
+ 1);
ACE_OS::fprintf (output_file, "%s", ior.in ());
ACE_OS::fclose (output_file);
diff --git a/TAO/tests/MProfile/client.cpp b/TAO/tests/MProfile/client.cpp
index 70f821cf8d2..e782f26d9ef 100644
--- a/TAO/tests/MProfile/client.cpp
+++ b/TAO/tests/MProfile/client.cpp
@@ -118,7 +118,7 @@ void run_test (Simple_Server_ptr server)
CORBA::Long ret =
server->remote_call ();
- ACE_UNUSED_ARG (ret);
+ ACE_UNUSED_ARG (ret);
ACE_OS::sleep (25);
}
diff --git a/TAO/tests/Monitor/Marshal_Buffer/client.cpp b/TAO/tests/Monitor/Marshal_Buffer/client.cpp
index a8a1e97cb7f..f712a6855ae 100644
--- a/TAO/tests/Monitor/Marshal_Buffer/client.cpp
+++ b/TAO/tests/Monitor/Marshal_Buffer/client.cpp
@@ -71,25 +71,25 @@ main (int argc, char *argv[])
CORBA::String_var ior = orb->object_to_string (monitor.in ());
- FILE *output_file = ACE_OS::fopen (monitor_output_file, "w");
+ FILE *output_file = ACE_OS::fopen (monitor_output_file, "w");
- if (output_file == 0)
+ if (output_file == 0)
{
- ACE_ERROR_RETURN ((LM_ERROR,
- "Can't open output file for writing IOR: %s",
- monitor_output_file),
- 1);
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Can't open output file for writing IOR: %s",
+ monitor_output_file),
+ 1);
}
- ACE_OS::fprintf (output_file,
- "%s",
- ior.in ());
- ACE_OS::fclose (output_file);
+ ACE_OS::fprintf (output_file,
+ "%s",
+ ior.in ());
+ ACE_OS::fclose (output_file);
- /// Call orb->run() in a separate thread so the MC interface can
- /// get remote calls.
- ORB_Runner orb_runner (orb.in ());
- orb_runner.activate ();
+ /// Call orb->run() in a separate thread so the MC interface can
+ /// get remote calls.
+ ORB_Runner orb_runner (orb.in ());
+ orb_runner.activate ();
obj = orb->string_to_object (ior_input_file);
diff --git a/TAO/tests/Monitor/Marshal_Buffer/server.cpp b/TAO/tests/Monitor/Marshal_Buffer/server.cpp
index 7bee6b005d1..bfbf0b0f5de 100644
--- a/TAO/tests/Monitor/Marshal_Buffer/server.cpp
+++ b/TAO/tests/Monitor/Marshal_Buffer/server.cpp
@@ -33,22 +33,22 @@ main (int argc, char *argv[])
test_var server = svnt._this ();
CORBA::String_var ior =
- orb->object_to_string (server.in ());
+ orb->object_to_string (server.in ());
- FILE *output_file = ACE_OS::fopen (ior_output_file, "w");
+ FILE *output_file = ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
+ if (output_file == 0)
{
- ACE_ERROR_RETURN ((LM_ERROR,
- "Can't open output file for writing IOR: %s",
- ior_output_file),
- 1);
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Can't open output file for writing IOR: %s",
+ ior_output_file),
+ 1);
}
- ACE_OS::fprintf (output_file,
+ ACE_OS::fprintf (output_file,
"%s",
ior.in ());
- ACE_OS::fclose (output_file);
+ ACE_OS::fclose (output_file);
poa_manager->activate ();
orb->run ();
diff --git a/TAO/tests/OBV/Collocated/Forward/Client_Task.cpp b/TAO/tests/OBV/Collocated/Forward/Client_Task.cpp
index f45448c1dcb..d5e20fc1203 100644
--- a/TAO/tests/OBV/Collocated/Forward/Client_Task.cpp
+++ b/TAO/tests/OBV/Collocated/Forward/Client_Task.cpp
@@ -5,8 +5,8 @@
#include "Client_Task.h"
Client_Task::Client_Task (const char *ior,
- CORBA::ORB_ptr corb,
- ACE_Thread_Manager *thr_mgr)
+ CORBA::ORB_ptr corb,
+ ACE_Thread_Manager *thr_mgr)
: ACE_Task_Base (thr_mgr)
, input_ (ior)
, corb_ (CORBA::ORB::_duplicate (corb))
diff --git a/TAO/tests/OBV/Supports/Supports_Test_impl.cpp b/TAO/tests/OBV/Supports/Supports_Test_impl.cpp
index af9ec632601..aed6a334db4 100644
--- a/TAO/tests/OBV/Supports/Supports_Test_impl.cpp
+++ b/TAO/tests/OBV/Supports/Supports_Test_impl.cpp
@@ -45,10 +45,10 @@ void
vt_graph_impl::print (void)
{
ACE_DEBUG ((LM_DEBUG,
- "Printing graph data... \n"));
+ "Printing graph data... \n"));
ACE_DEBUG ((LM_DEBUG,
- "Number of nodes: [%d] \n", nodes_ ().length ()));
+ "Number of nodes: [%d] \n", nodes_ ().length ()));
for (size_t i = 0; i < nodes_ ().length (); i++)
nodes_ ()[i]->print ();
diff --git a/TAO/tests/OBV/Supports/server.cpp b/TAO/tests/OBV/Supports/server.cpp
index dd6f46e8896..611933a0a7a 100644
--- a/TAO/tests/OBV/Supports/server.cpp
+++ b/TAO/tests/OBV/Supports/server.cpp
@@ -8,47 +8,52 @@ const char * ior_output_file = "test.ior";
int
ACE_TMAIN(int argc, ACE_TCHAR *argv[])
{
- try
- {
-
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv);
-
- CORBA::Object_var poa_object = orb->resolve_initial_references ("RootPOA");
+ try
+ {
+ CORBA::ORB_var orb = CORBA::ORB_init (argc, argv);
- PortableServer::POA_var root_poa = PortableServer::POA::_narrow (poa_object.in ());
+ CORBA::Object_var poa_object = orb->resolve_initial_references ("RootPOA");
- if (CORBA::is_nil (root_poa.in ())) ACE_ERROR_RETURN ((LM_ERROR," (%P|%t) Nil RootPOA\n"), 1);
+ PortableServer::POA_var root_poa = PortableServer::POA::_narrow (poa_object.in ());
- PortableServer::POAManager_var poa_manager = root_poa->the_POAManager ();
+ if (CORBA::is_nil (root_poa.in ()))
+ ACE_ERROR_RETURN ((LM_ERROR,
+ " (%P|%t) Nil RootPOA\n"),
+ 1);
+ PortableServer::POAManager_var poa_manager = root_poa->the_POAManager ();
- /* Create, register factories */
+ /* Create, register factories */
- Supports_Test::Node_init * node_factory = 0;
+ Supports_Test::Node_init * node_factory = 0;
- ACE_NEW_RETURN (node_factory, node_init_impl, 1);
+ ACE_NEW_RETURN (node_factory, node_init_impl, 1);
- CORBA::ValueFactory returned_factory = orb->register_value_factory (node_factory->tao_repository_id (), node_factory);
+ CORBA::ValueFactory returned_factory = orb->register_value_factory (
+ node_factory->tao_repository_id (),
+ node_factory);
- ACE_ASSERT (returned_factory == 0);
+ ACE_ASSERT (returned_factory == 0);
node_factory->_remove_ref ();
- Supports_Test::vt_graph_init * vt_graph_factory = 0;
+ Supports_Test::vt_graph_init * vt_graph_factory = 0;
- ACE_NEW_RETURN (vt_graph_factory, vt_graph_init_impl, 1);
+ ACE_NEW_RETURN (vt_graph_factory, vt_graph_init_impl, 1);
- returned_factory = orb->register_value_factory (vt_graph_factory->tao_repository_id (), vt_graph_factory);
+ returned_factory = orb->register_value_factory (
+ vt_graph_factory->tao_repository_id (),
+ vt_graph_factory);
- ACE_ASSERT (returned_factory == 0);
+ ACE_ASSERT (returned_factory == 0);
vt_graph_factory->_remove_ref ();
test_impl * a_test_impl;
- ACE_NEW_RETURN (a_test_impl, test_impl (orb.in ()), 1);
+ ACE_NEW_RETURN (a_test_impl, test_impl (orb.in ()), 1);
- //PortableServer::ServantBase_var owner_transfer = a_test_impl;
+ //PortableServer::ServantBase_var owner_transfer = a_test_impl;
Supports_Test::test_ptr a_test = a_test_impl->_this ();
@@ -56,7 +61,8 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
FILE * output_file = ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0) ACE_ERROR_RETURN ((LM_ERROR, "Cannot open output file for writing IOR: %s", ior_output_file), 1);
+ if (output_file == 0)
+ ACE_ERROR_RETURN ((LM_ERROR, "Cannot open output file for writing IOR: %s", ior_output_file), 1);
ACE_OS::fprintf (output_file, "%s", ior.in ());
@@ -73,7 +79,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
orb->destroy ();
ACE_DEBUG ((LM_DEBUG, "Server (%P.%t) completed test successfully\n"));
- }
+ }
catch (const CORBA::Exception& ex)
{
ex._tao_print_exception ("Exception caught:");
diff --git a/TAO/tests/Portable_Interceptors/Bug_1559/client_interceptor.cpp b/TAO/tests/Portable_Interceptors/Bug_1559/client_interceptor.cpp
index f553d202517..85366db4b77 100644
--- a/TAO/tests/Portable_Interceptors/Bug_1559/client_interceptor.cpp
+++ b/TAO/tests/Portable_Interceptors/Bug_1559/client_interceptor.cpp
@@ -89,7 +89,7 @@ Echo_Client_Request_Interceptor::send_request (
{
if (exception_count != 1)
{
- ACE_ERROR ((LM_ERROR,
+ ACE_ERROR ((LM_ERROR,
"ERROR: Expected exception_count is <1>\n"));
}
ACE_ASSERT (exception_count == 1);
diff --git a/TAO/tests/Portable_Interceptors/Bug_2510_Regression/client.cpp b/TAO/tests/Portable_Interceptors/Bug_2510_Regression/client.cpp
index f05d89d2d54..fee135d12db 100644
--- a/TAO/tests/Portable_Interceptors/Bug_2510_Regression/client.cpp
+++ b/TAO/tests/Portable_Interceptors/Bug_2510_Regression/client.cpp
@@ -89,12 +89,11 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
}
ACE_hthread_t threadHandle;
- if ( ACE_Thread::spawn( run_test,
- static_cast<void*>(server.in()),
- THR_NEW_LWP | THR_JOINABLE ,
- 0,
- & threadHandle
- ) == -1 )
+ if ( ACE_Thread::spawn(run_test,
+ static_cast<void*>(server.in()),
+ THR_NEW_LWP | THR_JOINABLE ,
+ 0,
+ & threadHandle) == -1 )
{
ACE_ERROR_RETURN ((LM_ERROR,"Cannot start thread"), 1);
}
diff --git a/TAO/tests/RTCORBA/common_args.cpp b/TAO/tests/RTCORBA/common_args.cpp
index 4c72811ab86..e2fdb350988 100644
--- a/TAO/tests/RTCORBA/common_args.cpp
+++ b/TAO/tests/RTCORBA/common_args.cpp
@@ -162,10 +162,10 @@ get_values (const char *test_type,
values[i] = ACE_OS::strtoul (working_string, &endptr, 10);
if (endptr != working_string && endptr != 0 && *endptr != '\0')
- {
- result = 0;
+ {
+ result = 0;
break;
- }
+ }
working_string += ACE_OS::strlen (working_string);
working_string += 1;
diff --git a/TAO/tests/RTScheduling/DT_Spawn/Thread_Action.h b/TAO/tests/RTScheduling/DT_Spawn/Thread_Action.h
index 4e0cbf8a9ae..36c194ef47c 100644
--- a/TAO/tests/RTScheduling/DT_Spawn/Thread_Action.h
+++ b/TAO/tests/RTScheduling/DT_Spawn/Thread_Action.h
@@ -36,29 +36,29 @@ Test_Thread_Action::_cxx_do (CORBA::VoidData data)
Data* tmp = (Data*) data;
ACE_DEBUG ((LM_DEBUG,
- "Test_Thread_Action::do %s\n",
- tmp->data.c_str ()));
+ "Test_Thread_Action::do %s\n",
+ tmp->data.c_str ()));
size_t count = 0;
ACE_OS::memcpy (&count,
- tmp->current->id ()->get_buffer (),
- tmp->current->id ()->length ());
+ tmp->current->id ()->get_buffer (),
+ tmp->current->id ()->length ());
ACE_DEBUG ((LM_DEBUG,
- "The spawned DT Guid is %d\n",
- count));
+ "The spawned DT Guid is %d\n",
+ count));
RTScheduling::Current::NameList_var segment_name_list =
tmp->current->current_scheduling_segment_names ();
ACE_DEBUG ((LM_DEBUG,
- "Segment Names for DT %d:\n",
- count));
+ "Segment Names for DT %d:\n",
+ count));
- for (unsigned int i = 0; i < segment_name_list->length (); i ++)
+ for (unsigned int i = 0; i < segment_name_list->length (); i++)
{
ACE_DEBUG ((LM_DEBUG,
- "%s\n",
- static_cast<char const*>((*segment_name_list) [i])));
+ "%s\n",
+ static_cast<char const*>((*segment_name_list) [i])));
}
}
diff --git a/TAO/tests/RTScheduling/DT_Spawn/test.cpp b/TAO/tests/RTScheduling/DT_Spawn/test.cpp
index 052723f99ed..a46170004ec 100644
--- a/TAO/tests/RTScheduling/DT_Spawn/test.cpp
+++ b/TAO/tests/RTScheduling/DT_Spawn/test.cpp
@@ -21,8 +21,8 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
try
{
orb = CORBA::ORB_init (argc,
- argv,
- "");
+ argv,
+ "");
CORBA::Object_var manager_obj = orb->resolve_initial_references ("RTSchedulerManager");
@@ -30,8 +30,8 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
TAO_Scheduler* scheduler;
ACE_NEW_RETURN (scheduler,
- TAO_Scheduler (orb.in ()),
- -1);
+ TAO_Scheduler (orb.in ()),
+ -1);
RTScheduling::Scheduler_var safe_scheduler = scheduler;
manager->rtscheduler (scheduler);
@@ -41,45 +41,44 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
current = RTScheduling::Current::_narrow (current_obj.in ());
try
- {
-
- ACE_DEBUG ((LM_DEBUG,
- "Invoking DT spawn without calling begin_scheduling_segment...\n"));
-
- ACE_CString data ("Harry Potter");
- current->spawn (&thread_action,
- const_cast<char *> (data.c_str ()),
- name,
- sched_param,
- implicit_sched_param,
- 0,
- 0);
- }
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "Invoking DT spawn without calling begin_scheduling_segment...\n"));
+
+ ACE_CString data ("Harry Potter");
+ current->spawn (&thread_action,
+ const_cast<char *> (data.c_str ()),
+ name,
+ sched_param,
+ implicit_sched_param,
+ 0,
+ 0);
+ }
catch (const CORBA::BAD_INV_ORDER& )
- {
- ACE_DEBUG ((LM_DEBUG,
- "Spawn should be in the context of a Scheduling Segment - Expected Exception\n"));
- }
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "Spawn should be in the context of a Scheduling Segment - Expected Exception\n"));
+ }
catch (const CORBA::Exception& ex)
- {
- ex._tao_print_exception ("\n");
- }
+ {
+ ex._tao_print_exception ("\n");
+ }
ACE_DEBUG ((LM_DEBUG,
- "Start - Scheduling Segment...\n"));
+ "Start - Scheduling Segment...\n"));
current->begin_scheduling_segment ("Potter",
- sched_param,
- implicit_sched_param);
+ sched_param,
+ implicit_sched_param);
size_t count = 0;
ACE_OS::memcpy (&count,
- current->id ()->get_buffer (),
- current->id ()->length ());
+ current->id ()->get_buffer (),
+ current->id ()->length ());
ACE_DEBUG ((LM_DEBUG,
- "The Current DT Guid is %d\n",
- count));
+ "The Current DT Guid is %d\n",
+ count));
//Initialize data to be passed to the Thread_Action::do method
Data spawn_data;
@@ -87,21 +86,20 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
spawn_data.current = RTScheduling::Current::_duplicate (current.in ());
ACE_DEBUG ((LM_DEBUG,
- "Spawning a new DT...\n"));
+ "Spawning a new DT...\n"));
RTScheduling::DistributableThread_var dt =
current->spawn (&thread_action,
- &spawn_data,
- "Chamber of Secrets",
- sched_param,
- implicit_sched_param,
- 0,
- 0);
+ &spawn_data,
+ "Chamber of Secrets",
+ sched_param,
+ implicit_sched_param,
+ 0,
+ 0);
current->end_scheduling_segment (name);
ACE_DEBUG ((LM_DEBUG,
- "End - Scheduling Segment %d\n",
- count));
-
+ "End - Scheduling Segment %d\n",
+ count));
}
catch (const CORBA::Exception& ex)
{
@@ -112,4 +110,3 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
return 0;
}
-
diff --git a/TAO/tests/RTScheduling/Scheduling_Interceptor/test_client.cpp b/TAO/tests/RTScheduling/Scheduling_Interceptor/test_client.cpp
index 1ddaf1c7aba..f513a44a2dc 100644
--- a/TAO/tests/RTScheduling/Scheduling_Interceptor/test_client.cpp
+++ b/TAO/tests/RTScheduling/Scheduling_Interceptor/test_client.cpp
@@ -58,8 +58,8 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
TAO_Scheduler* scheduler;
ACE_NEW_RETURN (scheduler,
- TAO_Scheduler (orb.in ()),
- -1);
+ TAO_Scheduler (orb.in ()),
+ -1);
safe_scheduler = scheduler;
manager->rtscheduler (scheduler);
@@ -104,7 +104,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
catch (const CORBA::THREAD_CANCELLED& )
{
ACE_DEBUG ((LM_DEBUG,
- "Distributable Thread Cancelled - Expected Exception\n"));
+ "Distributable Thread Cancelled - Expected Exception\n"));
server->shutdown ();
}
catch (const CORBA::Exception& ex)
diff --git a/TAO/tests/RTScheduling/Scheduling_Interceptor/test_server.cpp b/TAO/tests/RTScheduling/Scheduling_Interceptor/test_server.cpp
index 6a70be0ac7f..e3e33517523 100644
--- a/TAO/tests/RTScheduling/Scheduling_Interceptor/test_server.cpp
+++ b/TAO/tests/RTScheduling/Scheduling_Interceptor/test_server.cpp
@@ -13,7 +13,7 @@ class test_impl : public POA_test
public:
test_impl (CORBA::ORB_ptr orb,
- RTScheduling::Current_ptr current)
+ RTScheduling::Current_ptr current)
: orb_ (orb),
current_ (RTScheduling::Current::_duplicate (current))
{
@@ -22,15 +22,15 @@ public:
virtual void one_way (const char * message)
{
ACE_DEBUG ((LM_DEBUG,
- "One-Way Message = %s\n",
- message));
+ "One-Way Message = %s\n",
+ message));
}
virtual char * two_way (const char * message)
{
ACE_DEBUG ((LM_DEBUG,
- "Two-Way Message = %s\n",
- message));
+ "Two-Way Message = %s\n",
+ message));
RTScheduling::DistributableThread_var DT =
this->current_->lookup (*(this->current_->id ()));
@@ -54,7 +54,7 @@ private:
int
parse_args (int argc,
- ACE_TCHAR* argv [])
+ ACE_TCHAR* argv [])
{
// Parse command line arguments
ACE_Get_Opt opts (argc, argv, "f:");
@@ -64,13 +64,13 @@ parse_args (int argc,
{
switch (c)
{
- case 'f':
- filename = opts.opt_arg ();
- break;
+ case 'f':
+ filename = opts.opt_arg ();
+ break;
default:
ACE_DEBUG ((LM_DEBUG, "Unknown Option\n"));
return -1;
- }
+ }
}
return 0;
}
@@ -81,20 +81,20 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
try
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
- "");
+ CORBA::ORB_init (argc,
+ argv,
+ "");
parse_args (argc, argv);
CORBA::Object_var object =
- orb->resolve_initial_references ("RootPOA");
+ orb->resolve_initial_references ("RootPOA");
PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (object.in ());
+ PortableServer::POA::_narrow (object.in ());
PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager ();
+ root_poa->the_POAManager ();
poa_manager->activate ();
@@ -104,32 +104,32 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
test_impl* test_i;
ACE_NEW_RETURN (test_i,
- test_impl (orb.in (),
- current.in ()),
- -1);
+ test_impl (orb.in (),
+ current.in ()),
+ -1);
PortableServer::ObjectId_var id;
id = root_poa->activate_object (test_i);
CORBA::Object_var server =
- root_poa->id_to_reference (id.in ());
+ root_poa->id_to_reference (id.in ());
CORBA::String_var ior;
if (!CORBA::is_nil (server.in ()))
- {
- ior = orb->object_to_string (server.in ());
- }
+ {
+ ior = orb->object_to_string (server.in ());
+ }
else
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "Failed to activate test object\n"),
- -1);
- }
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Failed to activate test object\n"),
+ -1);
+ }
ACE_DEBUG ((LM_DEBUG,
- "IOR = %s\n",
- ior.in ()));
+ "IOR = %s\n",
+ ior.in ()));
CORBA::Object_var manager_obj = orb->resolve_initial_references ("RTSchedulerManager");
@@ -140,16 +140,16 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
// Print ior to the file.
if (filename != 0)
- {
- FILE* output_file = ACE_OS::fopen (filename, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- filename),
- -1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
+ {
+ FILE* output_file = ACE_OS::fopen (filename, "w");
+ if (output_file == 0)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Cannot open output file for writing IOR: %s",
+ filename),
+ -1);
+ ACE_OS::fprintf (output_file, "%s", ior.in ());
+ ACE_OS::fclose (output_file);
+ }
orb->run ();
}
@@ -161,19 +161,3 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
return 0;
}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/TAO/tests/RTScheduling/Thread_Cancel/test.cpp b/TAO/tests/RTScheduling/Thread_Cancel/test.cpp
index 8e343179baf..698dee4a284 100644
--- a/TAO/tests/RTScheduling/Thread_Cancel/test.cpp
+++ b/TAO/tests/RTScheduling/Thread_Cancel/test.cpp
@@ -12,9 +12,9 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
try
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc,
- argv,
- "");
+ CORBA::ORB_init (argc,
+ argv,
+ "");
CORBA::Object_var manager_obj = orb->resolve_initial_references ("RTSchedulerManager");
@@ -29,14 +29,13 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
task.activate_task (orb.in ());
ACE_DEBUG ((LM_DEBUG,
- "Waiting for Threads to Activate...\n"));
+ "Waiting for Threads to Activate...\n"));
ACE_OS::sleep (5);
ACE_DEBUG ((LM_DEBUG,
- "Threads Activated\n"));
-
+ "Threads Activated\n"));
ACE_DEBUG ((LM_DEBUG,
- "Cancelling Threads.....\n"));
+ "Cancelling Threads.....\n"));
CORBA::Object_var current_obj = orb->resolve_initial_references ("RTScheduler_Current");
@@ -61,4 +60,3 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
return 0;
}
-
diff --git a/TAO/tests/RTScheduling/VoidData/test.h b/TAO/tests/RTScheduling/VoidData/test.h
index 36965973ece..6bb9b97b36a 100644
--- a/TAO/tests/RTScheduling/VoidData/test.h
+++ b/TAO/tests/RTScheduling/VoidData/test.h
@@ -9,8 +9,8 @@ class test_impl :public test
{
ACE_DEBUG ((LM_DEBUG,
- "Void Data Passed to method %d\n",
- *(int*)something));
+ "Void Data Passed to method %d\n",
+ *(int*)something));
}
};
diff --git a/TAO/tests/Timed_Buffered_Oneways/client.cpp b/TAO/tests/Timed_Buffered_Oneways/client.cpp
index d39621db91c..d4692ad38e1 100644
--- a/TAO/tests/Timed_Buffered_Oneways/client.cpp
+++ b/TAO/tests/Timed_Buffered_Oneways/client.cpp
@@ -217,12 +217,12 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
"client:\t%d took\t%dms\n",
i, (end - start).msec ()));
- // Interval between successive calls.
- ACE_Time_Value sleep_interval (0, interval * 1000);
+ // Interval between successive calls.
+ ACE_Time_Value sleep_interval (0, interval * 1000);
- // If we don't run the orb, then no data will be sent, and no
- // connection will be made initially.
- orb->run (sleep_interval);
+ // If we don't run the orb, then no data will be sent, and no
+ // connection will be made initially.
+ orb->run (sleep_interval);
}
catch (const CORBA::TIMEOUT& )
{
@@ -263,6 +263,5 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
return -1;
}
-
return 0;
}
diff --git a/TAO/tests/objref_comparison_test/main.cpp b/TAO/tests/objref_comparison_test/main.cpp
index cd5d91e2de0..54b1d15a379 100644
--- a/TAO/tests/objref_comparison_test/main.cpp
+++ b/TAO/tests/objref_comparison_test/main.cpp
@@ -78,7 +78,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
CORBA::Object_var o = s_orb->resolve_initial_references ("RootPOA");
PortableServer::POA_var rootpoa = PortableServer::POA::_narrow (o.in());
if (CORBA::is_nil (rootpoa.in()))
- ACE_ERROR_RETURN ((LM_ERROR, "(%P|%t): failed to get root poa\n"), 1);
+ ACE_ERROR_RETURN ((LM_ERROR, "(%P|%t): failed to get root poa\n"), 1);
PortableServer::POAManager_var poamgr = rootpoa->the_POAManager();
@@ -102,29 +102,28 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[])
server.activate(1); // activate one thread running the task
foo_var f = foo::_narrow (o.in()); // ignore the possibility that
- // it's not a 'foo' since we
- // created it above
+ // it's not a 'foo' since we
+ // created it above
int const iterations = 10;
ACE_DEBUG ((LM_DEBUG, "(%P|%t) client: next %d iterations should match\n",
- iterations));
+ iterations));
for (int i = 0; i < iterations; ++i)
- {
- CORBA::Boolean b = f->match_references ();
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) client: iteration %d, match = %d\n",
- i, b));
- }
+ {
+ CORBA::Boolean b = f->match_references ();
+ ACE_DEBUG ((LM_DEBUG, "(%P|%t) client: iteration %d, match = %d\n",
+ i, b));
+ }
ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) client: next %d iterations should NOT match\n",
- iterations));
+ "(%P|%t) client: next %d iterations should NOT match\n",
+ iterations));
for (int i = 0; i < iterations; ++i)
- {
- CORBA::Boolean b = f2->match_references ();
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) client: iteration %d, match = %d\n",
- i, b));
- }
-
+ {
+ CORBA::Boolean b = f2->match_references ();
+ ACE_DEBUG ((LM_DEBUG, "(%P|%t) client: iteration %d, match = %d\n",
+ i, b));
+ }
}
catch (...)
{