diff options
author | mcorino <mcorino@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2011-11-05 18:18:12 +0000 |
---|---|---|
committer | mcorino <mcorino@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2011-11-05 18:18:12 +0000 |
commit | c62e479344c6b02a6a8b80bb4e8a6ac3704265e1 (patch) | |
tree | ab3ff1e9ac456b4f4f2bd35f2c411aeecf64cce8 | |
parent | bac629800fdb5d4d6ce3cfb92e33697d7a21a0d9 (diff) | |
download | ATCD-c62e479344c6b02a6a8b80bb4e8a6ac3704265e1.tar.gz |
Sat Nov 05 18:18:13 UTC 2011 Martin Corino <mcorino@remedy.nl>
-rw-r--r-- | TAO/ChangeLog | 5 | ||||
-rw-r--r-- | TAO/tests/Bug_3531b_Regression/server.cpp | 66 |
2 files changed, 38 insertions, 33 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index dde7b5cae1f..70d30b69ab0 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,8 @@ +Sat Nov 05 18:18:13 UTC 2011 Martin Corino <mcorino@remedy.nl> + + * tests/Bug_3531b_Regression/server.cpp: + Fixed WChar build problems. + Fri Nov 4 07:28:29 UTC 2011 Johnny Willemsen <jwillemsen@remedy.nl> * docs/Options.html: diff --git a/TAO/tests/Bug_3531b_Regression/server.cpp b/TAO/tests/Bug_3531b_Regression/server.cpp index 9087887df96..36015fb5a10 100644 --- a/TAO/tests/Bug_3531b_Regression/server.cpp +++ b/TAO/tests/Bug_3531b_Regression/server.cpp @@ -32,9 +32,9 @@ bool debug = false; class Worker; int -parse_args (int argc, char *argv[]) +parse_args (int argc, ACE_TCHAR *argv[]) { - ACE_Get_Opt get_opts (argc, argv, "d"); + ACE_Get_Opt get_opts (argc, argv, ACE_TEXT ("d")); int c; while ((c = get_opts ()) != -1) @@ -92,7 +92,7 @@ ACE_TSS<Worker> *workers_p = 0; int Worker::svc (void) { if (debug) - ACE_DEBUG ((LM_DEBUG, "(%P|%t) Worker thread starting up.\n")); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) Worker thread starting up.\n"))); // Register this worker workers.ts_object (const_cast<Worker*> (this)); int retval = 0; @@ -101,7 +101,7 @@ int Worker::svc (void) retval = this->process_cmd (); } if (debug) - ACE_DEBUG ((LM_DEBUG, "(%P|%t) Worker thread shutting down.\n")); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) Worker thread shutting down.\n"))); return retval; } @@ -122,7 +122,7 @@ int Worker::process_cmd (void) ACE_Message_Block *mb = 0; if (this->getq (mb, 0) == -1) { - ACE_ERROR ((LM_ERROR, "Error calling getq: $!\n")); + ACE_ERROR ((LM_ERROR, ACE_TEXT ("Error calling getq: $!\n"))); // Strangely, message queues return this instead of ETIME if (errno == EWOULDBLOCK || errno == ESHUTDOWN) return 0; @@ -161,7 +161,7 @@ public: virtual int handle_events (ACE_Time_Value * = 0) { if (TAO_debug_level > 10) - ACE_DEBUG ((LM_DEBUG, "(%P|%t) Executing Test_Reactor::handle_events\n")); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) Executing Test_Reactor::handle_events\n"))); // This is called by client leader threads. Note, the loop here // glosses over the fact that the Leader_Follower code does not // work quite the way we want it to. Namely, this logic: @@ -247,7 +247,7 @@ public: void complete_event (TAO_Leader_Follower &lf) { if (debug) - ACE_DEBUG ((LM_DEBUG, "(%P|%t) Completing event\n")); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) Completing event\n"))); this->state_changed (TAO_LF_Event::LFS_SUCCESS, lf); } @@ -342,7 +342,7 @@ public: virtual int execute (Worker* worker) { if (debug) - ACE_DEBUG ((LM_DEBUG, "(%P|%t) Shutdown cmd\n")); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) Shutdown cmd\n"))); worker->shutdown (true); return 0; } @@ -365,7 +365,7 @@ public: virtual int execute (Worker*) { if (debug) - ACE_DEBUG ((LM_DEBUG, "(%P|%t) Executing TSS_Assert(%d,%d,%d) cmd\n", + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) Executing TSS_Assert(%d,%d,%d) cmd\n"), elt_count_, clt_count_, leader_available_)); TAO_Leader_Follower &leader_follower = orb_core_->leader_follower (); TAO_ORB_Core_TSS_Resources* tss = orb_core_->get_tss_resources (); @@ -393,7 +393,7 @@ public: virtual int execute (Worker*) { if (debug) - ACE_DEBUG ((LM_DEBUG, "(%P|%t) Executing Wait_For_Event cmd\n")); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) Executing Wait_For_Event cmd\n"))); int retval = lf_.wait_for_event (&event_, &transport_, 0); // The worker has probably been shutdown in order for the client // leader event loop to exit - reactivate the worker so it from @@ -419,7 +419,7 @@ public: virtual int execute (Worker*) { if (debug) - ACE_DEBUG ((LM_DEBUG, "(%P|%t) Executing Cond_Signal cmd\n")); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) Executing Cond_Signal cmd\n"))); ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, guard ,this->cond_.mutex (), 0); return this->cond_.signal (); } @@ -459,7 +459,7 @@ public: virtual int execute (Worker* worker) { if (debug) - ACE_DEBUG ((LM_DEBUG, "(%P|%t) Executing Event_Loop_Thread cmd\n")); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) Executing Event_Loop_Thread cmd\n"))); TAO_LF_Event_Loop_Thread_Helper elt (lf_, lf_strategy_, 0); while (!worker->shutdown()) worker->process_cmd (); @@ -484,7 +484,7 @@ public: virtual int execute (Worker*) { if (debug) - ACE_DEBUG ((LM_DEBUG, "(%P|%t) Executing Set_Upcall_Thread cmd\n")); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) Executing Set_Upcall_Thread cmd\n"))); lf_.set_upcall_thread (); return 0; } @@ -514,8 +514,8 @@ void Test_1 (TAO_ORB_Core* orb_core) TAO_Leader_Follower &leader_follower = orb_core->leader_follower (); TAO_ORB_Core_TSS_Resources* tss = orb_core->get_tss_resources (); - ACE_DEBUG ((LM_DEBUG, "==========\n")); - ACE_DEBUG ((LM_DEBUG, "TEST #1 - Simple Event Loop call\n")); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("==========\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("TEST #1 - Simple Event Loop call\n"))); TSS_ASSERT (tss, leader_follower, 0, 0, false); @@ -535,8 +535,8 @@ void Test_2 (TAO_ORB_Core* orb_core) TAO_LF_Strategy &lf_strategy = orb_core->lf_strategy (); TAO_Leader_Follower &leader_follower = orb_core->leader_follower (); TAO_ORB_Core_TSS_Resources* tss = orb_core->get_tss_resources (); - ACE_DEBUG ((LM_DEBUG, "==========\n")); - ACE_DEBUG ((LM_DEBUG, "TEST #2 - 2 nested Event Loop calls\n")); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("==========\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("TEST #2 - 2 nested Event Loop calls\n"))); TSS_ASSERT (tss, leader_follower, 0, 0, false); @@ -563,8 +563,8 @@ void Test_3 (TAO_ORB_Core* orb_core) TAO_LF_Strategy &lf_strategy = orb_core->lf_strategy (); TAO_Leader_Follower &leader_follower = orb_core->leader_follower (); TAO_ORB_Core_TSS_Resources* tss = orb_core->get_tss_resources (); - ACE_DEBUG ((LM_DEBUG, "==========\n")); - ACE_DEBUG ((LM_DEBUG, "TEST #3 - 2 nested Event Loop calls with set_upcall_thread\n")); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("==========\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("TEST #3 - 2 nested Event Loop calls with set_upcall_thread\n"))); TSS_ASSERT (tss, leader_follower, 0, 0, false); @@ -592,8 +592,8 @@ void Test_3 (TAO_ORB_Core* orb_core) void Test_4 (TAO_ORB_Core* orb_core) { TAO_Leader_Follower &leader_follower = orb_core->leader_follower (); - ACE_DEBUG ((LM_DEBUG, "==========\n")); - ACE_DEBUG ((LM_DEBUG, "TEST #4 - Simple Client Leader thread\n")); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("==========\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("TEST #4 - Simple Client Leader thread\n"))); // Activate a thread Worker wrk1; @@ -631,8 +631,8 @@ void Test_4 (TAO_ORB_Core* orb_core) void Test_5 (TAO_ORB_Core* orb_core) { TAO_Leader_Follower &leader_follower = orb_core->leader_follower (); - ACE_DEBUG ((LM_DEBUG, "==========\n")); - ACE_DEBUG ((LM_DEBUG, "TEST #5 - 2 nested Client Leader calls\n")); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("==========\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("TEST #5 - 2 nested Client Leader calls\n"))); // Activate a thread Worker wrk1; @@ -692,8 +692,8 @@ void Test_5 (TAO_ORB_Core* orb_core) void Test_6 (TAO_ORB_Core* orb_core) { TAO_Leader_Follower &leader_follower = orb_core->leader_follower (); - ACE_DEBUG ((LM_DEBUG, "==========\n")); - ACE_DEBUG ((LM_DEBUG, "TEST #6 - 2 nested Client Leader calls with set_upcall_thread\n")); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("==========\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("TEST #6 - 2 nested Client Leader calls with set_upcall_thread\n"))); // Activate a thread Worker wrk1; @@ -757,8 +757,8 @@ void Test_6 (TAO_ORB_Core* orb_core) void Test_7 (TAO_ORB_Core* orb_core) { TAO_Leader_Follower &leader_follower = orb_core->leader_follower (); - ACE_DEBUG ((LM_DEBUG, "==========\n")); - ACE_DEBUG ((LM_DEBUG, "TEST #7 - Client Leader yields to another client thread\n")); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("==========\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("TEST #7 - Client Leader yields to another client thread\n"))); // Activate a thread Worker wrk1; @@ -826,8 +826,8 @@ void Test_8 (TAO_ORB_Core* orb_core) { TAO_LF_Strategy &lf_strategy = orb_core->lf_strategy (); TAO_Leader_Follower &leader_follower = orb_core->leader_follower (); - ACE_DEBUG ((LM_DEBUG, "==========\n")); - ACE_DEBUG ((LM_DEBUG, "TEST #8 - client becomes leader when event thread dispatched\n")); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("==========\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("TEST #8 - client becomes leader when event thread dispatched\n"))); // Activate a thread Worker wrk1; @@ -891,8 +891,8 @@ void Test_9 (TAO_ORB_Core* orb_core) { TAO_LF_Strategy &lf_strategy = orb_core->lf_strategy (); TAO_Leader_Follower &leader_follower = orb_core->leader_follower (); - ACE_DEBUG ((LM_DEBUG, "==========\n")); - ACE_DEBUG ((LM_DEBUG, "TEST #9 - Client Leader thread yields to Event Loop thread\n")); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("==========\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("TEST #9 - Client Leader thread yields to Event Loop thread\n"))); // Activate a thread Worker wrk1; @@ -972,8 +972,8 @@ void Test_10 (TAO_ORB_Core* orb_core ) { TAO_LF_Strategy &lf_strategy = orb_core->lf_strategy (); TAO_Leader_Follower &leader_follower = orb_core->leader_follower (); - ACE_DEBUG ((LM_DEBUG, "==========\n")); - ACE_DEBUG ((LM_DEBUG, "TEST #10 - ET1437460\n")); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("==========\n"))); + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("TEST #10 - ET1437460\n"))); // This scenario involves: // - an event loop thread |