diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2019-04-26 07:52:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-26 07:52:51 +0200 |
commit | 629588a38264e5ff3d2fd2a0c8f866d863b332b7 (patch) | |
tree | e08cb15d12d2994bd53be3db616c98a80321e4a0 | |
parent | 26212992b6723c287d231fa0a6b8e2ebf059533c (diff) | |
parent | b940c3951fb908fcdaa3c8490803ac7459dfc0a5 (diff) | |
download | ATCD-629588a38264e5ff3d2fd2a0c8f866d863b332b7.tar.gz |
Merge pull request #893 from jwillemsen/jwi-implreprestart-889
Fixed race condition in the ImplRepo on server shutdown/restart
77 files changed, 582 insertions, 545 deletions
diff --git a/.gitignore b/.gitignore index 4a0cd8c7d6a..e2d2569b480 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ *.vcxproj* *.tlog *.log -*.obj +*.obj* *.ilk *.exe *.dll @@ -15,6 +15,7 @@ *S_T.cpp *S_T.h *S_T.inl +*.bmak .depend.* GNUmakefile* @@ -39,4 +40,6 @@ ipch/ *.o *.res *.opendb -*.VC.db +*.VC.db* +*.tds +*.*codeanalysis* diff --git a/ACE/ace/Event_Handler.cpp b/ACE/ace/Event_Handler.cpp index 82e6879bed1..6a44bf58eea 100644 --- a/ACE/ace/Event_Handler.cpp +++ b/ACE/ace/Event_Handler.cpp @@ -16,7 +16,6 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL // Implement conceptually abstract virtual functions in the base class // so derived classes don't have to implement unused ones. - ACE_Event_Handler::ACE_Event_Handler (ACE_Reactor *r, int p) : reference_count_ (1), @@ -33,7 +32,6 @@ ACE_Event_Handler::~ACE_Event_Handler (void) } // Gets the file descriptor associated with this I/O device. - ACE_HANDLE ACE_Event_Handler::get_handle (void) const { @@ -42,7 +40,6 @@ ACE_Event_Handler::get_handle (void) const } // Sets the file descriptor associated with this I/O device. - void ACE_Event_Handler::set_handle (ACE_HANDLE) { @@ -50,7 +47,6 @@ ACE_Event_Handler::set_handle (ACE_HANDLE) } // Gets the priority of this handler. - int ACE_Event_Handler::priority (void) const { @@ -59,7 +55,6 @@ ACE_Event_Handler::priority (void) const } // Sets the priority - void ACE_Event_Handler::priority (int priority) { @@ -69,7 +64,6 @@ ACE_Event_Handler::priority (int priority) // Called when the object is about to be removed from the Dispatcher // tables. - int ACE_Event_Handler::handle_close (ACE_HANDLE, ACE_Reactor_Mask) { @@ -78,7 +72,6 @@ ACE_Event_Handler::handle_close (ACE_HANDLE, ACE_Reactor_Mask) } // Called when input becomes available on fd. - int ACE_Event_Handler::handle_input (ACE_HANDLE) { @@ -87,7 +80,6 @@ ACE_Event_Handler::handle_input (ACE_HANDLE) } // Called when output is possible on fd. - int ACE_Event_Handler::handle_output (ACE_HANDLE) { @@ -96,7 +88,6 @@ ACE_Event_Handler::handle_output (ACE_HANDLE) } // Called when urgent data is available on fd. - int ACE_Event_Handler::handle_exception (ACE_HANDLE) { @@ -105,7 +96,6 @@ ACE_Event_Handler::handle_exception (ACE_HANDLE) } // Called when timer expires, TV stores the current time. - int ACE_Event_Handler::handle_timeout (const ACE_Time_Value &, const void *) { @@ -114,7 +104,6 @@ ACE_Event_Handler::handle_timeout (const ACE_Time_Value &, const void *) } // Called when a monitored Process exits - int ACE_Event_Handler::handle_exit (ACE_Process *) { @@ -123,7 +112,6 @@ ACE_Event_Handler::handle_exit (ACE_Process *) } // Called when a registered signal occurs. - int ACE_Event_Handler::handle_signal (int, siginfo_t *, ucontext_t *) { @@ -141,7 +129,6 @@ ACE_Event_Handler::resume_handler (void) return ACE_Event_Handler::ACE_REACTOR_RESUMES_HANDLER; } - int ACE_Event_Handler::handle_qos (ACE_HANDLE) { diff --git a/ACE/ace/Process_Manager.cpp b/ACE/ace/Process_Manager.cpp index f50b5584c68..e5d30024f14 100644 --- a/ACE/ace/Process_Manager.cpp +++ b/ACE/ace/Process_Manager.cpp @@ -53,7 +53,7 @@ ACE_ALLOC_HOOK_DEFINE(ACE_Process_Manager) // Singleton instance. ACE_Process_Manager *ACE_Process_Manager::instance_ = 0; -// Controls whether the <Process_Manager> is deleted when we shut down +// Controls whether the Process_Manager is deleted when we shut down // (we can only delete it safely if we created it!) bool ACE_Process_Manager::delete_instance_ = false; @@ -219,7 +219,6 @@ ACE_Process_Manager::resize (size_t size) } // Create and initialize the table to keep track of the process pool. - int ACE_Process_Manager::open (size_t size, ACE_Reactor *r) { @@ -243,7 +242,6 @@ ACE_Process_Manager::open (size_t size, ACE_Reactor *r) } // Initialize the synchronization variables. - ACE_Process_Manager::ACE_Process_Manager (size_t size, ACE_Reactor *r) : ACE_Event_Handler (), @@ -266,7 +264,6 @@ ACE_Process_Manager::ACE_Process_Manager (size_t size, } // Close up and release all resources. - int ACE_Process_Manager::close (void) { @@ -313,7 +310,6 @@ ACE_Process_Manager::~ACE_Process_Manager (void) // routine, which fooled the Reactor into thinking that this routine // needed to be called. Since we don't know which Process exited, we // must reap as many exit statuses as are immediately available. - int ACE_Process_Manager::handle_input (ACE_HANDLE) { @@ -322,8 +318,7 @@ ACE_Process_Manager::handle_input (ACE_HANDLE) pid_t pid; do - pid = this->wait (0, - ACE_Time_Value::zero); + pid = this->wait (0, ACE_Time_Value::zero); while (pid != 0 && pid != ACE_INVALID_PID); return 0; @@ -351,7 +346,6 @@ ACE_Process_Manager::handle_close (ACE_HANDLE /* handle */, // // On Win32, this routine is called synchronously, and is passed the // HANDLE of the Process that exited, so we can do all our work here. - int ACE_Process_Manager::handle_signal (int, siginfo_t *si, @@ -431,7 +425,6 @@ ACE_Process_Manager::register_handler (ACE_Event_Handler *eh, } // Create a new process. - pid_t ACE_Process_Manager::spawn (ACE_Process_Options &options, ACE_Event_Handler *event_handler) @@ -449,7 +442,6 @@ ACE_Process_Manager::spawn (ACE_Process_Options &options, } // Create a new process. - pid_t ACE_Process_Manager::spawn (ACE_Process *process, ACE_Process_Options &options, @@ -474,7 +466,6 @@ ACE_Process_Manager::spawn (ACE_Process *process, } // Create N new processs. - int ACE_Process_Manager::spawn_n (size_t n, ACE_Process_Options &options, @@ -506,7 +497,6 @@ ACE_Process_Manager::spawn_n (size_t n, // Append a process into the pool (does not check for duplicates). // Must be called with locks held. - int ACE_Process_Manager::append_proc (ACE_Process *proc, ACE_Event_Handler *event_handler) @@ -545,7 +535,6 @@ ACE_Process_Manager::append_proc (ACE_Process *proc, // Insert a process into the pool (checks for duplicates and doesn't // allow them to be inserted twice). - int ACE_Process_Manager::insert_proc (ACE_Process *proc, ACE_Event_Handler *event_handler) @@ -561,7 +550,6 @@ ACE_Process_Manager::insert_proc (ACE_Process *proc, } // Remove a process from the pool. - int ACE_Process_Manager::remove (pid_t pid) { @@ -579,7 +567,6 @@ ACE_Process_Manager::remove (pid_t pid) } // Remove a process from the pool. Must be called with locks held. - int ACE_Process_Manager::remove_proc (size_t i) { @@ -654,7 +641,6 @@ ACE_Process_Manager::terminate (pid_t pid, int sig) return ACE_OS::kill (pid, sig); } - int ACE_Process_Manager::set_scheduler (const ACE_Sched_Params & params, pid_t pid) @@ -694,7 +680,6 @@ ACE_Process_Manager::set_scheduler_all (const ACE_Sched_Params & params) // Locate the index in the table associated with <pid>. Must be // called with the lock held. - ssize_t ACE_Process_Manager::find_proc (pid_t pid) { @@ -714,7 +699,6 @@ ACE_Process_Manager::find_proc (pid_t pid) #if defined (ACE_WIN32) // Locate the index in the table associated with <h>. Must be // called with the lock held. - ssize_t ACE_Process_Manager::find_proc (ACE_HANDLE h) { @@ -732,9 +716,8 @@ ACE_Process_Manager::find_proc (ACE_HANDLE h) } #endif /* ACE_WIN32 */ -// Wait for all the Processs to exit, or until <timeout> elapses. +// Wait for all the Processs to exit, or until @a timeout elapses. // Returns the number of Processes remaining, or -1 on an error. - int ACE_Process_Manager::wait (const ACE_Time_Value &timeout) { @@ -773,7 +756,6 @@ ACE_Process_Manager::wait (const ACE_Time_Value &timeout) // near as possible -- on Unix, we might accidentally get some other // Process_Manager's Process, or an unmanaged Process, or a child // process started by some other means. - pid_t ACE_Process_Manager::wait (pid_t pid, ACE_exitcode *status) @@ -785,10 +767,9 @@ ACE_Process_Manager::wait (pid_t pid, status); } -// Collect a single child processes' exit status, unless <timeout> +// Collect a single child processes' exit status, unless @a timeout // elapses before the process exits. Same caveats about accidental // Process reaping on Unix as above. - pid_t ACE_Process_Manager::wait (pid_t pid, const ACE_Time_Value &timeout, @@ -985,7 +966,6 @@ ACE_Process_Manager::wait (pid_t pid, // Notify either the process-specific handler or the generic handler. // If process-specific, call handle_close on the handler. Returns 1 // if process found, 0 if not. Must be called with locks held. - int ACE_Process_Manager::notify_proc_handler (size_t i, ACE_exitcode exit_code) @@ -1002,9 +982,7 @@ ACE_Process_Manager::notify_proc_handler (size_t i, else if (this->default_exit_handler_ != 0 && this->default_exit_handler_->handle_exit (proc_desc.process_) < 0) { - this->default_exit_handler_->handle_close - (ACE_INVALID_HANDLE, - 0); + this->default_exit_handler_->handle_close (ACE_INVALID_HANDLE, 0); this->default_exit_handler_ = 0; } return 1; diff --git a/ACE/tests/MT_Reference_Counted_Event_Handler_Test.cpp b/ACE/tests/MT_Reference_Counted_Event_Handler_Test.cpp index f069c1a9056..bae36ea9c0e 100644 --- a/ACE/tests/MT_Reference_Counted_Event_Handler_Test.cpp +++ b/ACE/tests/MT_Reference_Counted_Event_Handler_Test.cpp @@ -19,7 +19,6 @@ */ //============================================================================= - #include "test_config.h" #include "ace/Reactor.h" #include "ace/Select_Reactor.h" @@ -36,8 +35,6 @@ #include "ace/OS_NS_sys_socket.h" #include "ace/OS_NS_unistd.h" - - #if defined (ACE_HAS_THREADS) && !defined ACE_LACKS_ACCEPT static const char message[] = "abcdefghijklmnopqrstuvwxyz"; @@ -1313,8 +1310,7 @@ test<REACTOR_IMPL>::test (int ignore_nested_upcalls, if (!test_configs[i][1] && require_event_loop_thread) continue; - ACE_Reactor reactor (new REACTOR_IMPL, - 1); + ACE_Reactor reactor (new REACTOR_IMPL, true); testing (&reactor, test_configs[i][0], diff --git a/ACE/tests/Process_Manager_Test.cpp b/ACE/tests/Process_Manager_Test.cpp index 1c13e36df59..d08152588d6 100644 --- a/ACE/tests/Process_Manager_Test.cpp +++ b/ACE/tests/Process_Manager_Test.cpp @@ -17,7 +17,6 @@ */ //============================================================================= - #include "test_config.h" #include "ace/SString.h" #include "ace/Atomic_Op.h" @@ -30,8 +29,6 @@ #include "ace/Thread.h" #include "ace/Reactor.h" - - static u_int debug_test = 0; #if defined (ACE_HAS_WIN32_PRIORITY_CLASS) static u_int process_id = 0; @@ -361,7 +358,6 @@ run_main (int argc, ACE_TCHAR *argv[]) test_status = result; // Try the explicit <ACE_Process_Manager::wait> functions - ACE_Process_Manager mgr; mgr.register_handler (new Exit_Handler ("default")); diff --git a/ACE/tests/Reactor_Exceptions_Test.cpp b/ACE/tests/Reactor_Exceptions_Test.cpp index 2796ac8ee6a..fe06d7813a9 100644 --- a/ACE/tests/Reactor_Exceptions_Test.cpp +++ b/ACE/tests/Reactor_Exceptions_Test.cpp @@ -1,4 +1,3 @@ - //============================================================================= /** * @file Reactor_Exceptions_Test.cpp diff --git a/ACE/tests/Timer_Cancellation_Test.cpp b/ACE/tests/Timer_Cancellation_Test.cpp index 30f4b9cc41b..b48f2a8849c 100644 --- a/ACE/tests/Timer_Cancellation_Test.cpp +++ b/ACE/tests/Timer_Cancellation_Test.cpp @@ -1,4 +1,3 @@ - //============================================================================= /** * @file Timer_Cancellation_Test.cpp @@ -9,15 +8,12 @@ */ //============================================================================= - #include "test_config.h" #include "ace/OS_NS_unistd.h" #include "ace/Reactor.h" #include "ace/TP_Reactor.h" #include "ace/Task.h" - - #if defined (ACE_HAS_THREADS) class Deadlock : public ACE_Task_Base @@ -116,8 +112,7 @@ run_main (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("Timer_Cancellation_Test")); - ACE_Reactor reactor (new ACE_TP_Reactor, - 1); + ACE_Reactor reactor (new ACE_TP_Reactor, true); Deadlock deadlock; deadlock.reactor (&reactor); diff --git a/ACE/tests/WFMO_Reactor_Test.cpp b/ACE/tests/WFMO_Reactor_Test.cpp index 9e86f577607..ee85fa70acb 100644 --- a/ACE/tests/WFMO_Reactor_Test.cpp +++ b/ACE/tests/WFMO_Reactor_Test.cpp @@ -10,14 +10,11 @@ */ //============================================================================= - #include "test_config.h" #include "ace/Reactor.h" #include "ace/WFMO_Reactor.h" #include "ace/Pipe.h" - - #if defined (ACE_WIN32) static int number_of_handlers = 6; @@ -26,13 +23,11 @@ static int number_of_closes = 0; class Event_Handler : public ACE_Event_Handler { public: - Event_Handler (ACE_Reactor &reactor); ~Event_Handler (void); ACE_Pipe pipe_; - }; Event_Handler::Event_Handler (ACE_Reactor &reactor) @@ -78,7 +73,7 @@ test (void) int result = 0; int i = 0; - ACE_Reactor reactor (new ACE_WFMO_Reactor, 1); + ACE_Reactor reactor (new ACE_WFMO_Reactor, true); ACE_Event_Handler_var *safe_event_handlers = new ACE_Event_Handler_var[number_of_handlers]; @@ -1,6 +1,8 @@ USER VISIBLE CHANGES BETWEEN TAO-2.5.5 and TAO-2.5.6 ==================================================== +. Fixed race condition in ImplRepo on server shutdown/restart (#889) + USER VISIBLE CHANGES BETWEEN TAO-2.5.4 and TAO-2.5.5 ==================================================== diff --git a/TAO/TAO_IDL/be/be_visitor_enum/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_enum/any_op_cs.cpp index f0d794a7af0..62be2400733 100644 --- a/TAO/TAO_IDL/be/be_visitor_enum/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_enum/any_op_cs.cpp @@ -96,34 +96,33 @@ be_visitor_enum_any_op_cs::visit_enum (be_enum *node) be_util::gen_nested_namespace_begin (os, module); - // Generate the Any <<= and >>= operator declarations // Any <<= and >>= operators. *os << "void operator<<= (" << be_idt << be_idt_nl << "::CORBA::Any &_tao_any," << be_nl - << "::" << node->name () << " _tao_elem" << be_uidt_nl - << ")" << be_uidt_nl + << "::" << node->name () << " _tao_elem)" << be_uidt + << be_uidt_nl << "{" << be_idt_nl << "TAO::Any_Basic_Impl_T< ::" << node->name () << ">::insert (" << be_idt << be_idt_nl << "_tao_any," << be_nl << "::" << node->tc_name () << "," << be_nl - << "_tao_elem" << be_uidt_nl - << ");" << be_uidt << be_uidt_nl + << "_tao_elem);" << be_uidt + << be_uidt << be_uidt_nl << "}" << be_nl_2; *os << "::CORBA::Boolean operator>>= (" << be_idt << be_idt_nl << "const ::CORBA::Any &_tao_any," << be_nl - << "::" << node->name () << " &_tao_elem" << be_uidt_nl - << ")" << be_uidt_nl + << "::" << node->name () << " &_tao_elem)" << be_uidt + << be_uidt_nl << "{" << be_idt_nl << "return" << be_idt_nl << "TAO::Any_Basic_Impl_T< ::" << node->name () << ">::extract (" << be_idt << be_idt_nl << "_tao_any," << be_nl << "::" << node->tc_name () << "," << be_nl - << "_tao_elem " << be_uidt_nl - << ");" << be_uidt << be_uidt << be_uidt_nl + << "_tao_elem);" << be_uidt + << be_uidt << be_uidt << be_uidt_nl << "}"; be_util::gen_nested_namespace_end (os, module); @@ -140,29 +139,29 @@ be_visitor_enum_any_op_cs::visit_enum (be_enum *node) // Any <<= and >>= operators. *os << "void operator<<= (" << be_idt << be_idt_nl << "::CORBA::Any &_tao_any," << be_nl - << node->name () << " _tao_elem" << be_uidt_nl - << ")" << be_uidt_nl + << node->name () << " _tao_elem)" << be_uidt + << be_uidt_nl << "{" << be_idt_nl << "TAO::Any_Basic_Impl_T<" << node->name () << ">::insert (" << be_idt << be_idt_nl << "_tao_any," << be_nl << node->tc_name () << "," << be_nl - << "_tao_elem" << be_uidt_nl - << ");" << be_uidt << be_uidt_nl + << "_tao_elem);" << be_uidt + << be_uidt << be_uidt_nl << "}" << be_nl_2; *os << "::CORBA::Boolean operator>>= (" << be_idt << be_idt_nl << "const ::CORBA::Any &_tao_any," << be_nl - << node->name () << " &_tao_elem" << be_uidt_nl - << ")" << be_uidt_nl + << node->name () << " &_tao_elem)" << be_uidt + << be_uidt_nl << "{" << be_idt_nl << "return" << be_idt_nl << "TAO::Any_Basic_Impl_T<" << node->name () << ">::extract (" << be_idt << be_idt_nl << "_tao_any," << be_nl << node->tc_name () << "," << be_nl - << "_tao_elem " << be_uidt_nl - << ");" << be_uidt << be_uidt << be_uidt_nl + << "_tao_elem);" << be_uidt + << be_uidt << be_uidt << be_uidt_nl << "}"; *os << be_global->core_versioning_end () << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_exception/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_exception/any_op_cs.cpp index f6349ef0183..3f6ef5dea96 100644 --- a/TAO/TAO_IDL/be/be_visitor_exception/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_exception/any_op_cs.cpp @@ -135,51 +135,50 @@ be_visitor_exception_any_op_cs::visit_exception (be_exception *node) *os << be_nl_2 << "/// Copying insertion." << be_nl - << "void operator<<= (" << be_idt << be_idt_nl + << "void operator<<= (" << be_idt_nl << "::CORBA::Any &_tao_any," << be_nl - << "const ::" << node->name () << " &_tao_elem)" << be_uidt + << "const ::" << node->name () << " &_tao_elem)" << be_uidt_nl << "{" << be_idt_nl << "TAO::Any_Dual_Impl_T< ::" << node->name () << ">::insert_copy (" - << be_idt << be_idt_nl + << be_idt_nl << "_tao_any," << be_nl << "::" << node->name () << "::_tao_any_destructor," << be_nl << "::" << node->tc_name () << "," << be_nl << "_tao_elem);" << be_uidt - << be_uidt << be_uidt_nl + << be_uidt_nl << "}" << be_nl_2; // Non-copying insertion operator." *os << "/// Non-copying insertion." << be_nl - << "void operator<<= (" << be_idt << be_idt_nl + << "void operator<<= (" << be_idt_nl << "::CORBA::Any &_tao_any," << be_nl - << "::" << node->name () << " *_tao_elem)" << be_uidt + << "::" << node->name () << " *_tao_elem)" << be_uidt_nl << "{" << be_idt_nl << "TAO::Any_Dual_Impl_T< ::" << node->name () << ">::insert (" - << be_idt << be_idt_nl + << be_idt_nl << "_tao_any," << be_nl << "::" << node->name () << "::_tao_any_destructor," << be_nl << "::" << node->tc_name () << "," << be_nl << "_tao_elem);" << be_uidt - << be_uidt << be_uidt_nl + << be_uidt_nl << "}" << be_nl_2; // Extraction to const pointer operator. *os << "/// Extraction to const pointer." << be_nl - << "::CORBA::Boolean operator>>= (" << be_idt << be_idt_nl + << "::CORBA::Boolean operator>>= (" << be_idt_nl << "const ::CORBA::Any &_tao_any," << be_nl - << "const ::" << node->name () << " *&_tao_elem)" << be_uidt + << "const ::" << node->name () << " *&_tao_elem)" << be_uidt_nl << "{" << be_idt_nl - << "return" << be_idt_nl - << "TAO::Any_Dual_Impl_T< ::" << node->name () << ">::extract (" - << be_idt << be_idt_nl + << "return TAO::Any_Dual_Impl_T< ::" << node->name () << ">::extract (" + << be_idt_nl << "_tao_any," << be_nl << "::" << node->name () << "::_tao_any_destructor," << be_nl << "::" << node->tc_name () << "," << be_nl << "_tao_elem);" << be_uidt - << be_uidt << be_uidt << be_uidt_nl + << be_uidt_nl << "}"; be_util::gen_nested_namespace_end (os, module); @@ -197,51 +196,50 @@ be_visitor_exception_any_op_cs::visit_exception (be_exception *node) *os << be_nl_2 << "/// Copying insertion." << be_nl - << "void operator<<= (" << be_idt << be_idt_nl + << "void operator<<= (" << be_idt_nl << "::CORBA::Any &_tao_any," << be_nl - << "const " << node->name () << " &_tao_elem)" << be_uidt + << "const " << node->name () << " &_tao_elem)" << be_uidt_nl << "{" << be_idt_nl << "TAO::Any_Dual_Impl_T<" << node->name () << ">::insert_copy (" - << be_idt << be_idt_nl + << be_idt_nl << "_tao_any," << be_nl << node->name () << "::_tao_any_destructor," << be_nl << node->tc_name () << "," << be_nl << "_tao_elem);" << be_uidt - << be_uidt << be_uidt_nl + << be_uidt_nl << "}" << be_nl_2; // Non-copying insertion operator." *os << "/// Non-copying insertion." << be_nl - << "void operator<<= (" << be_idt << be_idt_nl + << "void operator<<= (" << be_idt_nl << "::CORBA::Any &_tao_any," << be_nl - << node->name () << " *_tao_elem)" << be_uidt + << node->name () << " *_tao_elem)" << be_uidt_nl << "{" << be_idt_nl << "TAO::Any_Dual_Impl_T<" << node->name () << ">::insert (" - << be_idt << be_idt_nl + << be_idt_nl << "_tao_any," << be_nl << node->name () << "::_tao_any_destructor," << be_nl << node->tc_name () << "," << be_nl << "_tao_elem);" << be_uidt - << be_uidt << be_uidt_nl + << be_uidt_nl << "}" << be_nl_2; // Extraction to const pointer operator. *os << "/// Extraction to const pointer." << be_nl - << "::CORBA::Boolean operator>>= (" << be_idt << be_idt_nl + << "::CORBA::Boolean operator>>= (" << be_idt_nl << "const ::CORBA::Any &_tao_any," << be_nl - << "const " << node->name () << " *&_tao_elem)" << be_uidt + << "const " << node->name () << " *&_tao_elem)" << be_uidt_nl << "{" << be_idt_nl - << "return" << be_idt_nl - << "TAO::Any_Dual_Impl_T<" << node->name () << ">::extract (" - << be_idt << be_idt_nl + << "return TAO::Any_Dual_Impl_T<" << node->name () << ">::extract (" + << be_idt_nl << "_tao_any," << be_nl << node->name () << "::_tao_any_destructor," << be_nl << node->tc_name () << "," << be_nl << "_tao_elem);" << be_uidt - << be_uidt << be_uidt << be_uidt_nl + << be_uidt_nl << "}"; *os << be_global->core_versioning_end () << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_exception/exception_cs.cpp b/TAO/TAO_IDL/be/be_visitor_exception/exception_cs.cpp index 884bae78ca8..c0e0427d1ba 100644 --- a/TAO/TAO_IDL/be/be_visitor_exception/exception_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_exception/exception_cs.cpp @@ -213,11 +213,9 @@ int be_visitor_exception_cs::visit_exception (be_exception *node) << node->name () << "::_tao_duplicate (void) const" << be_nl << "{" << be_idt_nl << "::CORBA::Exception *result = 0;" << be_nl - << "ACE_NEW_RETURN (" << be_idt << be_idt_nl - << "result," << be_nl - << "::" << node->name () << " (*this)," << be_nl - << "0);" << be_uidt - << be_uidt_nl + << "ACE_NEW_RETURN (result, " + << "::" << node->name () << " (*this), 0);" + << be_nl << "return result;" << be_uidt_nl << "}" << be_nl_2; diff --git a/TAO/TAO_IDL/be/be_visitor_interface/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_interface/any_op_cs.cpp index a18f15af4e3..6cb026e9f28 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/any_op_cs.cpp @@ -145,9 +145,9 @@ be_visitor_interface_any_op_cs::visit_interface (be_interface *node) *os << be_nl_2 << "/// Copying insertion." << be_nl << "void" << be_nl - << "operator<<= (" << be_idt << be_idt_nl + << "operator<<= (" << be_idt_nl << "::CORBA::Any &_tao_any," << be_nl - << node->local_name () << "_ptr _tao_elem)" << be_uidt << be_uidt_nl + << node->local_name () << "_ptr _tao_elem)" << be_uidt_nl << "{" << be_idt_nl << node->local_name () << "_ptr _tao_objptr =" << be_idt_nl << node->local_name () << "::_duplicate (_tao_elem);" << be_uidt_nl @@ -156,17 +156,17 @@ be_visitor_interface_any_op_cs::visit_interface (be_interface *node) *os << "/// Non-copying insertion." << be_nl << "void" << be_nl - << "operator<<= (" << be_idt << be_idt_nl + << "operator<<= (" << be_idt_nl << "::CORBA::Any &_tao_any," << be_nl - << node->local_name () << "_ptr *_tao_elem)" << be_uidt << be_uidt_nl + << node->local_name () << "_ptr *_tao_elem)" << be_uidt_nl << "{" << be_idt_nl << "TAO::Any_Impl_T<" << node->local_name () << ">::insert (" - << be_idt << be_idt_nl + << be_idt_nl << "_tao_any," << be_nl << node->local_name () << "::_tao_any_destructor," << be_nl << node->tc_name ()->last_component () << "," << be_nl << "*_tao_elem);" << be_uidt - << be_uidt << be_uidt_nl + << be_uidt_nl << "}" << be_nl_2; *os << "::CORBA::Boolean" << be_nl @@ -197,9 +197,9 @@ be_visitor_interface_any_op_cs::visit_interface (be_interface *node) *os << be_nl_2 << "/// Copying insertion." << be_nl << "void" << be_nl - << "operator<<= (" << be_idt << be_idt_nl + << "operator<<= (" << be_idt_nl << "::CORBA::Any &_tao_any," << be_nl - << node->full_name () << "_ptr _tao_elem)" << be_uidt << be_uidt_nl + << node->full_name () << "_ptr _tao_elem)" << be_uidt_nl << "{" << be_idt_nl << node->full_name () << "_ptr _tao_objptr =" << be_idt_nl << node->full_name () << "::_duplicate (_tao_elem);" << be_uidt_nl @@ -208,17 +208,17 @@ be_visitor_interface_any_op_cs::visit_interface (be_interface *node) *os << "/// Non-copying insertion." << be_nl << "void" << be_nl - << "operator<<= (" << be_idt << be_idt_nl + << "operator<<= (" << be_idt_nl << "::CORBA::Any &_tao_any," << be_nl - << node->full_name () << "_ptr *_tao_elem)" << be_uidt << be_uidt_nl + << node->full_name () << "_ptr *_tao_elem)" << be_uidt_nl << "{" << be_idt_nl << "TAO::Any_Impl_T<" << node->name () << ">::insert (" - << be_idt << be_idt_nl + << be_idt_nl << "_tao_any," << be_nl << node->name () << "::_tao_any_destructor," << be_nl << node->tc_name () << "," << be_nl << "*_tao_elem);" << be_uidt - << be_uidt << be_uidt_nl + << be_uidt_nl << "}" << be_nl_2; *os << "::CORBA::Boolean" << be_nl diff --git a/TAO/TAO_IDL/be/be_visitor_interface/tie_sh.cpp b/TAO/TAO_IDL/be/be_visitor_interface/tie_sh.cpp index 19a31e62858..58f86811c6e 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/tie_sh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/tie_sh.cpp @@ -85,9 +85,9 @@ be_visitor_interface_tie_sh::visit_interface (be_interface *node) << tiename << " (" << be_idt << be_idt_nl << "T *tp," << be_nl << "PortableServer::POA_ptr poa," << be_nl - << "::CORBA::Boolean release = true" << be_uidt_nl - << ");" << be_uidt_nl - << "/// dtor" << be_nl_2 + << "::CORBA::Boolean release = true);" << be_uidt + << be_uidt_nl + << "/// dtor" << be_nl << "~" << tiename << " (void);" << be_nl << "// TIE specific functions" << be_nl << "/// return the underlying object" << be_nl diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp index f716abff8aa..ff3efd24709 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/any_op_cs.cpp @@ -215,52 +215,50 @@ be_visitor_sequence_any_op_cs::visit_sequence (be_sequence *node) // Copying insertion. *os << be_nl << "/// Copying insertion." << be_nl - << "void operator<<= (" << be_idt << be_idt_nl + << "void operator<<= (" << be_idt_nl << "::CORBA::Any &_tao_any," << be_nl - << "const ::" << node->name () << " &_tao_elem)" << be_uidt + << "const ::" << node->name () << " &_tao_elem)" << be_uidt_nl << "{" << be_idt_nl - << "TAO::Any_Dual_Impl_T< ::" << node->name () << ">::insert_copy (" - << be_idt << be_idt_nl + << be_idt_nl << "_tao_any," << be_nl << "::" << node->name () << "::_tao_any_destructor," << be_nl << "::" << (td != 0 ? td->tc_name () : node->tc_name ()) << "," << be_nl << "_tao_elem);" << be_uidt - << be_uidt << be_uidt_nl + << be_uidt_nl << "}" << be_nl_2; // Non-copying insertion. *os << "/// Non-copying insertion." << be_nl - << "void operator<<= (" << be_idt << be_idt_nl + << "void operator<<= (" << be_idt_nl << "::CORBA::Any &_tao_any," << be_nl - << "::" << node->name () << " *_tao_elem)" << be_uidt + << "::" << node->name () << " *_tao_elem)" << be_uidt_nl << "{" << be_idt_nl << "TAO::Any_Dual_Impl_T< ::" << node->name () << ">::insert (" - << be_idt << be_idt_nl + << be_idt_nl << "_tao_any," << be_nl << "::" << node->name () << "::_tao_any_destructor," << be_nl << "::" << (td != 0 ? td->tc_name () : node->tc_name ()) << "," << be_nl << "_tao_elem);" << be_uidt - << be_uidt << be_uidt_nl + << be_uidt_nl << "}" << be_nl_2; // Extraction to const pointer. *os << "/// Extraction to const pointer." << be_nl - << "::CORBA::Boolean operator>>= (" << be_idt << be_idt_nl + << "::CORBA::Boolean operator>>= (" << be_idt_nl << "const ::CORBA::Any &_tao_any," << be_nl - << "const ::" << node->name () << " *&_tao_elem)" << be_uidt + << "const ::" << node->name () << " *&_tao_elem)" << be_uidt_nl << "{" << be_idt_nl - << "return" << be_idt_nl - << "TAO::Any_Dual_Impl_T< ::" << node->name () << ">::extract (" - << be_idt << be_idt_nl + << "return TAO::Any_Dual_Impl_T< ::" << node->name () << ">::extract (" + << be_idt_nl << "_tao_any," << be_nl << "::" << node->name () << "::_tao_any_destructor," << be_nl << "::" << (td != 0 ? td->tc_name () : node->tc_name ()) << "," << be_nl << "_tao_elem);" << be_uidt - << be_uidt << be_uidt << be_uidt_nl + << be_uidt_nl << "}"; be_util::gen_nested_namespace_end (os, module); @@ -276,52 +274,50 @@ be_visitor_sequence_any_op_cs::visit_sequence (be_sequence *node) // Copying insertion. *os << be_nl << "/// Copying insertion." << be_nl - << "void operator<<= (" << be_idt << be_idt_nl + << "void operator<<= (" << be_idt_nl << "::CORBA::Any &_tao_any," << be_nl - << "const " << node->name () << " &_tao_elem)" << be_uidt + << "const " << node->name () << " &_tao_elem)" << be_uidt_nl << "{" << be_idt_nl - << "TAO::Any_Dual_Impl_T<" << node->name () << ">::insert_copy (" - << be_idt << be_idt_nl + << be_idt_nl << "_tao_any," << be_nl << node->name () << "::_tao_any_destructor," << be_nl << (td != 0 ? td->tc_name () : node->tc_name ()) << "," << be_nl << "_tao_elem);" << be_uidt - << be_uidt << be_uidt << be_uidt_nl + << be_uidt_nl << "}" << be_nl_2; // Non-copying insertion. *os << "/// Non-copying insertion." << be_nl - << "void operator<<= (" << be_idt << be_idt_nl + << "void operator<<= (" << be_idt_nl << "::CORBA::Any &_tao_any," << be_nl - << node->name () << " *_tao_elem)" << be_uidt + << node->name () << " *_tao_elem)" << be_uidt_nl << "{" << be_idt_nl << "TAO::Any_Dual_Impl_T<" << node->name () << ">::insert (" - << be_idt << be_idt_nl + << be_idt_nl << "_tao_any," << be_nl << node->name () << "::_tao_any_destructor," << be_nl << (td != 0 ? td->tc_name () : node->tc_name ()) << "," << be_nl << "_tao_elem);" << be_uidt - << be_uidt << be_uidt_nl + << be_uidt_nl << "}" << be_nl_2; // Extraction to const pointer. *os << "/// Extraction to const pointer." << be_nl - << "::CORBA::Boolean operator>>= (" << be_idt << be_idt_nl + << "::CORBA::Boolean operator>>= (" << be_idt_nl << "const ::CORBA::Any &_tao_any," << be_nl - << "const " << node->name () << " *&_tao_elem)" << be_uidt + << "const " << node->name () << " *&_tao_elem)" << be_uidt_nl << "{" << be_idt_nl - << "return" << be_idt_nl - << "TAO::Any_Dual_Impl_T<" << node->name () << ">::extract (" - << be_idt << be_idt_nl + << "return TAO::Any_Dual_Impl_T<" << node->name () << ">::extract (" + << be_idt_nl << "_tao_any," << be_nl << node->name () << "::_tao_any_destructor," << be_nl << (td != 0 ? td->tc_name () : node->tc_name ()) << "," << be_nl << "_tao_elem);" << be_uidt - << be_uidt << be_uidt << be_uidt_nl + << be_uidt_nl << "}"; *os << be_global->core_versioning_end () << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_structure/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_structure/any_op_cs.cpp index b38017bb788..b938d981a43 100644 --- a/TAO/TAO_IDL/be/be_visitor_structure/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_structure/any_op_cs.cpp @@ -107,52 +107,50 @@ be_visitor_structure_any_op_cs::visit_structure (be_structure *node) // Copying insertion. *os << "/// Copying insertion." << be_nl - << "void operator<<= (" << be_idt << be_idt_nl + << "void operator<<= (" << be_idt_nl << "::CORBA::Any &_tao_any," << be_nl - << "const ::" << node->name () << " &_tao_elem)" << be_uidt + << "const ::" << node->name () << " &_tao_elem)" << be_uidt_nl << "{" << be_idt_nl - << "TAO::Any_Dual_Impl_T< ::" << node->name () << ">::insert_copy (" - << be_idt << be_idt_nl + << be_idt_nl << "_tao_any," << be_nl << "::" << node->name () << "::_tao_any_destructor," << be_nl << "::" << node->tc_name () << "," << be_nl - << "_tao_elem);" << be_uidt - << be_uidt << be_uidt << be_uidt_nl + << "_tao_elem);" + << be_uidt << be_uidt_nl << "}" << be_nl_2; // Non-copying insertion. *os << "/// Non-copying insertion." << be_nl - << "void operator<<= (" << be_idt << be_idt_nl - << "::CORBA::Any &_tao_any, ::" << be_nl - << node->name () << " *_tao_elem)" << be_uidt + << "void operator<<= (" << be_idt_nl + << "::CORBA::Any &_tao_any," << be_nl + << "::" << node->name () << " *_tao_elem)" << be_uidt_nl << "{" << be_idt_nl << "TAO::Any_Dual_Impl_T< ::" << node->name () << ">::insert (" - << be_idt << be_idt_nl + << be_idt_nl << "_tao_any," << be_nl << "::" << node->name () << "::_tao_any_destructor," << be_nl << "::" << node->tc_name () << "," << be_nl << "_tao_elem);" << be_uidt - << be_uidt << be_uidt_nl + << be_uidt_nl << "}" << be_nl_2; // Extraction to const pointer. *os << "/// Extraction to const pointer." << be_nl - << "::CORBA::Boolean operator>>= (" << be_idt << be_idt_nl + << "::CORBA::Boolean operator>>= (" << be_idt_nl << "const ::CORBA::Any &_tao_any," << be_nl - << "const ::" << node->name () << " *&_tao_elem)" << be_uidt + << "const ::" << node->name () << " *&_tao_elem)" << be_uidt_nl << "{" << be_idt_nl - << "return" << be_idt_nl - << "TAO::Any_Dual_Impl_T< ::" << node->name () << ">::extract (" - << be_idt << be_idt_nl + << "return TAO::Any_Dual_Impl_T< ::" << node->name () << ">::extract (" + << be_idt_nl << "_tao_any," << be_nl << "::" << node->name () << "::_tao_any_destructor," << be_nl << "::" << node->tc_name () << "," << be_nl << "_tao_elem);" << be_uidt - << be_uidt << be_uidt << be_uidt_nl + << be_uidt_nl << "}"; be_util::gen_nested_namespace_end (os, module); @@ -172,14 +170,13 @@ be_visitor_structure_any_op_cs::visit_structure (be_structure *node) << "const " << node->name () << " &_tao_elem)" << be_uidt_nl << "{" << be_idt_nl - << "TAO::Any_Dual_Impl_T<" << node->name () << ">::insert_copy (" << be_idt_nl << "_tao_any," << be_nl << node->name () << "::_tao_any_destructor," << be_nl << node->tc_name () << "," << be_nl << "_tao_elem);" - << be_uidt << be_uidt << be_uidt_nl + << be_uidt << be_uidt_nl << "}" << be_nl_2; // Non-copying insertion. @@ -205,14 +202,13 @@ be_visitor_structure_any_op_cs::visit_structure (be_structure *node) << "const " << node->name () << " *&_tao_elem)" << be_uidt_nl << "{" << be_idt_nl - << "return" << be_idt_nl - << "TAO::Any_Dual_Impl_T<" << node->name () << ">::extract (" + << "return TAO::Any_Dual_Impl_T<" << node->name () << ">::extract (" << be_idt_nl << "_tao_any," << be_nl << node->name () << "::_tao_any_destructor," << be_nl << node->tc_name () << "," << be_nl << "_tao_elem);" - << be_uidt << be_uidt << be_uidt_nl + << be_uidt << be_uidt_nl << "}"; *os << be_global->core_versioning_end () << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_union/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_union/any_op_cs.cpp index 439433b180e..ed636e42cac 100644 --- a/TAO/TAO_IDL/be/be_visitor_union/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union/any_op_cs.cpp @@ -103,52 +103,50 @@ be_visitor_union_any_op_cs::visit_union (be_union *node) // Copying insertion. *os << "/// Copying insertion." << be_nl - << "void operator<<= (" << be_idt << be_idt_nl + << "void operator<<= (" << be_idt_nl << "::CORBA::Any &_tao_any," << be_nl - << "const ::" << node->name () << " &_tao_elem)" << be_uidt + << "const ::" << node->name () << " &_tao_elem)" << be_uidt_nl << "{" << be_idt_nl - << "TAO::Any_Dual_Impl_T< ::" << node->name () << ">::insert_copy (" - << be_idt << be_idt_nl + << be_idt_nl << "_tao_any," << be_nl << "::" << node->name () << "::_tao_any_destructor," << be_nl << "::" << node->tc_name () << "," << be_nl - << "_tao_elem" << be_uidt_nl - << ");" << be_uidt << be_uidt << be_uidt_nl + << "_tao_elem);" + << be_uidt << be_uidt_nl << "}" << be_nl_2; // Non-copying insertion. *os << "/// Non-copying insertion." << be_nl - << "void operator<<= (" << be_idt << be_idt_nl + << "void operator<<= (" << be_idt_nl << "::CORBA::Any &_tao_any," << be_nl - << "::" << node->name () << " *_tao_elem)" << be_uidt + << "::" << node->name () << " *_tao_elem)" << be_uidt_nl << "{" << be_idt_nl << "TAO::Any_Dual_Impl_T< ::" << node->name () << ">::insert (" - << be_idt << be_idt_nl + << be_idt_nl << "_tao_any," << be_nl << "::" << node->name () << "::_tao_any_destructor," << be_nl << "::" << node->tc_name () << "," << be_nl << "_tao_elem);" << be_uidt - << be_uidt << be_uidt_nl + << be_uidt_nl << "}" << be_nl_2; // Extraction to const pointer. *os << "/// Extraction to const pointer." << be_nl - << "::CORBA::Boolean operator>>= (" << be_idt << be_idt_nl + << "::CORBA::Boolean operator>>= (" << be_idt_nl << "const ::CORBA::Any &_tao_any," << be_nl - << "const ::" << node->name () << " *&_tao_elem)" << be_uidt + << "const ::" << node->name () << " *&_tao_elem)" << be_uidt_nl << "{" << be_idt_nl - << "return" << be_idt_nl - << "TAO::Any_Dual_Impl_T< ::" << node->name () << ">::extract (" - << be_idt << be_idt_nl + << "return TAO::Any_Dual_Impl_T< ::" << node->name () << ">::extract (" + << be_idt_nl << "_tao_any," << be_nl << "::" << node->name () << "::_tao_any_destructor," << be_nl << "::" << node->tc_name () << "," << be_nl << "_tao_elem);" << be_uidt - << be_uidt << be_uidt << be_uidt_nl + << be_uidt_nl << "}"; be_util::gen_nested_namespace_end (os, module); @@ -163,52 +161,50 @@ be_visitor_union_any_op_cs::visit_union (be_union *node) // Copying insertion. *os << "/// Copying insertion." << be_nl - << "void operator<<= (" << be_idt << be_idt_nl + << "void operator<<= (" << be_idt_nl << "::CORBA::Any &_tao_any," << be_nl - << "const " << node->name () << " &_tao_elem)" << be_uidt + << "const " << node->name () << " &_tao_elem)" << be_uidt_nl << "{" << be_idt_nl - << "TAO::Any_Dual_Impl_T<" << node->name () << ">::insert_copy (" - << be_idt << be_idt_nl + << be_idt_nl << "_tao_any," << be_nl << node->name () << "::_tao_any_destructor," << be_nl << node->tc_name () << "," << be_nl << "_tao_elem);" << be_uidt - << be_uidt << be_uidt << be_uidt_nl + << be_uidt_nl << "}" << be_nl_2; // Non-copying insertion. *os << "/// Non-copying insertion." << be_nl - << "void operator<<= (" << be_idt << be_idt_nl + << "void operator<<= (" << be_idt_nl << "::CORBA::Any &_tao_any," << be_nl - << node->name () << " *_tao_elem)" << be_uidt + << node->name () << " *_tao_elem)" << be_uidt_nl << "{" << be_idt_nl << "TAO::Any_Dual_Impl_T<" << node->name () << ">::insert (" - << be_idt << be_idt_nl + << be_idt_nl << "_tao_any," << be_nl << node->name () << "::_tao_any_destructor," << be_nl << node->tc_name () << "," << be_nl << "_tao_elem);" << be_uidt - << be_uidt << be_uidt_nl + << be_uidt_nl << "}" << be_nl_2; // Extraction to const pointer. *os << "/// Extraction to const pointer." << be_nl - << "::CORBA::Boolean operator>>= (" << be_idt << be_idt_nl + << "::CORBA::Boolean operator>>= (" << be_idt_nl << "const ::CORBA::Any &_tao_any," << be_nl - << "const " << node->name () << " *&_tao_elem)" << be_uidt + << "const " << node->name () << " *&_tao_elem)" << be_uidt_nl << "{" << be_idt_nl - << "return" << be_idt_nl - << "TAO::Any_Dual_Impl_T<" << node->name () << ">::extract (" - << be_idt << be_idt_nl + << "return TAO::Any_Dual_Impl_T<" << node->name () << ">::extract (" + << be_idt_nl << "_tao_any," << be_nl << node->name () << "::_tao_any_destructor," << be_nl << node->tc_name () << "," << be_nl << "_tao_elem);" << be_uidt - << be_uidt << be_uidt << be_uidt_nl + << be_uidt_nl << "}"; *os << be_global->core_versioning_end () << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_valuebox/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_valuebox/any_op_cs.cpp index 63cacd50699..ce748c930f4 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuebox/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuebox/any_op_cs.cpp @@ -92,9 +92,9 @@ be_visitor_valuebox_any_op_cs::visit_valuebox (be_valuebox *node) // emit nested variation of any operators *os << "/// Copying insertion." << be_nl << "void" << be_nl - << "operator<<= (" << be_idt << be_idt_nl + << "operator<<= (" << be_idt_nl << "::CORBA::Any &_tao_any," << be_nl - << node->local_name () << " *_tao_elem)" << be_uidt << be_uidt_nl + << node->local_name () << " *_tao_elem)" << be_uidt_nl << "{" << be_idt_nl << "::CORBA::add_ref (_tao_elem);" << be_nl << "_tao_any <<= &_tao_elem;" << be_uidt_nl @@ -102,16 +102,16 @@ be_visitor_valuebox_any_op_cs::visit_valuebox (be_valuebox *node) *os << "/// Non-copying insertion." << be_nl << "void" << be_nl - << "operator<<= (" << be_idt << be_idt_nl + << "operator<<= (" << be_idt_nl << "::CORBA::Any &_tao_any," << be_nl - << node->local_name () << " **_tao_elem)" << be_uidt << be_uidt_nl + << node->local_name () << " **_tao_elem)" << be_uidt_nl << "{" << be_idt_nl << "TAO::Any_Impl_T<" << node->local_name () << ">::insert (" - << be_idt << be_idt_nl + << be_idt_nl << "_tao_any," << be_nl << node->local_name () << "::_tao_any_destructor," << be_nl << node->tc_name ()->last_component () << "," << be_nl - << "*_tao_elem);" << be_uidt << be_uidt << be_uidt_nl + << "*_tao_elem);" << be_uidt << be_uidt_nl << "}" << be_nl_2; *os << "::CORBA::Boolean" << be_nl @@ -141,9 +141,9 @@ be_visitor_valuebox_any_op_cs::visit_valuebox (be_valuebox *node) *os << "/// Copying insertion." << be_nl << "void" << be_nl - << "operator<<= (" << be_idt << be_idt_nl + << "operator<<= (" << be_idt_nl << "::CORBA::Any &_tao_any," << be_nl - << node->full_name () << " *_tao_elem)" << be_uidt + << node->full_name () << " *_tao_elem)" << be_uidt_nl << "{" << be_idt_nl << "::CORBA::add_ref (_tao_elem);" << be_nl @@ -152,18 +152,18 @@ be_visitor_valuebox_any_op_cs::visit_valuebox (be_valuebox *node) *os << "/// Non-copying insertion." << be_nl << "void" << be_nl - << "operator<<= (" << be_idt << be_idt_nl + << "operator<<= (" << be_idt_nl << "::CORBA::Any &_tao_any," << be_nl - << node->full_name () << " **_tao_elem)" << be_uidt + << node->full_name () << " **_tao_elem)" << be_uidt_nl << "{" << be_idt_nl << "TAO::Any_Impl_T<" << node->name () << ">::insert (" - << be_idt << be_idt_nl + << be_idt_nl << "_tao_any," << be_nl << node->name () << "::_tao_any_destructor," << be_nl << node->tc_name () << "," << be_nl << "*_tao_elem);" << be_uidt - << be_uidt << be_uidt_nl + << be_uidt_nl << "}" << be_nl_2; *os << "::CORBA::Boolean" << be_nl diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/any_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/any_op_cs.cpp index d1b6dd6e6e8..dfb80cfc402 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/any_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/any_op_cs.cpp @@ -91,9 +91,9 @@ be_visitor_valuetype_any_op_cs::visit_valuetype (be_valuetype *node) // emit nested variation of any operators *os << "/// Copying insertion." << be_nl << "void" << be_nl - << "operator<<= (" << be_idt << be_idt_nl + << "operator<<= (" << be_idt_nl << "::CORBA::Any &_tao_any," << be_nl - << node->local_name () << " *_tao_elem)" << be_uidt + << node->local_name () << " *_tao_elem)" << be_uidt_nl << "{" << be_idt_nl << "#ifdef TAO_VALUETYPE_COPYING_ANY_INSERTION_USES_COPY_VALUE" << be_idt_nl @@ -110,18 +110,18 @@ be_visitor_valuetype_any_op_cs::visit_valuetype (be_valuetype *node) *os << "/// Non-copying insertion." << be_nl << "void" << be_nl - << "operator<<= (" << be_idt << be_idt_nl + << "operator<<= (" << be_idt_nl << "::CORBA::Any &_tao_any," << be_nl - << node->local_name () << " **_tao_elem)" << be_uidt + << node->local_name () << " **_tao_elem)" << be_uidt_nl << "{" << be_idt_nl << "TAO::Any_Impl_T<" << node->local_name () << ">::insert (" - << be_idt << be_idt_nl + << be_idt_nl << "_tao_any," << be_nl << node->local_name () << "::_tao_any_destructor," << be_nl << node->tc_name ()->last_component () << "," << be_nl << "*_tao_elem);" << be_uidt - << be_uidt << be_uidt_nl + << be_uidt_nl << "}" << be_nl_2; *os << "::CORBA::Boolean" << be_nl @@ -151,9 +151,9 @@ be_visitor_valuetype_any_op_cs::visit_valuetype (be_valuetype *node) *os << "/// Copying insertion." << be_nl << "void" << be_nl - << "operator<<= (" << be_idt << be_idt_nl + << "operator<<= (" << be_idt_nl << "::CORBA::Any &_tao_any," << be_nl - << node->full_name () << " *_tao_elem)" << be_uidt + << node->full_name () << " *_tao_elem)" << be_uidt_nl << "{" << be_idt_nl << "#ifdef TAO_VALUETYPE_COPYING_ANY_INSERTION_USES_COPY_VALUE" << be_idt_nl @@ -170,18 +170,18 @@ be_visitor_valuetype_any_op_cs::visit_valuetype (be_valuetype *node) *os << "/// Non-copying insertion." << be_nl << "void" << be_nl - << "operator<<= (" << be_idt << be_idt_nl + << "operator<<= (" << be_idt_nl << "::CORBA::Any &_tao_any," << be_nl - << node->full_name () << " **_tao_elem)" << be_uidt + << node->full_name () << " **_tao_elem)" << be_uidt_nl << "{" << be_idt_nl << "TAO::Any_Impl_T<" << node->name () << ">::insert (" - << be_idt << be_idt_nl + << be_idt_nl << "_tao_any," << be_nl << node->name () << "::_tao_any_destructor," << be_nl << node->tc_name () << "," << be_nl << "*_tao_elem);" << be_uidt - << be_uidt << be_uidt_nl + << be_uidt_nl << "}" << be_nl_2; *os << "::CORBA::Boolean" << be_nl diff --git a/TAO/bin/tao_other_tests.lst b/TAO/bin/tao_other_tests.lst index 8f84e6ed4fe..b0ae4ded4ce 100644 --- a/TAO/bin/tao_other_tests.lst +++ b/TAO/bin/tao_other_tests.lst @@ -151,6 +151,7 @@ TAO/orbsvcs/tests/ImplRepo/servers_list/run_test_ft.pl: !ST !MINIMUM !CORBA_E_CO TAO/orbsvcs/tests/ImplRepo/Bug_689_Regression/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !WCHAR !ACE_FOR_TAO TAO/orbsvcs/tests/ImplRepo/Bug_2604_Regression/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !WCHAR !ACE_FOR_TAO !LynxOS TAO/orbsvcs/tests/ImplRepo/Bug_4152_Regression/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !WCHAR !ACE_FOR_TAO !LynxOS +TAO/orbsvcs/tests/ImplRepo/Bug_4152_Regression/run_test.pl -s 5: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !WCHAR !ACE_FOR_TAO !LynxOS TAO/orbsvcs/tests/ImplRepo/ReconnectServer/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !WCHAR !ACE_FOR_TAO !LynxOS TAO/orbsvcs/tests/ImplRepo/ReconnectServer/run_test.pl -forwardalways: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !WCHAR !ACE_FOR_TAO !LynxOS TAO/orbsvcs/tests/ImplRepo/ReconnectServer/run_test.pl -forwardonce: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !WCHAR !ACE_FOR_TAO !LynxOS diff --git a/TAO/orbsvcs/DevGuideExamples/NotifyService/Filtering/StructuredEventConsumer_i.h b/TAO/orbsvcs/DevGuideExamples/NotifyService/Filtering/StructuredEventConsumer_i.h index a7c4c008e31..ca8b8143b63 100644 --- a/TAO/orbsvcs/DevGuideExamples/NotifyService/Filtering/StructuredEventConsumer_i.h +++ b/TAO/orbsvcs/DevGuideExamples/NotifyService/Filtering/StructuredEventConsumer_i.h @@ -7,22 +7,19 @@ class StructuredEventConsumer_i : public virtual POA_CosNotifyComm::StructuredPushConsumer { public: - StructuredEventConsumer_i(CORBA::ORB_ptr orb); + StructuredEventConsumer_i(CORBA::ORB_ptr orb); - virtual void push_structured_event( - const CosNotification::StructuredEvent ¬ification - ); + virtual void push_structured_event( + const CosNotification::StructuredEvent ¬ification); - virtual void offer_change ( + virtual void offer_change ( const CosNotification::EventTypeSeq & added, - const CosNotification::EventTypeSeq & removed - ); + const CosNotification::EventTypeSeq & removed); - virtual void disconnect_structured_push_consumer( - ); + virtual void disconnect_structured_push_consumer(); private: - CORBA::ORB_var orb_; + CORBA::ORB_var orb_; }; #endif diff --git a/TAO/orbsvcs/DevGuideExamples/NotifyService/OfferSubscriptions/StructuredEventConsumer_i.h b/TAO/orbsvcs/DevGuideExamples/NotifyService/OfferSubscriptions/StructuredEventConsumer_i.h index 0f4a599cd41..2c680c65a8d 100644 --- a/TAO/orbsvcs/DevGuideExamples/NotifyService/OfferSubscriptions/StructuredEventConsumer_i.h +++ b/TAO/orbsvcs/DevGuideExamples/NotifyService/OfferSubscriptions/StructuredEventConsumer_i.h @@ -9,13 +9,11 @@ public: StructuredEventConsumer_i(CORBA::ORB_ptr orb); virtual void push_structured_event( - const CosNotification::StructuredEvent ¬ification - ); + const CosNotification::StructuredEvent ¬ification); virtual void offer_change ( const CosNotification::EventTypeSeq & added, - const CosNotification::EventTypeSeq & removed - ); + const CosNotification::EventTypeSeq & removed); virtual void disconnect_structured_push_consumer(); private: diff --git a/TAO/orbsvcs/DevGuideExamples/NotifyService/QoSProperties/StructuredEventConsumer_i.h b/TAO/orbsvcs/DevGuideExamples/NotifyService/QoSProperties/StructuredEventConsumer_i.h index 69d59d6dbf0..3b57225df2e 100644 --- a/TAO/orbsvcs/DevGuideExamples/NotifyService/QoSProperties/StructuredEventConsumer_i.h +++ b/TAO/orbsvcs/DevGuideExamples/NotifyService/QoSProperties/StructuredEventConsumer_i.h @@ -10,13 +10,11 @@ public: StructuredEventConsumer_i(CORBA::ORB_ptr orb); virtual void push_structured_event( - const CosNotification::StructuredEvent ¬ification - ); + const CosNotification::StructuredEvent ¬ification); virtual void offer_change ( const CosNotification::EventTypeSeq & added, - const CosNotification::EventTypeSeq & removed - ); + const CosNotification::EventTypeSeq & removed); virtual void disconnect_structured_push_consumer(); diff --git a/TAO/orbsvcs/DevGuideExamples/NotifyService/RTNotify/StructuredEventConsumer_i.h b/TAO/orbsvcs/DevGuideExamples/NotifyService/RTNotify/StructuredEventConsumer_i.h index caa915228d8..9220062f2f9 100644 --- a/TAO/orbsvcs/DevGuideExamples/NotifyService/RTNotify/StructuredEventConsumer_i.h +++ b/TAO/orbsvcs/DevGuideExamples/NotifyService/RTNotify/StructuredEventConsumer_i.h @@ -10,13 +10,11 @@ public: StructuredEventConsumer_i(CORBA::ORB_ptr orb); virtual void push_structured_event( - const CosNotification::StructuredEvent ¬ification - ); + const CosNotification::StructuredEvent ¬ification); virtual void offer_change ( const CosNotification::EventTypeSeq & added, - const CosNotification::EventTypeSeq & removed - ); + const CosNotification::EventTypeSeq & removed); virtual void disconnect_structured_push_consumer(); diff --git a/TAO/orbsvcs/FTRT_Event_Service/Event_Service/FT_EventService.cpp b/TAO/orbsvcs/FTRT_Event_Service/Event_Service/FT_EventService.cpp index 389059de415..179afa5da9f 100644 --- a/TAO/orbsvcs/FTRT_Event_Service/Event_Service/FT_EventService.cpp +++ b/TAO/orbsvcs/FTRT_Event_Service/Event_Service/FT_EventService.cpp @@ -248,7 +248,7 @@ FT_EventService::report_factory(CORBA::ORB_ptr orb, ORBSVCS_DEBUG((LM_DEBUG,"Factory connected\n")); CORBA::String_var my_ior_string = orb->object_to_string(ec); - int len = ACE_OS::strlen(my_ior_string.in()) ; + size_t const len = ACE_OS::strlen(my_ior_string.in()) ; if (stream.send_n(my_ior_string.in(), len) != len) ORBSVCS_ERROR_RETURN((LM_ERROR, "(%P|%t) IOR Transmission Error\n"), -1); diff --git a/TAO/orbsvcs/FTRT_Event_Service/Factory_Service/EventChannelFactory_i.cpp b/TAO/orbsvcs/FTRT_Event_Service/Factory_Service/EventChannelFactory_i.cpp index 2c4ee830c36..aeb2d6bfb1c 100644 --- a/TAO/orbsvcs/FTRT_Event_Service/Factory_Service/EventChannelFactory_i.cpp +++ b/TAO/orbsvcs/FTRT_Event_Service/Factory_Service/EventChannelFactory_i.cpp @@ -106,7 +106,7 @@ CORBA::Object_ptr EventChannelFactory_i::create_process ( options.setenv(ACE_TEXT("EventChannelFactoryAddr"), buf); // extract the object ID from the criteria - for (size_t i = 0; i < the_criteria.length(); ++i) + for (CORBA::ULong i = 0; i < the_criteria.length(); ++i) { const CosNaming::Name& name = the_criteria[i].nam; if (name.length() > 0) { diff --git a/TAO/orbsvcs/FT_ReplicationManager/FT_FaultConsumer.h b/TAO/orbsvcs/FT_ReplicationManager/FT_FaultConsumer.h index 8e37c42e408..48cf24e5970 100644 --- a/TAO/orbsvcs/FT_ReplicationManager/FT_FaultConsumer.h +++ b/TAO/orbsvcs/FT_ReplicationManager/FT_FaultConsumer.h @@ -102,16 +102,13 @@ namespace TAO //////////////// // CORBA methods virtual void push_structured_event ( - const CosNotification::StructuredEvent ¬ification - ); + const CosNotification::StructuredEvent ¬ification); virtual void offer_change ( const CosNotification::EventTypeSeq & added, - const CosNotification::EventTypeSeq & removed - ); + const CosNotification::EventTypeSeq & removed); - virtual void disconnect_structured_push_consumer ( - ); + virtual void disconnect_structured_push_consumer (); //@} diff --git a/TAO/orbsvcs/FT_ReplicationManager/FT_ReplicationManager.h b/TAO/orbsvcs/FT_ReplicationManager/FT_ReplicationManager.h index afde5fdb507..462c98a8168 100644 --- a/TAO/orbsvcs/FT_ReplicationManager/FT_ReplicationManager.h +++ b/TAO/orbsvcs/FT_ReplicationManager/FT_ReplicationManager.h @@ -154,21 +154,17 @@ namespace TAO /// Registers the Fault Notifier with the Replication Manager. virtual void register_fault_notifier ( - FT::FaultNotifier_ptr fault_notifier - ); + FT::FaultNotifier_ptr fault_notifier); /// Returns the reference of the Fault Notifier. - virtual FT::FaultNotifier_ptr get_fault_notifier ( - ); + virtual FT::FaultNotifier_ptr get_fault_notifier (); /// TAO-specific find factory registry virtual ::PortableGroup::FactoryRegistry_ptr get_factory_registry ( - const PortableGroup::Criteria & selection_criteria - ); + const PortableGroup::Criteria & selection_criteria); /// TAO-specific shutdown operation. - virtual void shutdown ( - ); + virtual void shutdown (); //@} @@ -294,8 +290,7 @@ namespace TAO * Return the ObjectGroup reference for the given ObjectGroupId. */ virtual PortableGroup::ObjectGroup_ptr get_object_group_ref_from_id ( - PortableGroup::ObjectGroupId group_id - ); + PortableGroup::ObjectGroupId group_id); /** * Return the reference corresponding to the Replica of a given diff --git a/TAO/orbsvcs/Fault_Detector/FT_FaultDetectorFactory_i.h b/TAO/orbsvcs/Fault_Detector/FT_FaultDetectorFactory_i.h index 4095d32fb7e..75de43bf26d 100644 --- a/TAO/orbsvcs/Fault_Detector/FT_FaultDetectorFactory_i.h +++ b/TAO/orbsvcs/Fault_Detector/FT_FaultDetectorFactory_i.h @@ -152,8 +152,7 @@ namespace TAO /////////////////////////////////////////////// // CORBA interface FaultDetectorFactory methods virtual void change_properties ( - const PortableGroup::Properties & property_set - ); + const PortableGroup::Properties & property_set); virtual void shutdown (void); @@ -162,12 +161,10 @@ namespace TAO virtual CORBA::Object_ptr create_object ( const char * type_id, const PortableGroup::Criteria & the_criteria, - PortableGroup::GenericFactory::FactoryCreationId_out factory_creation_id - ); + PortableGroup::GenericFactory::FactoryCreationId_out factory_creation_id); virtual void delete_object ( - const PortableGroup::GenericFactory::FactoryCreationId & factory_creation_id - ); + const PortableGroup::GenericFactory::FactoryCreationId & factory_creation_id); ////////////////////////////////////////// // CORBA interface PullMonitorable methods diff --git a/TAO/orbsvcs/Fault_Detector/Fault_Detector_i.h b/TAO/orbsvcs/Fault_Detector/Fault_Detector_i.h index 48995141850..544fa728309 100644 --- a/TAO/orbsvcs/Fault_Detector/Fault_Detector_i.h +++ b/TAO/orbsvcs/Fault_Detector/Fault_Detector_i.h @@ -68,8 +68,7 @@ namespace TAO FT::FTDomainId domain_id, const PortableGroup::Location & object_location, PortableGroup::TypeId object_type, - PortableGroup::ObjectGroupId group_id - ); + PortableGroup::ObjectGroupId group_id); /** * destructor. * Non-virtual because this class does not take part in diff --git a/TAO/orbsvcs/Fault_Notifier/FT_Notifier_i.h b/TAO/orbsvcs/Fault_Notifier/FT_Notifier_i.h index a7a9d68911f..ecc69f45a19 100644 --- a/TAO/orbsvcs/Fault_Notifier/FT_Notifier_i.h +++ b/TAO/orbsvcs/Fault_Notifier/FT_Notifier_i.h @@ -89,36 +89,29 @@ namespace TAO // See IDL for documentation virtual void push_structured_fault ( - const CosNotification::StructuredEvent & event - ); + const CosNotification::StructuredEvent & event); virtual void push_sequence_fault ( - const CosNotification::EventBatch & events - ); + const CosNotification::EventBatch & events); virtual ::CosNotifyFilter::Filter_ptr create_subscription_filter ( - const char * constraint_grammar - ); + const char * constraint_grammar); virtual FT::FaultNotifier::ConsumerId connect_structured_fault_consumer ( CosNotifyComm::StructuredPushConsumer_ptr push_consumer, - CosNotifyFilter::Filter_ptr filter - ); + CosNotifyFilter::Filter_ptr filter); virtual FT::FaultNotifier::ConsumerId connect_sequence_fault_consumer ( CosNotifyComm::SequencePushConsumer_ptr push_consumer, - CosNotifyFilter::Filter_ptr filter - ); + CosNotifyFilter::Filter_ptr filter); virtual void disconnect_consumer ( - FT::FaultNotifier::ConsumerId connection - ); + FT::FaultNotifier::ConsumerId connection); ////////////////////////////////////////// // CORBA interface PullMonitorable methods virtual CORBA::Boolean is_alive (void); - ///////////////////////////////////////// // Override CORBA servant virtual methods virtual PortableServer::POA_ptr _default_POA (void); diff --git a/TAO/orbsvcs/ImplRepo_Service/AsyncAccessManager.cpp b/TAO/orbsvcs/ImplRepo_Service/AsyncAccessManager.cpp index 456dde6b655..a5078b1f7c2 100644 --- a/TAO/orbsvcs/ImplRepo_Service/AsyncAccessManager.cpp +++ b/TAO/orbsvcs/ImplRepo_Service/AsyncAccessManager.cpp @@ -465,11 +465,30 @@ AsyncAccessManager::server_is_shutting_down (void) { if (ImR_Locator_i::debug () > 4) { - this->report ("server_is_shutting_down"); + this->report ("server_is_shutting_down-start"); } + // We are informed directly by the server that it is shutting down. This doesn't + // imply that the server is dead at this point, there can be some time between + // the POA destroy and the server process exit so we have to wait for the death + // of the process before we can mark this server as dead this->prev_pid_ = this->info_->pid; - this->status (ImplementationRepository::AAM_SERVER_DEAD); - this->final_state (); + if (this->info_->death_notify) + { + // We get a death notify of the activator so we can wait on the death + // of the process + this->status (ImplementationRepository::AAM_WAIT_FOR_DEATH); + } + else + { + // We don't get a death notify of the activator so we have to assume at + // this point the server is death + this->status (ImplementationRepository::AAM_SERVER_DEAD); + this->final_state (); + } + if (ImR_Locator_i::debug () > 4) + { + this->report ("server_is_shutting_down-end"); + } } void @@ -535,7 +554,7 @@ AsyncAccessManager::notify_child_death (int pid) if (ImR_Locator_i::debug () > 4) { ORBSVCS_DEBUG ((LM_DEBUG, - ACE_TEXT ("(%P|%t) AsyncAccessManager(%@), child death, server <%C> pid <%d> status <%C> ") + ACE_TEXT ("(%P|%t) AsyncAccessManager(%@), notify_child_death, server <%C> pid <%d> status <%C> ") ACE_TEXT ("this info_.pid <%d> prev_pid <%d> waiter count <%d>\n"), this, info_->ping_id (), pid, status_name (status_), this->info_->pid, this->prev_pid_, this->rh_list_.size())); @@ -545,8 +564,12 @@ AsyncAccessManager::notify_child_death (int pid) if ((this->status_ == ImplementationRepository::AAM_WAIT_FOR_DEATH) && this->rh_list_.size() > 0) { - this->send_start_request (); - return true; + // When we have successfully made another start request we just let the + // waiters wait on the result of the new start request + if (this->send_start_request ()) + { + return true; + } } this->status (ImplementationRepository::AAM_SERVER_DEAD); this->final_state (); @@ -557,7 +580,7 @@ AsyncAccessManager::notify_child_death (int pid) if (ImR_Locator_i::debug () > 1) { ORBSVCS_ERROR ((LM_ERROR, - ACE_TEXT ("(%P|%t) AsyncAccessManager(%@), child death, server <%C> pid <%d> does not match ") + ACE_TEXT ("(%P|%t) AsyncAccessManager(%@), notify_child_death, server <%C> pid <%d> does not match ") ACE_TEXT ("this info_.pid <%d> prev_pid <%d>\n"), this, info_->ping_id (), pid, this->info_->pid, this->prev_pid_)); @@ -574,8 +597,18 @@ AsyncAccessManager::listener_disconnected (void) this->report ("listener_disconnected"); } - this->status (ImplementationRepository::AAM_SERVER_DEAD); - + if (this->info_->death_notify) + { + // We get a death notify of the activator so we can wait on the death + // of the process + this->status (ImplementationRepository::AAM_WAIT_FOR_DEATH); + } + else + { + // We don't get a death notify of the activator so we have to assume at + // this point the server is death + this->status (ImplementationRepository::AAM_SERVER_DEAD); + } } void @@ -661,6 +694,12 @@ AsyncAccessManager::send_start_request (void) if ((this->locator_.opts ()->lockout () && !this->info_.edit ()->start_allowed ()) || (this->retries_ == 0)) { + if (ImR_Locator_i::debug () > 4) + { + ORBSVCS_ERROR ((LM_ERROR, + ACE_TEXT ("(%P|%t) AsyncAccessManager(%@)::send_start_request, server <%C> not started because retries exceeded\n"), + this, this->info_->ping_id())); + } this->status (ImplementationRepository::AAM_RETRIES_EXCEEDED); return false; } @@ -670,6 +709,12 @@ AsyncAccessManager::send_start_request (void) if (this->info_->is_mode (ImplementationRepository::MANUAL) && !this->manual_start_) { + if (ImR_Locator_i::debug () > 4) + { + ORBSVCS_ERROR ((LM_ERROR, + ACE_TEXT ("(%P|%t) AsyncAccessManager(%@)::send_start_request, server <%C> not started because only a manual start is allowed\n"), + this, this->info_->ping_id())); + } this->status (ImplementationRepository::AAM_NOT_MANUAL); return false; } @@ -678,6 +723,12 @@ AsyncAccessManager::send_start_request (void) if (startup->cmdline.length () == 0) { + if (ImR_Locator_i::debug () > 4) + { + ORBSVCS_ERROR ((LM_ERROR, + ACE_TEXT ("(%P|%t) AsyncAccessManager(%@)::send_start_request, server <%C> not started because no commandline has been configured\n"), + this, this->info_->ping_id())); + } this->status (ImplementationRepository::AAM_NO_COMMANDLINE); return false; } @@ -687,6 +738,12 @@ AsyncAccessManager::send_start_request (void) if (ainfo.null () || CORBA::is_nil (ainfo->activator.in ())) { + if (ImR_Locator_i::debug () > 4) + { + ORBSVCS_ERROR ((LM_ERROR, + ACE_TEXT ("(%P|%t) AsyncAccessManager(%@)::send_start_request, server <%C> not started because no activator has been found\n"), + this, this->info_->ping_id())); + } this->status (ImplementationRepository::AAM_NO_ACTIVATOR); return false; } diff --git a/TAO/orbsvcs/ImplRepo_Service/Forwarder.cpp b/TAO/orbsvcs/ImplRepo_Service/Forwarder.cpp index cc88f060de7..60976e69dc6 100644 --- a/TAO/orbsvcs/ImplRepo_Service/Forwarder.cpp +++ b/TAO/orbsvcs/ImplRepo_Service/Forwarder.cpp @@ -186,8 +186,7 @@ ImR_DSI_ResponseHandler::send_ior (const char *pior) { ior += this->key_str_.in(); - CORBA::Object_var forward_obj = - this->orb_->string_to_object (ior.c_str ()); + CORBA::Object_var forward_obj = this->orb_->string_to_object (ior.c_str ()); if (!CORBA::is_nil (forward_obj.in ())) { @@ -197,16 +196,23 @@ ImR_DSI_ResponseHandler::send_ior (const char *pior) } else { - ORBSVCS_ERROR ((LM_ERROR, - ACE_TEXT ("(%P|%t) ImR_DSI_ResponseHandler::send_ior (): Forward_to ") - ACE_TEXT ("reference is nil\n"))); + if (ImR_Locator_i::debug () > 1) + { + ORBSVCS_ERROR ((LM_ERROR, + ACE_TEXT ("(%P|%t) ImR_DSI_ResponseHandler::send_ior (): Forward_to ") + ACE_TEXT ("reference is nil for key <%C> server_name <%C>\n"), + key_str_.in (), server_name_.in ())); + } } } else { - ORBSVCS_ERROR ((LM_ERROR, - ACE_TEXT ("(%P|%t) ImR_DSI_ResponseHandler::send_ior (): Invalid corbaloc ior for key <%C> server_name <%C> IOR <%C>\n"), - key_str_.in (), server_name_.in (), pior)); + if (ImR_Locator_i::debug () > 1) + { + ORBSVCS_ERROR ((LM_ERROR, + ACE_TEXT ("(%P|%t) ImR_DSI_ResponseHandler::send_ior (): Invalid corbaloc ior for key <%C> server_name <%C> IOR <%C>\n"), + key_str_.in (), server_name_.in (), pior)); + } } this->invoke_excep_i (new CORBA::OBJECT_NOT_EXIST @@ -226,7 +232,7 @@ ImR_DSI_ResponseHandler::invoke_excep_i (CORBA::Exception *ex) void ImR_DSI_ResponseHandler::send_exception (CORBA::Exception *ex) { - //discard the exception, always throw a transient: + // Discard the exception, always throw a transient: delete ex; this->invoke_excep_i (new CORBA::TRANSIENT diff --git a/TAO/orbsvcs/ImplRepo_Service/INS_Locator.cpp b/TAO/orbsvcs/ImplRepo_Service/INS_Locator.cpp index 1a4242e0cb0..d2da4e94eb2 100644 --- a/TAO/orbsvcs/ImplRepo_Service/INS_Locator.cpp +++ b/TAO/orbsvcs/ImplRepo_Service/INS_Locator.cpp @@ -12,6 +12,7 @@ #include "ImR_Locator_i.h" #include "tao/ORB_Constants.h" #include "tao/ORB_Core.h" +#include "orbsvcs/Log_Macros.h" INS_Locator::INS_Locator (ImR_Locator_i& loc) : imr_locator_ (loc) @@ -63,7 +64,7 @@ INS_Locator::async_locate (::IORTable::Locate_ResponseHandler handler, //---------------------------------------------------------------------------------------- INS_Loc_ResponseHandler::INS_Loc_ResponseHandler (const char *key, ::IORTable::Locate_ResponseHandler handler) - : key_(key), + : key_str_(key), rh_ (handler) { } @@ -72,8 +73,36 @@ void INS_Loc_ResponseHandler::send_ior (const char *pior) { ACE_CString ior = pior; - ior += key_; - rh_->forward_ior (ior.c_str(), false); + + // Check that the returned ior is the expected partial ior with + // missing ObjectKey. + if (ior.find ("corbaloc:") == 0 && ior[ior.length () -1] == '/') + { + ior += key_str_; + + if (ImR_Locator_i::debug () > 5) + { + ORBSVCS_DEBUG ((LM_DEBUG, + ACE_TEXT ("(%P|%t) INS_Loc_ResponseHandler::send_ior (): Forwarding ") + ACE_TEXT ("key <%C> to IOR <%C>\n"), + key_str_.in (), ior.c_str ())); + } + rh_->forward_ior (ior.c_str(), false); + } + else + { + if (ImR_Locator_i::debug () > 1) + { + ORBSVCS_ERROR ((LM_ERROR, + ACE_TEXT ("(%P|%t) INS_Loc_ResponseHandler::send_ior (): Invalid corbaloc ior for key <%C> IOR <%C>\n"), + key_str_.in (), pior)); + } + + rh_->raise_excep (CORBA::OBJECT_NOT_EXIST (CORBA::SystemException::_tao_minor_code + ( TAO_IMPLREPO_MINOR_CODE, 0), + CORBA::COMPLETED_NO)); + } + delete this; } diff --git a/TAO/orbsvcs/ImplRepo_Service/INS_Locator.h b/TAO/orbsvcs/ImplRepo_Service/INS_Locator.h index 433dafd0a41..a948ea478d5 100644 --- a/TAO/orbsvcs/ImplRepo_Service/INS_Locator.h +++ b/TAO/orbsvcs/ImplRepo_Service/INS_Locator.h @@ -35,7 +35,7 @@ public: virtual void send_exception (CORBA::Exception *ex); private: - ACE_CString key_; + CORBA::String_var key_str_; TAO_AMH_Locate_ResponseHandler_var rh_; }; diff --git a/TAO/orbsvcs/ImplRepo_Service/ImR_Activator_i.cpp b/TAO/orbsvcs/ImplRepo_Service/ImR_Activator_i.cpp index 819f35b7f4f..ab2e06d5c0f 100644 --- a/TAO/orbsvcs/ImplRepo_Service/ImR_Activator_i.cpp +++ b/TAO/orbsvcs/ImplRepo_Service/ImR_Activator_i.cpp @@ -34,6 +34,41 @@ Active_Pid_Setter::~Active_Pid_Setter() { owner_.active_check_pid_ = ACE_INVALID_PID; } + +Watchdog::Watchdog(ACE_Process_Manager& procman) : + stop_(false), + procman_(procman) +{ +} + +int +Watchdog::svc() +{ + while (!this->stop_) + { + if (this->procman_.managed() > 0) + { + this->procman_.wait(0, ACE_Time_Value(0, 25000)); + } + else + { + ACE_OS::sleep (ACE_Time_Value(0, 25000)); + } + } + return 0; +} + +bool +Watchdog::start() +{ + return this->activate() == 0; +} +void +Watchdog::stop() +{ + this->stop_ = true; + this->wait(); +} #endif /* ACE_WIN32 */ ImR_Activator_i::ImR_Activator_i (void) @@ -46,6 +81,9 @@ ImR_Activator_i::ImR_Activator_i (void) , max_env_vars_ (Activator_Options::ENVIRONMENT_MAX_VARS) , detach_child_ (false) , active_check_pid_ (ACE_INVALID_PID) +#if defined (ACE_WIN32) + , process_watcher_ (process_mgr_) +#endif /* ACE_WIN32 */ { } @@ -85,12 +123,27 @@ ImR_Activator_i::register_with_imr (ImplementationRepository::Activator_ptr acti if (this->debug_ > 1) ORBSVCS_DEBUG( (LM_DEBUG, "(%P|%t) ImR Activator: Contacting ImplRepoService...\n")); - // First, resolve the ImR, without this we can go no further - CORBA::Object_var obj = - orb_->resolve_initial_references ("ImplRepoService"); +#if defined (ACE_WIN32) + // On Windows the notify of a death of a child process requires the + // WFMO reactor which is not the default ORB reactor type so on + // Windows we are using a separate task to detect a child death + if (!this->process_watcher_.start ()) + { + if (this->debug_ > 1) + { + ORBSVCS_ERROR ((LM_ERROR, "(%P|%t) ImR Activator: Failed to start process watchdog\n")); + } + } + this->process_mgr_.open (ACE_Process_Manager::DEFAULT_SIZE); +#else this->process_mgr_.open (ACE_Process_Manager::DEFAULT_SIZE, this->orb_->orb_core ()->reactor ()); +#endif /* ACE_WIN32 */ + + // First, resolve the ImR, without this we can go no further + CORBA::Object_var obj = + orb_->resolve_initial_references ("ImplRepoService"); locator_ = ImplementationRepository::Locator::_narrow (obj.in ()); @@ -103,8 +156,7 @@ ImR_Activator_i::register_with_imr (ImplementationRepository::Activator_ptr acti ior.in())); } - this->registration_token_ = - locator_->register_activator (name_.c_str (), activator); + this->registration_token_ = locator_->register_activator (name_.c_str (), activator); if (debug_ > 0) ORBSVCS_DEBUG((LM_DEBUG, "(%P|%t) ImR Activator: Registered with ImR\n")); @@ -175,18 +227,6 @@ ImR_Activator_i::init_with_orb (CORBA::ORB_ptr orb, const Activator_Options& opt if (this->debug_ > 0) ORBSVCS_DEBUG((LM_DEBUG, "(%P|%t) ImR Activator: Starting <%C>\n", name_.c_str ())); - // initialize our process manager. - // This requires a reactor that has signal handling. - ACE_Reactor *reactor = ACE_Reactor::instance (); - if (reactor != 0) - { - if (this->process_mgr_.open (ACE_Process_Manager::DEFAULT_SIZE, reactor) == -1) - { - ORBSVCS_ERROR_RETURN ((LM_ERROR, - "(%P|%t) ImR Activator: The ACE_Process_Manager didn't get initialized\n"), -1); - } - } - this->register_with_imr (activator.in ()); // no throw PortableServer::POAManager_var poaman = @@ -246,6 +286,11 @@ ImR_Activator_i::fini (void) if (debug_ > 1) ORBSVCS_DEBUG ((LM_DEBUG, "(%P|%t) ImR Activator: Shutting down...\n")); +#if defined (ACE_WIN32) + // Stop our process watcher task + this->process_watcher_.stop (); +#endif /* ACE_WIN32 */ + this->process_mgr_.close (); this->root_poa_->destroy (1, 1); @@ -405,7 +450,7 @@ ImR_Activator_i::kill_server (const char* name, CORBA::Long lastpid, CORBA::Shor CORBA::Boolean ImR_Activator_i::still_alive (CORBA::Long pid) { - pid_t pt = static_cast<pid_t>(pid); + pid_t const pt = static_cast<pid_t>(pid); bool is_running = this->process_map_.find (pt) == 0; #if defined (ACE_WIN32) if (is_running) @@ -641,7 +686,7 @@ ImR_Activator_i::handle_exit (ACE_Process * process) { ORBSVCS_DEBUG ((LM_DEBUG, - ACE_TEXT ("Process %d exited with exit code %d, delay = %d\n"), + ACE_TEXT ("(%P|%t) ImR Activator: Process %d exited with exit code %d, delay = %d\n"), process->getpid (), process->return_value (), this->induce_delay_)); } @@ -651,16 +696,25 @@ ImR_Activator_i::handle_exit (ACE_Process * process) ACE_Time_Value dtv (0, this->induce_delay_ * 1000); pid_t const pid = process->getpid(); Act_token_type token = static_cast<Act_token_type>(pid); - r->schedule_timer (this, reinterpret_cast<void *>(token), dtv ); + r->schedule_timer (this, reinterpret_cast<void *>(token), dtv); } else { +#if defined (ACE_WIN32) + // On Windows this is called from the context of the watchdog thread + // so we are using the reactor here to trigger a thread switch so that + // handle_exit_i is called from the reactor thread + ACE_Reactor *r = this->orb_->orb_core ()->reactor (); + pid_t const pid = process->getpid (); + Act_token_type token = static_cast<Act_token_type>(pid); + r->schedule_timer (this, reinterpret_cast<void *>(token), ACE_Time_Value ()); +#else this->handle_exit_i (process->getpid()); +#endif /* ACE_WIN32 */ } return 0; } - int ImR_Activator_i::handle_timeout (const ACE_Time_Value &, const void * tok) { diff --git a/TAO/orbsvcs/ImplRepo_Service/ImR_Activator_i.h b/TAO/orbsvcs/ImplRepo_Service/ImR_Activator_i.h index 845588745b1..58d28fb5f01 100644 --- a/TAO/orbsvcs/ImplRepo_Service/ImR_Activator_i.h +++ b/TAO/orbsvcs/ImplRepo_Service/ImR_Activator_i.h @@ -20,6 +20,9 @@ #include "ace/Hash_Map_Manager.h" #include "ace/Null_Mutex.h" #include "ace/SString.h" +#if defined (ACE_WIN32) +# include "ace/Task.h" +#endif /* ACE_WIN32 */ #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once @@ -45,15 +48,28 @@ struct ACE_Equal_To_pid_t } }; - #if (ACE_SIZEOF_VOID_P == 8) typedef ACE_INT64 Act_token_type; #else typedef ACE_INT32 Act_token_type; #endif +#if defined (ACE_WIN32) class Active_Pid_Setter; +class Watchdog : public ACE_Task_Base +{ +public: + Watchdog (ACE_Process_Manager& procman); + virtual int svc (); + bool start (); + void stop (); +private: + bool stop_; + ACE_Process_Manager &procman_; +}; +#endif /* ACE_WIN32 */ + /** * @class ImR_Activator_i * @@ -66,7 +82,7 @@ class Active_Pid_Setter; class Activator_Export ImR_Activator_i : public POA_ImplementationRepository::ActivatorExt, public ACE_Event_Handler { - public: +public: friend class Active_Pid_Setter; ImR_Activator_i (void); @@ -96,8 +112,7 @@ class Activator_Export ImR_Activator_i : public POA_ImplementationRepository::Ac /// Shutdown the orb. void shutdown (bool signaled); - private: - +private: int init_with_orb (CORBA::ORB_ptr orb, const Activator_Options& opts); void register_with_imr(ImplementationRepository::Activator_ptr activator); @@ -111,8 +126,7 @@ class Activator_Export ImR_Activator_i : public POA_ImplementationRepository::Ac bool in_upcall (void); - private: - +private: typedef ACE_Unbounded_Set<ACE_CString> UniqueServerList; typedef ACE_Hash_Map_Manager_Ex<pid_t, @@ -156,6 +170,9 @@ class Activator_Export ImR_Activator_i : public POA_ImplementationRepository::Ac bool detach_child_; pid_t active_check_pid_; +#if defined (ACE_WIN32) + Watchdog process_watcher_; +#endif /* ACE_WIN32 */ }; #if defined (ACE_WIN32) @@ -166,7 +183,6 @@ public: ~Active_Pid_Setter(); ImR_Activator_i &owner_; - }; #endif /* ACE_WIN32 */ diff --git a/TAO/orbsvcs/ImplRepo_Service/ImR_Locator_i.h b/TAO/orbsvcs/ImplRepo_Service/ImR_Locator_i.h index 0b5466381d0..f0c363f4c96 100644 --- a/TAO/orbsvcs/ImplRepo_Service/ImR_Locator_i.h +++ b/TAO/orbsvcs/ImplRepo_Service/ImR_Locator_i.h @@ -211,7 +211,6 @@ private: bool force); private: - static int debug_; // The class that handles the forwarding. @@ -333,7 +332,6 @@ private: Loc_Operation_Id op_id_; ImplementationRepository::AMH_AdministrationResponseHandler_var resp_; ImplementationRepository::AMH_AdministrationExtResponseHandler_var ext_; - }; #include /**/ "ace/post.h" diff --git a/TAO/orbsvcs/ImplRepo_Service/LiveCheck.cpp b/TAO/orbsvcs/ImplRepo_Service/LiveCheck.cpp index 6c7867c5654..0751d522a6f 100644 --- a/TAO/orbsvcs/ImplRepo_Service/LiveCheck.cpp +++ b/TAO/orbsvcs/ImplRepo_Service/LiveCheck.cpp @@ -360,9 +360,9 @@ LiveEntry::validate_ping (bool &want_reping, ACE_Time_Value& next) } return false; } - ACE_Time_Value now (ACE_OS::gettimeofday()); - ACE_Time_Value diff = this->next_check_ - now; - long msec = diff.msec(); + ACE_Time_Value const now (ACE_OS::gettimeofday()); + ACE_Time_Value const diff = this->next_check_ - now; + long const msec = diff.msec(); if (msec > 0) { if (!want_reping || this->next_check_ < next) @@ -404,7 +404,7 @@ LiveEntry::validate_ping (bool &want_reping, ACE_Time_Value& next) { this->liveliness_ = LS_TRANSIENT; } - ACE_Time_Value next (ms / 1000, (ms % 1000) * 1000); + ACE_Time_Value const next (ms / 1000, (ms % 1000) * 1000); this->next_check_ = now + next; if (ImR_Locator_i::debug () > 4) { diff --git a/TAO/orbsvcs/examples/Log/Notify/Notify_Consumer.h b/TAO/orbsvcs/examples/Log/Notify/Notify_Consumer.h index d4d7c712d37..4357cc56362 100644 --- a/TAO/orbsvcs/examples/Log/Notify/Notify_Consumer.h +++ b/TAO/orbsvcs/examples/Log/Notify/Notify_Consumer.h @@ -41,26 +41,21 @@ public: // Run the test protected: - CosNotifyChannelAdmin::ProxyID proxy_supplier_id_; // The proxy_supplier id. // = Methods - // Destructor - // = NotifyPublish method - virtual void offer_change ( + virtual void offer_change ( const CosNotification::EventTypeSeq & added, - const CosNotification::EventTypeSeq & removed - ); + const CosNotification::EventTypeSeq & removed); // = StructuredPushSupplier methods -virtual void push (const CORBA::Any &event); + virtual void push (const CORBA::Any &event); - virtual void disconnect_push_consumer ( - ); + virtual void disconnect_push_consumer (); private: CORBA::ULong event_count_; diff --git a/TAO/orbsvcs/examples/Log/Notify/Notify_Supplier.h b/TAO/orbsvcs/examples/Log/Notify/Notify_Supplier.h index d96afc1c168..524e2e5ab0f 100644 --- a/TAO/orbsvcs/examples/Log/Notify/Notify_Supplier.h +++ b/TAO/orbsvcs/examples/Log/Notify/Notify_Supplier.h @@ -101,12 +101,10 @@ protected: // = NotifySubscribe virtual void subscription_change ( const CosNotification::EventTypeSeq & added, - const CosNotification::EventTypeSeq & removed - ); + const CosNotification::EventTypeSeq & removed); // = StructuredPushSupplier method - virtual void disconnect_structured_push_supplier ( - ); + virtual void disconnect_structured_push_supplier (); }; diff --git a/TAO/orbsvcs/examples/Notify/Filter/Filter.h b/TAO/orbsvcs/examples/Notify/Filter/Filter.h index 5035a351653..6723882544d 100644 --- a/TAO/orbsvcs/examples/Notify/Filter/Filter.h +++ b/TAO/orbsvcs/examples/Notify/Filter/Filter.h @@ -169,16 +169,13 @@ protected: // = NotifyPublish method virtual void offer_change ( const CosNotification::EventTypeSeq & added, - const CosNotification::EventTypeSeq & removed - ); + const CosNotification::EventTypeSeq & removed); // = StructuredPushSupplier methods virtual void push_structured_event ( - const CosNotification::StructuredEvent & notification - ); + const CosNotification::StructuredEvent & notification); - virtual void disconnect_structured_push_consumer ( - ); + virtual void disconnect_structured_push_consumer (); }; /*****************************************************************/ @@ -225,12 +222,10 @@ protected: // = NotifySubscribe virtual void subscription_change ( const CosNotification::EventTypeSeq & added, - const CosNotification::EventTypeSeq & removed - ); + const CosNotification::EventTypeSeq & removed); // = StructuredPushSupplier method - virtual void disconnect_structured_push_supplier ( - ); + virtual void disconnect_structured_push_supplier (); }; #endif /* NOTIFY_FILTER_CLIENT_H */ diff --git a/TAO/orbsvcs/examples/Notify/Lanes/Supplier.h b/TAO/orbsvcs/examples/Notify/Lanes/Supplier.h index 2e0a6b1227a..fffb548b2f1 100644 --- a/TAO/orbsvcs/examples/Notify/Lanes/Supplier.h +++ b/TAO/orbsvcs/examples/Notify/Lanes/Supplier.h @@ -58,8 +58,7 @@ protected: // = NotifySubscribe virtual void subscription_change ( const CosNotification::EventTypeSeq & added, - const CosNotification::EventTypeSeq & removed - ); + const CosNotification::EventTypeSeq & removed); // = StructuredPushSupplier method virtual void disconnect_structured_push_supplier (void); diff --git a/TAO/orbsvcs/examples/Notify/Subscribe/Subscribe.h b/TAO/orbsvcs/examples/Notify/Subscribe/Subscribe.h index 1e1ba4a6a2f..a09e939b37f 100644 --- a/TAO/orbsvcs/examples/Notify/Subscribe/Subscribe.h +++ b/TAO/orbsvcs/examples/Notify/Subscribe/Subscribe.h @@ -159,16 +159,13 @@ protected: // = NotifyPublish method virtual void offer_change ( const CosNotification::EventTypeSeq & added, - const CosNotification::EventTypeSeq & removed - ); + const CosNotification::EventTypeSeq & removed); // = StructuredPushSupplier methods virtual void push_structured_event ( - const CosNotification::StructuredEvent & notification - ); + const CosNotification::StructuredEvent & notification); - virtual void disconnect_structured_push_consumer ( - ); + virtual void disconnect_structured_push_consumer (); }; /*****************************************************************/ @@ -212,12 +209,10 @@ protected: // = NotifySubscribe virtual void subscription_change ( const CosNotification::EventTypeSeq & added, - const CosNotification::EventTypeSeq & removed - ); + const CosNotification::EventTypeSeq & removed); // = StructuredPushSupplier method - virtual void disconnect_structured_push_supplier ( - ); + virtual void disconnect_structured_push_supplier (); }; #endif /* NOTIFY_SUBSCRIBE_CLIENT_H */ diff --git a/TAO/orbsvcs/examples/Notify/ThreadPool/Consumer.h b/TAO/orbsvcs/examples/Notify/ThreadPool/Consumer.h index 8d078171772..131c4b81deb 100644 --- a/TAO/orbsvcs/examples/Notify/ThreadPool/Consumer.h +++ b/TAO/orbsvcs/examples/Notify/ThreadPool/Consumer.h @@ -60,16 +60,13 @@ protected: // = NotifyPublish method virtual void offer_change ( const CosNotification::EventTypeSeq & added, - const CosNotification::EventTypeSeq & removed - ); + const CosNotification::EventTypeSeq & removed); // = StructuredPushSupplier methods virtual void push_structured_event ( - const CosNotification::StructuredEvent & notification - ); + const CosNotification::StructuredEvent & notification); - virtual void disconnect_structured_push_consumer ( - ); + virtual void disconnect_structured_push_consumer (); // = Data members diff --git a/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/UpdateableHandler.h b/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/UpdateableHandler.h index 181db2a5943..08c2d6bfe6a 100644 --- a/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/UpdateableHandler.h +++ b/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/UpdateableHandler.h @@ -21,24 +21,21 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL class AMI_Primary_Replication_Strategy; class Update_Manager; -class UpdateableHandler : public POA_FTRT::AMI_UpdateableHandler +class UpdateableHandler : public POA_FTRT::AMI_UpdateableHandler { public: - UpdateableHandler(AMI_Primary_Replication_Strategy* strategy); - ~UpdateableHandler(); + UpdateableHandler(AMI_Primary_Replication_Strategy* strategy); + ~UpdateableHandler(); - FTRT::AMI_UpdateableHandler_ptr activate( - Update_Manager* mgr, int id, - PortableServer::ObjectId& oid); - typedef void (Update_Manager::*Handler)(int); + FTRT::AMI_UpdateableHandler_ptr activate( + Update_Manager* mgr, int id, + PortableServer::ObjectId& oid); + typedef void (Update_Manager::*Handler)(int); - void dispatch(Handler handler) ; + void dispatch(Handler handler) ; - virtual void set_update ( - ); - virtual void set_update_excep ( - ::Messaging::ExceptionHolder * excep_holder - ); + virtual void set_update (); + virtual void set_update_excep (::Messaging::ExceptionHolder * excep_holder); private: AMI_Primary_Replication_Strategy* strategy_; diff --git a/TAO/orbsvcs/orbsvcs/IFRService/ComponentRepository_i.cpp b/TAO/orbsvcs/orbsvcs/IFRService/ComponentRepository_i.cpp index 644bbc5af99..7e6bd0996b3 100644 --- a/TAO/orbsvcs/orbsvcs/IFRService/ComponentRepository_i.cpp +++ b/TAO/orbsvcs/orbsvcs/IFRService/ComponentRepository_i.cpp @@ -58,20 +58,17 @@ TAO_ComponentRepository_i::create_servants_and_poas ( // Request Processing Policy. policies[2] = this->root_poa_->create_request_processing_policy ( - PortableServer::USE_DEFAULT_SERVANT - ); + PortableServer::USE_DEFAULT_SERVANT); // Servant Retention Policy. policies[3] = this->root_poa_->create_servant_retention_policy ( - PortableServer::NON_RETAIN - ); + PortableServer::NON_RETAIN); // Id Uniqueness Policy. policies[4] = this->root_poa_->create_id_uniqueness_policy ( - PortableServer::MULTIPLE_ID - ); + PortableServer::MULTIPLE_ID); PortableServer::POAManager_var poa_manager = this->root_poa_->the_POAManager (); diff --git a/TAO/orbsvcs/orbsvcs/Notify/Standard_Event_Persistence.cpp b/TAO/orbsvcs/orbsvcs/Notify/Standard_Event_Persistence.cpp index 0d6dc11b5aa..a9834a5c602 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/Standard_Event_Persistence.cpp +++ b/TAO/orbsvcs/orbsvcs/Notify/Standard_Event_Persistence.cpp @@ -31,8 +31,8 @@ Standard_Event_Persistence::get_factory () { ACE_NEW_NORETURN ( this->factory_, - Standard_Event_Persistence_Factory () - ); + Standard_Event_Persistence_Factory ()); + if (this->factory_ != 0) { if (!this->factory_->open (this->filename_.c_str ())) diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_FactoryRegistry.h b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_FactoryRegistry.h index d2f01c4fe3c..042cb69528b 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_FactoryRegistry.h +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_FactoryRegistry.h @@ -129,31 +129,24 @@ namespace TAO virtual void register_factory ( const char * role, const char * type_id, - const PortableGroup::FactoryInfo & factory_info - ); + const PortableGroup::FactoryInfo & factory_info); virtual void unregister_factory ( const char * role, - const PortableGroup::Location & location - ); + const PortableGroup::Location & location); - virtual void unregister_factory_by_role ( - const char * role - ); + virtual void unregister_factory_by_role (const char * role); virtual void unregister_factory_by_location ( - const PortableGroup::Location & location - ); + const PortableGroup::Location & location); virtual ::PortableGroup::FactoryInfos * list_factories_by_role ( const char * role, - CORBA::String_out type_id - ); + CORBA::String_out type_id); virtual ::PortableGroup::FactoryInfos * list_factories_by_location ( - const PortableGroup::Location & location - ); + const PortableGroup::Location & location); ///////////////////////// // Implementation methods diff --git a/TAO/orbsvcs/tests/ImplRepo/Bug_4152_Regression/Test.idl b/TAO/orbsvcs/tests/ImplRepo/Bug_4152_Regression/Test.idl index 2a333b4a6e5..f439ca145be 100644 --- a/TAO/orbsvcs/tests/ImplRepo/Bug_4152_Regression/Test.idl +++ b/TAO/orbsvcs/tests/ImplRepo/Bug_4152_Regression/Test.idl @@ -2,4 +2,5 @@ interface Test { short get_server_num (); oneway void terminate (); + oneway void shutdown (); }; diff --git a/TAO/orbsvcs/tests/ImplRepo/Bug_4152_Regression/Test_i.cpp b/TAO/orbsvcs/tests/ImplRepo/Bug_4152_Regression/Test_i.cpp index 3091a829c2c..6ef8f1f9542 100644 --- a/TAO/orbsvcs/tests/ImplRepo/Bug_4152_Regression/Test_i.cpp +++ b/TAO/orbsvcs/tests/ImplRepo/Bug_4152_Regression/Test_i.cpp @@ -4,6 +4,10 @@ #include "ace/OS_NS_unistd.h" #include "ace/OS_NS_stdio.h" +Test_i::Test_i (CORBA::ORB_ptr orb) : orb_ (CORBA::ORB::_duplicate(orb)) +{ +} + CORBA::Short Test_i::get_server_num (void) { @@ -16,3 +20,10 @@ Test_i::terminate (void) ACE_DEBUG ((LM_DEBUG, "(%P|%t) Server received terminate and going to exit\n")); exit (0); } + +void +Test_i::shutdown (void) +{ + ACE_DEBUG ((LM_DEBUG, "(%P|%t) Server received shutdown and going to exit\n")); + orb_->shutdown (); +} diff --git a/TAO/orbsvcs/tests/ImplRepo/Bug_4152_Regression/Test_i.h b/TAO/orbsvcs/tests/ImplRepo/Bug_4152_Regression/Test_i.h index 984bc38669f..65826facc02 100644 --- a/TAO/orbsvcs/tests/ImplRepo/Bug_4152_Regression/Test_i.h +++ b/TAO/orbsvcs/tests/ImplRepo/Bug_4152_Regression/Test_i.h @@ -12,9 +12,14 @@ class Test_i : public virtual POA_Test { public: + Test_i (CORBA::ORB_ptr orb); virtual CORBA::Short get_server_num (void); virtual void terminate (void); + + virtual void shutdown (void); +private: + CORBA::ORB_var orb_; }; #endif /* TEST_I_H_ */ diff --git a/TAO/orbsvcs/tests/ImplRepo/Bug_4152_Regression/client.cpp b/TAO/orbsvcs/tests/ImplRepo/Bug_4152_Regression/client.cpp index e9f5e6c73f0..2eba63f0baf 100644 --- a/TAO/orbsvcs/tests/ImplRepo/Bug_4152_Regression/client.cpp +++ b/TAO/orbsvcs/tests/ImplRepo/Bug_4152_Regression/client.cpp @@ -4,11 +4,12 @@ #include "ace/OS_NS_unistd.h" bool killit = false; +bool shutdown_server = false; int parse_args (int argc, ACE_TCHAR *argv[]) { - ACE_Get_Opt get_opts (argc, argv, ACE_TEXT("k")); + ACE_Get_Opt get_opts (argc, argv, ACE_TEXT("ks")); int c; while ((c = get_opts ()) != -1) @@ -17,6 +18,9 @@ parse_args (int argc, ACE_TCHAR *argv[]) case 'k': killit = true; break; + case 's': + shutdown_server = true; + break; case '?': default: ACE_ERROR_RETURN ((LM_ERROR, @@ -53,6 +57,12 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) ACE_DEBUG ((LM_DEBUG, "(%P|%t) Client send terminate request\n")); } + else if (shutdown_server) + { + test->shutdown (); + ACE_DEBUG ((LM_DEBUG, + "(%P|%t) Client send shutdown request\n")); + } else { CORBA::Short const n = test->get_server_num (); @@ -64,8 +74,8 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) catch (const CORBA::Exception &ex) { ACE_DEBUG ((LM_DEBUG, - "(%P|%t) Client caught: %C on first attempt, retrying killit %d\n", - ex._name (), killit)); + "(%P|%t) Client caught: %C on first attempt, retrying killit <%d> shutdown <%d>\n", + ex._name (), killit, shutdown_server)); try { if (CORBA::is_nil (test.in())) @@ -78,6 +88,12 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) ACE_DEBUG ((LM_DEBUG, "(%P|%t) Client send terminate request on second attempt\n")); } + else if (shutdown_server) + { + test->shutdown (); + ACE_DEBUG ((LM_DEBUG, + "(%P|%t) Client send shutdown request on second attempt\n")); + } else { CORBA::Short const n = test->get_server_num (); diff --git a/TAO/orbsvcs/tests/ImplRepo/Bug_4152_Regression/run_test.pl b/TAO/orbsvcs/tests/ImplRepo/Bug_4152_Regression/run_test.pl index 6216317b394..ec46d5d9079 100755 --- a/TAO/orbsvcs/tests/ImplRepo/Bug_4152_Regression/run_test.pl +++ b/TAO/orbsvcs/tests/ImplRepo/Bug_4152_Regression/run_test.pl @@ -13,6 +13,7 @@ $debug_level = 0; $no_dns = 0; $imrhost = "127.0.0.1"; $poa_delay = 3; +$shutdown_delay = 0; if ($#ARGV >= 0) { for (my $i = 0; $i <= $#ARGV; $i++) { @@ -22,6 +23,14 @@ if ($#ARGV >= 0) { elsif ($ARGV[$i] eq '-no_dns') { $no_dns = 1; } + elsif ($ARGV[$i] eq "-s") { + $i++; + $shutdown_delay = $ARGV[$i]; + } + elsif ($ARGV[$i] eq "-c") { + $i++; + $shutdown_delay = $ARGV[$i]; + } else { usage(); exit 1; @@ -137,7 +146,7 @@ sub register_server $TI->Arguments ($ti_cmd_base. "add TestObject_a -c \"". $srv_server_cmd . - " -ORBUseIMR 1 -p $poa_delay -ORBLingerTimeout 0 " . + " -ORBUseIMR 1 -p $poa_delay -s $shutdown_delay -ORBLingerTimeout 0 " . "$debugarg $endpointarg " . "-ORBInitRef ImplRepoService=file://$imr_imriorfile\""); @@ -257,7 +266,7 @@ sub validate_servers sub double_server_test { print "Running slow servers errant duplicate test\n"; - my $debugarg = "-d 5 -ORBVerboseLogging 1 -ORBDebugLevel $debug_level -ORBLogfile $imrlogfile " if ($debug_level > 0); + my $debugarg = "-d 10 -ORBVerboseLogging 1 -ORBDebugLevel $debug_level -ORBLogfile $imrlogfile " if ($debug_level > 0); my $endpointarg = "-orbdotteddecimaladdresses 1" if ($no_dns == 1); my $result = 0; @@ -310,9 +319,13 @@ sub double_server_test manual_start_server(); if ($status == 0) { - - print "Initial client request to kill server\n"; - run_client ("-k"); + if ($shutdown_delay = 0) { + print "Initial client request to kill server\n"; + run_client ("-k"); + } else { + print "Initial client request to shutdown server\n"; + run_client ("-s"); + } sleep (1); print "Second client request to reactivate server \n"; diff --git a/TAO/orbsvcs/tests/ImplRepo/Bug_4152_Regression/server.cpp b/TAO/orbsvcs/tests/ImplRepo/Bug_4152_Regression/server.cpp index dd010b3a7cd..bb9d613f201 100644 --- a/TAO/orbsvcs/tests/ImplRepo/Bug_4152_Regression/server.cpp +++ b/TAO/orbsvcs/tests/ImplRepo/Bug_4152_Regression/server.cpp @@ -15,7 +15,7 @@ class ORB_Runner : public ACE_Task_Base { public: - ORB_Runner (CORBA::ORB_var orb) : orb_(orb) {} + ORB_Runner (CORBA::ORB_ptr orb) : orb_(CORBA::ORB::_duplicate(orb)) {} int svc (void) { this->orb_->run (); @@ -26,7 +26,6 @@ private: CORBA::ORB_var orb_; }; - PortableServer::POA_var root_poa; PortableServer::POA_var poa_a; @@ -62,14 +61,15 @@ int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { CORBA::ORB_var orb = CORBA::ORB_init(argc, argv); - ORB_Runner *runner = new ORB_Runner (orb); + ORB_Runner *runner = new ORB_Runner (orb.in ()); int poa_delay = 10; + int shutdown_delay = 0; ACE_DEBUG ((LM_DEBUG, "(%P|%t) Start server main\n")); try { - ACE_Get_Opt get_opts (argc, argv, ACE_TEXT ("p:?")); + ACE_Get_Opt get_opts (argc, argv, ACE_TEXT ("p:s:?")); int c; while ((c = get_opts ()) != -1) @@ -78,11 +78,14 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) case 'p': poa_delay = ACE_OS::atoi (get_opts.opt_arg ()); break; + case 's': + shutdown_delay = ACE_OS::atoi (get_opts.opt_arg ()); + break; case '?': ACE_DEBUG ((LM_DEBUG, "usage: %s " "-d <seconds to delay before initializing POA> " - "-n Number of the server\n", + "-s <seconds to delay before exiting main after the ORB destroy>\n", argv[0])); return 1; break; @@ -97,7 +100,7 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) ACE_CString base = ACE_CString ("TestObject"); createPOAs (base); - PortableServer::Servant_var<Test_i> test_servant = new Test_i; + PortableServer::Servant_var<Test_i> test_servant = new Test_i (orb.in ()); PortableServer::ObjectId_var object_id = PortableServer::string_to_ObjectId (base.c_str()); @@ -107,7 +110,7 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) Test_var tva = Test::_narrow (obj.in()); - ACE_DEBUG ((LM_DEBUG, "(%P|%t) Started Server pid = %d poa delay %d\n", ACE_OS::getpid (), poa_delay)); + ACE_DEBUG ((LM_DEBUG, "(%P|%t) Started Server pid <%d> poa delay <%d> shutdown delay <%d>\n", ACE_OS::getpid (), poa_delay, shutdown_delay)); { ACE_CString status_file = base + ACE_CString(".status"); @@ -123,7 +126,7 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) ACE_OS::sleep (tv); activatePOAs (); - ACE_DEBUG ((LM_DEBUG, "(%P|%t) Activated POA pid = %d\n", ACE_OS::getpid ())); + ACE_DEBUG ((LM_DEBUG, "(%P|%t) Activated POA pid <%d>\n", ACE_OS::getpid ())); TAO_Root_POA* tpoa = dynamic_cast<TAO_Root_POA*> (poa_a.in ()); ACE_ASSERT (tpoa != 0); @@ -136,10 +139,13 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) test_ior = orb->object_to_string (tva.in()); base += "_a"; - ACE_DEBUG ((LM_DEBUG, "(%P|%t) %s:\n%s\n", base.c_str(), test_ior.in())); + ACE_DEBUG ((LM_DEBUG, "(%P|%t) %C:\n%C\n", base.c_str(), test_ior.in())); table->bind (base.c_str (), test_ior.in ()); runner->wait (); + + ACE_DEBUG ((LM_DEBUG, "(%P|%t) Destroying POA pid <%d>\n", ACE_OS::getpid ())); + root_poa->destroy(1,1); orb->destroy(); } @@ -152,6 +158,8 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) delete runner; orb = CORBA::ORB::_nil (); + ACE_OS::sleep (shutdown_delay); + ACE_DEBUG ((LM_DEBUG, "(%P|%t) Exiting Server pid = %d \n", ACE_OS::getpid ())); diff --git a/TAO/orbsvcs/tests/ImplRepo/ReconnectServer/serverA.cpp b/TAO/orbsvcs/tests/ImplRepo/ReconnectServer/serverA.cpp index df6ec85f5a2..14661239937 100644 --- a/TAO/orbsvcs/tests/ImplRepo/ReconnectServer/serverA.cpp +++ b/TAO/orbsvcs/tests/ImplRepo/ReconnectServer/serverA.cpp @@ -123,5 +123,3 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) return 0; } - - diff --git a/TAO/orbsvcs/tests/ImplRepo/ReconnectServer/serverB.cpp b/TAO/orbsvcs/tests/ImplRepo/ReconnectServer/serverB.cpp index d5776eec110..9f338efb08c 100644 --- a/TAO/orbsvcs/tests/ImplRepo/ReconnectServer/serverB.cpp +++ b/TAO/orbsvcs/tests/ImplRepo/ReconnectServer/serverB.cpp @@ -93,8 +93,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) PortableServer::POA_var poa_a = rootPOA->create_POA ("poaB", poa_manager.in (), - policies - ); + policies); for (CORBA::ULong i = 0; i < policies.length (); diff --git a/TAO/orbsvcs/tests/ImplRepo/ReconnectServer/test_i.cpp b/TAO/orbsvcs/tests/ImplRepo/ReconnectServer/test_i.cpp index 8d781e5a64d..6a76a9bc053 100644 --- a/TAO/orbsvcs/tests/ImplRepo/ReconnectServer/test_i.cpp +++ b/TAO/orbsvcs/tests/ImplRepo/ReconnectServer/test_i.cpp @@ -1,7 +1,6 @@ #include "test_i.h" #include "ace/OS_NS_time.h" - // Implementation skeleton constructor Test_Dummy_i::Test_Dummy_i (void) { @@ -12,9 +11,7 @@ Test_Dummy_i::~Test_Dummy_i (void) { } -char * Test_Dummy_i::getMessage ( - void - ) +char * Test_Dummy_i::getMessage (void) { // Add your implementation here return CORBA::string_dup("Test::Dummy---->Hello World"); @@ -29,22 +26,17 @@ Test_Time_i::~Test_Time_i (void) { } -::CORBA::Long Test_Time_i::current_time ( - void - ) +::CORBA::Long Test_Time_i::current_time (void) { ACE_DEBUG ((LM_DEBUG, "(%P|%t)Test_Time_i::current_time called\n")); return CORBA::Long (ACE_OS::time (0)); } -void Test_Time_i::shutdown ( - void - ) +void Test_Time_i::shutdown (void) { ACE_DEBUG ((LM_DEBUG, - "%s\n", + "%C\n", "Time_i is shutting down")); - } diff --git a/TAO/orbsvcs/tests/ImplRepo/ReconnectServer/test_i.h b/TAO/orbsvcs/tests/ImplRepo/ReconnectServer/test_i.h index ff679e82b06..536c7fe81a8 100644 --- a/TAO/orbsvcs/tests/ImplRepo/ReconnectServer/test_i.h +++ b/TAO/orbsvcs/tests/ImplRepo/ReconnectServer/test_i.h @@ -7,7 +7,6 @@ #pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ - class Test_Dummy_i : public virtual POA_taoimrtest::reconnectserver::Dummy { @@ -31,17 +30,10 @@ public: // Destructor virtual ~Test_Time_i (void); - virtual - ::CORBA::Long current_time ( - void - ); + virtual ::CORBA::Long current_time (void); - virtual - void shutdown ( - void - ); + virtual void shutdown (void); }; - #endif /* IMR_RECONNECTSERVER_H */ diff --git a/TAO/orbsvcs/tests/ImplRepo/ping_interrupt/Server_ORBInitializer.cpp b/TAO/orbsvcs/tests/ImplRepo/ping_interrupt/Server_ORBInitializer.cpp index b1693cd7f78..337c130d38f 100644 --- a/TAO/orbsvcs/tests/ImplRepo/ping_interrupt/Server_ORBInitializer.cpp +++ b/TAO/orbsvcs/tests/ImplRepo/ping_interrupt/Server_ORBInitializer.cpp @@ -10,14 +10,12 @@ Server_ORBInitializer::Server_ORBInitializer (int *counter) } void -Server_ORBInitializer::pre_init ( - PortableInterceptor::ORBInitInfo_ptr) +Server_ORBInitializer::pre_init (PortableInterceptor::ORBInitInfo_ptr) { } void -Server_ORBInitializer::post_init ( - PortableInterceptor::ORBInitInfo_ptr info) +Server_ORBInitializer::post_init ( PortableInterceptor::ORBInitInfo_ptr info) { if (this->intr_ != 0) { diff --git a/TAO/orbsvcs/tests/ImplRepo/ping_interrupt/run_test.pl b/TAO/orbsvcs/tests/ImplRepo/ping_interrupt/run_test.pl index efa412deabc..f22cfa7510d 100755 --- a/TAO/orbsvcs/tests/ImplRepo/ping_interrupt/run_test.pl +++ b/TAO/orbsvcs/tests/ImplRepo/ping_interrupt/run_test.pl @@ -10,17 +10,19 @@ use PerlACE::TestTarget; $status = 0; $imr_debug = ""; +$act_debug = ""; if ($#ARGV >= 0) { for (my $i = 0; $i <= $#ARGV; $i++) { - if ($ARGV[$i] eq '-debug') { - $imr_debug = "-d 5 -ORBDebugLevel 10 -ORBVerboseLogging 1 -ORBLogFile imr_loc.log"; - $i++; - } - else { - usage(); - exit 1; - } + if ($ARGV[$i] eq '-debug') { + $imr_debug = "-d 10 -ORBDebugLevel 10 -ORBVerboseLogging 1 -ORBLogFile imr_loc.log"; + $act_debug = "-d 10 -ORBDebugLevel 10 -ORBVerboseLogging 1 -ORBLogFile imr_act.log"; + $i++; + } + else { + usage(); + exit 1; + } } } @@ -103,7 +105,7 @@ sub server_setup () { print "initializing activator\n"; - $ACT->Arguments ("-d 0 -l -o $act_actiorfile -ORBInitRef ImplRepoService=file://$act_imriorfile"); + $ACT->Arguments ("-l -o $act_actiorfile -ORBInitRef ImplRepoService=file://$act_imriorfile $act_debug"); $ACT_status = $ACT->Spawn (); if ($ACT_status != 0) { @@ -138,7 +140,6 @@ sub server_setup () return 1; } - $TI->Arguments ("-ORBInitRef ImplRepoService=file://$ti_imriorfile ". "start $objprefix"); @@ -152,7 +153,6 @@ sub server_setup () $TI_status = 0; } - sub interrupt_ping_test { print "Running interrupt ping test.\n"; @@ -206,8 +206,8 @@ sub interrupt_ping_test my $IMR_status = $IMR->TerminateWaitKill ($imr->ProcessStopWaitInterval()); if ($IMR_status != 0) { - print STDERR "ERROR: IMR returned $IMR_status\n"; - $status = 1; + print STDERR "ERROR: IMR returned $IMR_status\n"; + $status = 1; } my $test_time = time() - $start_time; @@ -218,8 +218,7 @@ sub interrupt_ping_test } sub usage() { - print "Usage: run_test.pl ". - "[-debug]\n"; + print "Usage: run_test.pl [-debug]\n"; } ############################################################################### diff --git a/TAO/orbsvcs/tests/ImplRepo/ping_interrupt/server_interceptor.cpp b/TAO/orbsvcs/tests/ImplRepo/ping_interrupt/server_interceptor.cpp index d884c5953d2..8c8247294ea 100644 --- a/TAO/orbsvcs/tests/ImplRepo/ping_interrupt/server_interceptor.cpp +++ b/TAO/orbsvcs/tests/ImplRepo/ping_interrupt/server_interceptor.cpp @@ -57,7 +57,7 @@ Ping_Death_Request_Interceptor::receive_request_service_contexts ( } catch (const CORBA::Exception &ex) { - ACE_DEBUG ((LM_DEBUG, "(%P) deactivate raised %s\n", + ACE_DEBUG ((LM_DEBUG, "(%P) deactivate raised %C\n", ex._name())); } throw ::CORBA::TRANSIENT @@ -66,7 +66,6 @@ Ping_Death_Request_Interceptor::receive_request_service_contexts ( } - void Ping_Death_Request_Interceptor::receive_request ( PortableInterceptor::ServerRequestInfo_ptr) diff --git a/TAO/orbsvcs/tests/ImplRepo/ping_interrupt/server_interceptor.h b/TAO/orbsvcs/tests/ImplRepo/ping_interrupt/server_interceptor.h index 8c2a9bdc62a..913e58f89c1 100644 --- a/TAO/orbsvcs/tests/ImplRepo/ping_interrupt/server_interceptor.h +++ b/TAO/orbsvcs/tests/ImplRepo/ping_interrupt/server_interceptor.h @@ -17,28 +17,27 @@ #pragma warning(disable:4250) #endif /* _MSC_VER */ +/// Server-side echo interceptor. For checking interceptor visually only. class Ping_Death_Request_Interceptor : public virtual PortableInterceptor::ServerRequestInterceptor, public virtual ::CORBA::LocalObject { - // = Server-side echo interceptor. For checking interceptor visually only. public: - Ping_Death_Request_Interceptor (int *counter); // cotr. + Ping_Death_Request_Interceptor (int *counter); - ~Ping_Death_Request_Interceptor (); // dotr. + ~Ping_Death_Request_Interceptor (); void set_poa (PortableServer::POA_ptr poa); - virtual char * name (void); // Canonical name of the interceptor. + virtual char * name (void); virtual void destroy (void); virtual void receive_request (PortableInterceptor::ServerRequestInfo_ptr ri); - virtual void receive_request_service_contexts ( - PortableInterceptor::ServerRequestInfo_ptr); + virtual void receive_request_service_contexts (PortableInterceptor::ServerRequestInfo_ptr); virtual void send_reply (PortableInterceptor::ServerRequestInfo_ptr ri); diff --git a/TAO/orbsvcs/tests/ImplRepo/servers_interact_on_startup/README b/TAO/orbsvcs/tests/ImplRepo/servers_interact_on_startup/README index 881b67175d9..20b750148b9 100644 --- a/TAO/orbsvcs/tests/ImplRepo/servers_interact_on_startup/README +++ b/TAO/orbsvcs/tests/ImplRepo/servers_interact_on_startup/README @@ -1,5 +1,3 @@ - - Servers Interacting on Startup Test =================================== @@ -87,4 +85,4 @@ the locator. -restart_loc Use to bounce the locator process by itself mid test. Only used by the list -test for now.
\ No newline at end of file +test for now. diff --git a/TAO/orbsvcs/tests/ImplRepo/servers_interact_on_startup/Test_i.h b/TAO/orbsvcs/tests/ImplRepo/servers_interact_on_startup/Test_i.h index e936e9edc6f..3f91e3f4430 100644 --- a/TAO/orbsvcs/tests/ImplRepo/servers_interact_on_startup/Test_i.h +++ b/TAO/orbsvcs/tests/ImplRepo/servers_interact_on_startup/Test_i.h @@ -9,7 +9,6 @@ #pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ - class Test_i : public virtual POA_Test { public: @@ -24,7 +23,6 @@ public: private: CORBA::Short server_num_; CORBA::Short reply_delay_secs_; - }; #endif /* TEST_I_H_ */ diff --git a/TAO/orbsvcs/tests/Notify/Persistent_Filter/Filter.h b/TAO/orbsvcs/tests/Notify/Persistent_Filter/Filter.h index d683c74edce..da0f8ad67b3 100644 --- a/TAO/orbsvcs/tests/Notify/Persistent_Filter/Filter.h +++ b/TAO/orbsvcs/tests/Notify/Persistent_Filter/Filter.h @@ -201,13 +201,11 @@ protected: // = NotifyPublish method virtual void offer_change ( const CosNotification::EventTypeSeq & added, - const CosNotification::EventTypeSeq & removed - ); + const CosNotification::EventTypeSeq & removed); // = StructuredPushSupplier methods virtual void push_structured_event ( - const CosNotification::StructuredEvent & notification - ); + const CosNotification::StructuredEvent & notification); virtual void disconnect_structured_push_consumer (); }; diff --git a/TAO/orbsvcs/tests/Notify/Reconnecting/Consumer.cpp b/TAO/orbsvcs/tests/Notify/Reconnecting/Consumer.cpp index 7bc87083d6d..4b43325d224 100644 --- a/TAO/orbsvcs/tests/Notify/Reconnecting/Consumer.cpp +++ b/TAO/orbsvcs/tests/Notify/Reconnecting/Consumer.cpp @@ -1138,9 +1138,7 @@ Consumer_Main::find_notify_factory (void) this->naming_context_->resolve (name); this->ecf_ = - CosNotifyChannelAdmin::EventChannelFactory::_narrow ( - obj.in () - ); + CosNotifyChannelAdmin::EventChannelFactory::_narrow (obj.in ()); } return ! CORBA::is_nil (this->ecf_.in ()); } @@ -1399,9 +1397,7 @@ Consumer_Main::init_structured_proxy_supplier (void) { try { - proxy = this->sa_->get_proxy_supplier ( - this->structured_proxy_id_ - ); + proxy = this->sa_->get_proxy_supplier (this->structured_proxy_id_); ok = ! CORBA::is_nil (proxy.in ()); if (this->verbose_) { diff --git a/TAO/orbsvcs/tests/Notify/Reconnecting/Consumer.h b/TAO/orbsvcs/tests/Notify/Reconnecting/Consumer.h index f1980469a0b..26f4b891391 100644 --- a/TAO/orbsvcs/tests/Notify/Reconnecting/Consumer.h +++ b/TAO/orbsvcs/tests/Notify/Reconnecting/Consumer.h @@ -101,15 +101,11 @@ public: virtual void offer_change ( const CosNotification::EventTypeSeq & added, - const CosNotification::EventTypeSeq & removed - ); + const CosNotification::EventTypeSeq & removed); - virtual void push ( - const CORBA::Any & data - ); + virtual void push (const CORBA::Any & data); - virtual void disconnect_push_consumer ( - ); + virtual void disconnect_push_consumer (); size_t received () const; void set_expectations (size_t expecte, size_t fail, size_t serial_number, bool verbose); diff --git a/TAO/orbsvcs/tests/Notify/Reconnecting/Supplier.cpp b/TAO/orbsvcs/tests/Notify/Reconnecting/Supplier.cpp index 7af8337bd6c..c550f4178fe 100644 --- a/TAO/orbsvcs/tests/Notify/Reconnecting/Supplier.cpp +++ b/TAO/orbsvcs/tests/Notify/Reconnecting/Supplier.cpp @@ -534,9 +534,7 @@ Supplier_Main::find_notify_factory (void) this->naming_context_->resolve (name); this->ecf_ = - CosNotifyChannelAdmin::EventChannelFactory::_narrow ( - obj.in () - ); + CosNotifyChannelAdmin::EventChannelFactory::_narrow (obj.in ()); } return ! CORBA::is_nil (this->ecf_.in ()); } diff --git a/TAO/orbsvcs/tests/Notify/lib/Consumer_T.cpp b/TAO/orbsvcs/tests/Notify/lib/Consumer_T.cpp index a7bdfe5d17f..615acf230fe 100644 --- a/TAO/orbsvcs/tests/Notify/lib/Consumer_T.cpp +++ b/TAO/orbsvcs/tests/Notify/lib/Consumer_T.cpp @@ -28,8 +28,7 @@ TAO_Notify_Tests_Consumer_T<Consumer_Traits>::obtain_proxy (typename TAO_Notify_ CosNotifyChannelAdmin::ProxySupplier_var proxy_supplier = admin_ptr->obtain_notification_push_supplier (traits.type_ - , this->proxy_id_ - ); + , this->proxy_id_); ACE_ASSERT (!CORBA::is_nil (proxy_supplier.in ())); diff --git a/TAO/orbsvcs/tests/Notify/lib/Consumer_T.h b/TAO/orbsvcs/tests/Notify/lib/Consumer_T.h index 695d29076db..76a8e27df7f 100644 --- a/TAO/orbsvcs/tests/Notify/lib/Consumer_T.h +++ b/TAO/orbsvcs/tests/Notify/lib/Consumer_T.h @@ -71,8 +71,7 @@ protected: // = NotifyPublish method virtual void offer_change (const CosNotification::EventTypeSeq & added, - const CosNotification::EventTypeSeq & removed - ); + const CosNotification::EventTypeSeq & removed); }; #if defined (ACE_TEMPLATES_REQUIRE_SOURCE) diff --git a/TAO/orbsvcs/tests/Notify/lib/PushConsumer.h b/TAO/orbsvcs/tests/Notify/lib/PushConsumer.h index e9e3406e68e..27f11806aa7 100644 --- a/TAO/orbsvcs/tests/Notify/lib/PushConsumer.h +++ b/TAO/orbsvcs/tests/Notify/lib/PushConsumer.h @@ -77,10 +77,8 @@ protected: // = PushConsumer methods virtual void disconnect_push_consumer (void); - /// Default does nothing. - void push ( - const CORBA::Any & data - ); + /// Default does nothing. + void push (const CORBA::Any & data); }; #if defined (__ACE_INLINE__) diff --git a/TAO/orbsvcs/tests/Notify/lib/SequencePushConsumer.h b/TAO/orbsvcs/tests/Notify/lib/SequencePushConsumer.h index 05dec1bb49d..6bb54ea72d0 100644 --- a/TAO/orbsvcs/tests/Notify/lib/SequencePushConsumer.h +++ b/TAO/orbsvcs/tests/Notify/lib/SequencePushConsumer.h @@ -79,8 +79,7 @@ protected: /// Default does nothing. virtual void push_structured_events ( - const CosNotification::EventBatch & notifications - ); + const CosNotification::EventBatch & notifications); }; #if defined (__ACE_INLINE__) diff --git a/TAO/orbsvcs/tests/Notify/lib/StructuredPushConsumer.h b/TAO/orbsvcs/tests/Notify/lib/StructuredPushConsumer.h index 6c6e71a1749..3701c977647 100644 --- a/TAO/orbsvcs/tests/Notify/lib/StructuredPushConsumer.h +++ b/TAO/orbsvcs/tests/Notify/lib/StructuredPushConsumer.h @@ -79,8 +79,7 @@ protected: /// Default does nothing. virtual void push_structured_event ( - const CosNotification::StructuredEvent & notification - ); + const CosNotification::StructuredEvent & notification); }; #if defined (__ACE_INLINE__) diff --git a/TAO/orbsvcs/tests/Notify/lib/Supplier_T.cpp b/TAO/orbsvcs/tests/Notify/lib/Supplier_T.cpp index 6620ef54e39..33fb119d383 100644 --- a/TAO/orbsvcs/tests/Notify/lib/Supplier_T.cpp +++ b/TAO/orbsvcs/tests/Notify/lib/Supplier_T.cpp @@ -28,8 +28,7 @@ TAO_Notify_Tests_Supplier_T<Supplier_Traits>::obtain_proxy (typename TAO_Notify_ CosNotifyChannelAdmin::ProxyConsumer_var proxy_consumer = admin_ptr->obtain_notification_push_consumer (traits.type_ - , this->proxy_id_ - ); + , this->proxy_id_); ACE_ASSERT (!CORBA::is_nil (proxy_consumer.in ())); diff --git a/TAO/orbsvcs/tests/Notify/lib/Supplier_T.h b/TAO/orbsvcs/tests/Notify/lib/Supplier_T.h index ce16c5c31a4..8b9e22292c8 100644 --- a/TAO/orbsvcs/tests/Notify/lib/Supplier_T.h +++ b/TAO/orbsvcs/tests/Notify/lib/Supplier_T.h @@ -69,11 +69,10 @@ protected: virtual Proxy_Traits_PTR obtain_proxy (Admin_Ext_Traits_PTR admin_ptr , CosNotification::QoSProperties& qos); - // = NotifySubscribe - virtual void subscription_change ( - const CosNotification::EventTypeSeq & added, - const CosNotification::EventTypeSeq & removed - ); + // = NotifySubscribe + virtual void subscription_change ( + const CosNotification::EventTypeSeq & added, + const CosNotification::EventTypeSeq & removed); }; #if defined (ACE_TEMPLATES_REQUIRE_SOURCE) diff --git a/TAO/tao/Messaging/AMH_Response_Handler.cpp b/TAO/tao/Messaging/AMH_Response_Handler.cpp index c251bcf0df5..ed3b08b2b17 100644 --- a/TAO/tao/Messaging/AMH_Response_Handler.cpp +++ b/TAO/tao/Messaging/AMH_Response_Handler.cpp @@ -262,12 +262,10 @@ TAO_AMH_Response_Handler::_tao_rh_send_location_forward (CORBA::Object_ptr fwd, this->rh_reply_status_ = TAO_RS_SENDING; } - TAO_Pluggable_Reply_Params_Base reply_params; reply_params.request_id_ = this->request_id_; reply_params.svc_ctx_.length (0); - reply_params.service_context_notowned - (&this->reply_service_context_.service_info ()); + reply_params.service_context_notowned (&this->reply_service_context_.service_info ()); reply_params.argument_flag_ = true; if (is_perm) { |