diff options
Diffstat (limited to 'ACE/tests/Reactor_Performance_Test.cpp')
-rw-r--r-- | ACE/tests/Reactor_Performance_Test.cpp | 42 |
1 files changed, 20 insertions, 22 deletions
diff --git a/ACE/tests/Reactor_Performance_Test.cpp b/ACE/tests/Reactor_Performance_Test.cpp index 215fef181f3..47148b56cf6 100644 --- a/ACE/tests/Reactor_Performance_Test.cpp +++ b/ACE/tests/Reactor_Performance_Test.cpp @@ -1,22 +1,19 @@ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// tests -// -// = FILENAME -// Reactor_Performance_Test.cpp -// -// = DESCRIPTION -// This test is used to time the dispatching mechanisms of the -// <ACE_Reactor>s. Both the <ACE_WFMO_Reactor> and -// <ACE_Select_Reactor> can be tested. -// -// = AUTHOR -// Irfan Pyarali <irfan@cs.wustl.edu> -// -// ============================================================================ + +//============================================================================= +/** + * @file Reactor_Performance_Test.cpp + * + * $Id$ + * + * This test is used to time the dispatching mechanisms of the + * <ACE_Reactor>s. Both the <ACE_WFMO_Reactor> and + * <ACE_Select_Reactor> can be tested. + * + * + * @author Irfan Pyarali <irfan@cs.wustl.edu> + */ +//============================================================================= + #include "test_config.h" #include "Reactor_Performance_Test.h" @@ -31,7 +28,7 @@ #include "ace/Select_Reactor.h" #include "ace/Auto_Ptr.h" -ACE_RCSID(tests, Reactor_Performance_Test, "$Id$") + #if defined (ACE_HAS_THREADS) @@ -108,7 +105,7 @@ Read_Handler::handle_input (ACE_HANDLE handle) else { ACE_ERROR ((LM_ERROR, ACE_TEXT ("handle_input: %p (errno: %d)\n"), - ACE_TEXT ("recv"), errno)); + ACE_TEXT ("recv"), ACE_ERRNO_GET)); // This will cause handle_close to get called. return -1; @@ -360,7 +357,8 @@ run_main (int argc, ACE_TCHAR *argv[]) ACE_INET_Addr server_addr; // Bind acceptor to any port and then find out what the port was. - if (acceptor.open (ACE_sap_any_cast (const ACE_INET_Addr &)) == -1 + ACE_INET_Addr local_addr (ACE_sap_any_cast (const ACE_INET_Addr &)); + if (acceptor.open (local_addr) == -1 || acceptor.acceptor ().get_local_addr (server_addr) == -1) ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("(%t) %p\n"), |