diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 2004-08-14 07:10:06 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 2004-08-14 07:10:06 +0000 |
commit | 69d374d5c69b306b1451bd9ae728a7ee3b04b17a (patch) | |
tree | 1e2274c040da23d83cc389a4282dffac5f7a2864 | |
parent | 5d6aed4351ed1a6483ad1893937b564cfdda537a (diff) | |
download | ATCD-69d374d5c69b306b1451bd9ae728a7ee3b04b17a.tar.gz |
ChangeLogTag:Fri Aug 13 23:26:56 2004 Ossama Othman <ossama@dre.vanderbilt.edu>
-rw-r--r-- | ace/ACE.h | 2 | ||||
-rw-r--r-- | ace/Asynch_Acceptor.cpp | 56 | ||||
-rw-r--r-- | ace/DEV_Connector.cpp | 23 | ||||
-rw-r--r-- | ace/FILE_Connector.cpp | 12 | ||||
-rw-r--r-- | ace/Init_ACE.h | 2 | ||||
-rw-r--r-- | ace/Lib_Find.h | 2 | ||||
-rw-r--r-- | ace/POSIX_Asynch_IO.cpp | 42 | ||||
-rw-r--r-- | ace/SOCK_Dgram.cpp | 4 | ||||
-rw-r--r-- | ace/System_Time.cpp | 15 | ||||
-rw-r--r-- | ace/UPIPE_Connector.cpp | 24 | ||||
-rw-r--r-- | tests/Enum_Interfaces_Test.cpp | 10 | ||||
-rw-r--r-- | tests/INET_Addr_Test.cpp | 10 |
12 files changed, 102 insertions, 100 deletions
diff --git a/ace/ACE.h b/ace/ACE.h index c97de84555f..145a69ae9cb 100644 --- a/ace/ACE.h +++ b/ace/ACE.h @@ -472,7 +472,7 @@ namespace ACE * is a user-supplied array of size @a time_len> @c ACE_TCHARs. * Returns 0 if unsuccessful, else returns pointer to beginning of the * "time" portion of @a date_and_time. If @a - * return_pointer_to_first_digit is 0 then return a pointer to the + * return_pointer_to_first_digit is 0 then return a pointer to the * space before the time, else return a pointer to the beginning of * the time portion. */ diff --git a/ace/Asynch_Acceptor.cpp b/ace/Asynch_Acceptor.cpp index 4a310f2a215..6303f00f869 100644 --- a/ace/Asynch_Acceptor.cpp +++ b/ace/Asynch_Acceptor.cpp @@ -78,8 +78,8 @@ ACE_Asynch_Acceptor<HANDLER>::open (const ACE_INET_Addr &address, { ACE_Errno_Guard g (errno); ACE_ERROR ((LM_ERROR, - ACE_LIB_TEXT ("%p\n"), - ACE_LIB_TEXT ("ACE_Asynch_Accept::open"))); + ACE_LIB_TEXT ("%p\n"), + ACE_LIB_TEXT ("ACE_Asynch_Accept::open"))); ACE_OS::closesocket (this->listen_handle_); this->listen_handle_ = ACE_INVALID_HANDLE; return -1; @@ -94,15 +94,15 @@ ACE_Asynch_Acceptor<HANDLER>::open (const ACE_INET_Addr &address, SO_REUSEADDR, (const char*) &one, sizeof one) == -1) - { - ACE_Errno_Guard g (errno); - ACE_ERROR ((LM_ERROR, - ACE_LIB_TEXT ("%p\n"), - ACE_LIB_TEXT ("ACE_OS::setsockopt"))); - ACE_OS::closesocket (this->listen_handle_); - this->listen_handle_ = ACE_INVALID_HANDLE; - return -1; - } + { + ACE_Errno_Guard g (errno); + ACE_ERROR ((LM_ERROR, + ACE_LIB_TEXT ("%p\n"), + ACE_LIB_TEXT ("ACE_OS::setsockopt"))); + ACE_OS::closesocket (this->listen_handle_); + this->listen_handle_ = ACE_INVALID_HANDLE; + return -1; + } } // If port is not specified, bind to any port. @@ -110,13 +110,13 @@ ACE_Asynch_Acceptor<HANDLER>::open (const ACE_INET_Addr &address, if (address == sa && ACE::bind_port (this->listen_handle_, - INADDR_ANY, - address.get_type()) == -1) + INADDR_ANY, + address.get_type()) == -1) { ACE_Errno_Guard g (errno); ACE_ERROR ((LM_ERROR, - ACE_LIB_TEXT ("%p\n"), - ACE_LIB_TEXT ("ACE::bind_port"))); + ACE_LIB_TEXT ("%p\n"), + ACE_LIB_TEXT ("ACE::bind_port"))); ACE_OS::closesocket (this->listen_handle_); this->listen_handle_ = ACE_INVALID_HANDLE; return -1; @@ -129,8 +129,8 @@ ACE_Asynch_Acceptor<HANDLER>::open (const ACE_INET_Addr &address, { ACE_Errno_Guard g (errno); ACE_ERROR ((LM_ERROR, - ACE_LIB_TEXT ("%p\n"), - ACE_LIB_TEXT ("ACE_OS::bind"))); + ACE_LIB_TEXT ("%p\n"), + ACE_LIB_TEXT ("ACE_OS::bind"))); ACE_OS::closesocket (this->listen_handle_); this->listen_handle_ = ACE_INVALID_HANDLE; return -1; @@ -141,8 +141,8 @@ ACE_Asynch_Acceptor<HANDLER>::open (const ACE_INET_Addr &address, { ACE_Errno_Guard g (errno); ACE_ERROR ((LM_ERROR, - ACE_LIB_TEXT ("%p\n"), - ACE_LIB_TEXT ("ACE_OS::listen"))); + ACE_LIB_TEXT ("%p\n"), + ACE_LIB_TEXT ("ACE_OS::listen"))); ACE_OS::closesocket (this->listen_handle_); this->listen_handle_ = ACE_INVALID_HANDLE; return -1; @@ -156,15 +156,15 @@ ACE_Asynch_Acceptor<HANDLER>::open (const ACE_INET_Addr &address, { // Initiate accepts. if (this->accept (bytes_to_read) == -1) - { - ACE_Errno_Guard g (errno); - ACE_ERROR ((LM_ERROR, - ACE_LIB_TEXT ("%p\n"), - ACE_LIB_TEXT ("ACE_Asynch_Acceptor::accept"))); - ACE_OS::closesocket (this->listen_handle_); - this->listen_handle_ = ACE_INVALID_HANDLE; - return -1; - } + { + ACE_Errno_Guard g (errno); + ACE_ERROR ((LM_ERROR, + ACE_LIB_TEXT ("%p\n"), + ACE_LIB_TEXT ("ACE_Asynch_Acceptor::accept"))); + ACE_OS::closesocket (this->listen_handle_); + this->listen_handle_ = ACE_INVALID_HANDLE; + return -1; + } } return 0; diff --git a/ace/DEV_Connector.cpp b/ace/DEV_Connector.cpp index 48ada1e9b8b..5c577754481 100644 --- a/ace/DEV_Connector.cpp +++ b/ace/DEV_Connector.cpp @@ -9,7 +9,11 @@ #include "ace/DEV_Connector.inl" #endif /* __ACE_INLINE__ */ -ACE_RCSID(ace, DEV_Connector, "$Id$") + +ACE_RCSID (ace, + DEV_Connector, + "$Id$") + ACE_ALLOC_HOOK_DEFINE(ACE_DEV_Connector) @@ -28,20 +32,19 @@ ACE_DEV_Connector::ACE_DEV_Connector (void) int ACE_DEV_Connector::connect (ACE_DEV_IO &new_io, - const ACE_DEV_Addr &remote_sap, - ACE_Time_Value *timeout, - const ACE_Addr &, - int, - int flags, - int perms) + const ACE_DEV_Addr &remote_sap, + ACE_Time_Value *timeout, + const ACE_Addr &, + int, + int flags, + int perms) { ACE_TRACE ("ACE_DEV_Connector::connect"); ACE_HANDLE handle = ACE::handle_timed_open (timeout, - remote_sap.get_path_name (), - flags, perms); + remote_sap.get_path_name (), + flags, perms); new_io.set_handle (handle); new_io.addr_ = remote_sap; // class copy. return handle == ACE_INVALID_HANDLE ? -1 : 0; } - diff --git a/ace/FILE_Connector.cpp b/ace/FILE_Connector.cpp index 677f2bc4c2b..6f1240e7178 100644 --- a/ace/FILE_Connector.cpp +++ b/ace/FILE_Connector.cpp @@ -32,12 +32,12 @@ ACE_FILE_Connector::ACE_FILE_Connector (void) int ACE_FILE_Connector::connect (ACE_FILE_IO &new_io, - const ACE_FILE_Addr &remote_sap, - ACE_Time_Value *timeout, - const ACE_Addr &, - int, - int flags, - int perms) + const ACE_FILE_Addr &remote_sap, + ACE_Time_Value *timeout, + const ACE_Addr &, + int, + int flags, + int perms) { ACE_TRACE ("ACE_FILE_Connector::connect"); ACE_ASSERT (new_io.get_handle () == ACE_INVALID_HANDLE); diff --git a/ace/Init_ACE.h b/ace/Init_ACE.h index d653fa67a2e..4d9d14da998 100644 --- a/ace/Init_ACE.h +++ b/ace/Init_ACE.h @@ -28,7 +28,7 @@ /** * @class ACE_Init_ACE * - * @brief + * @brief * */ namespace ACE diff --git a/ace/Lib_Find.h b/ace/Lib_Find.h index 2de7541eb62..bfaf6a98003 100644 --- a/ace/Lib_Find.h +++ b/ace/Lib_Find.h @@ -63,7 +63,7 @@ namespace ACE * long enough. */ extern ACE_Export int get_temp_dir (ACE_TCHAR *buffer, size_t buffer_len); - + /// Opening the temp file. File is automagically unlinked when it is /// closed. This is useful for have temp files. extern ACE_Export ACE_HANDLE open_temp_file (const ACE_TCHAR *name, diff --git a/ace/POSIX_Asynch_IO.cpp b/ace/POSIX_Asynch_IO.cpp index ebe935058b2..10558ce4fa7 100644 --- a/ace/POSIX_Asynch_IO.cpp +++ b/ace/POSIX_Asynch_IO.cpp @@ -421,7 +421,7 @@ ACE_POSIX_Asynch_Write_Stream::write (ACE_Message_Block &message_block, bytes_to_write = len; if (bytes_to_write == 0) - ACE_ERROR_RETURN + ACE_ERROR_RETURN ((LM_ERROR, ACE_LIB_TEXT ("ACE_POSIX_Asynch_Write_Stream::write:") ACE_LIB_TEXT ("Attempt to write 0 bytes\n")), @@ -536,7 +536,7 @@ ACE_POSIX_Asynch_Read_File::read (ACE_Message_Block &message_block, bytes_to_read=space; if ( bytes_to_read == 0 ) - ACE_ERROR_RETURN + ACE_ERROR_RETURN ((LM_ERROR, ACE_LIB_TEXT ("ACE_POSIX_Asynch_Read_File::read:") ACE_LIB_TEXT ("Attempt to read 0 bytes or no space in the message block\n")), @@ -667,7 +667,7 @@ ACE_POSIX_Asynch_Write_File::write (ACE_Message_Block &message_block, bytes_to_write = len; if (bytes_to_write == 0) - ACE_ERROR_RETURN + ACE_ERROR_RETURN ((LM_ERROR, ACE_LIB_TEXT ("ACE_POSIX_Asynch_Write_File::write:") ACE_LIB_TEXT ("Attempt to write 0 bytes\n")), @@ -2512,15 +2512,15 @@ ACE_POSIX_Asynch_Read_Dgram::recv (ACE_Message_Block *message_block, ACE_POSIX_Proactor *proactor = this->posix_proactor (); ACE_NEW_RETURN (result, ACE_POSIX_Asynch_Read_Dgram_Result (*this->handler_, - this->handle_, - message_block, - space, - flags, - protocol_family, - act, - proactor->get_handle (), - priority, - signal_number), + this->handle_, + message_block, + space, + flags, + protocol_family, + act, + proactor->get_handle (), + priority, + signal_number), -1); int return_val = proactor->start_aio (result, ACE_POSIX_Proactor::READ); @@ -2554,7 +2554,7 @@ ACE_POSIX_Asynch_Write_Dgram::send (ACE_Message_Block *message_block, { size_t len = message_block->length (); if (len == 0) - ACE_ERROR_RETURN + ACE_ERROR_RETURN ((LM_ERROR, ACE_LIB_TEXT ("ACE_POSIX_Asynch_Write_Stream::write:") ACE_LIB_TEXT ("Attempt to write 0 bytes\n")), @@ -2564,14 +2564,14 @@ ACE_POSIX_Asynch_Write_Dgram::send (ACE_Message_Block *message_block, ACE_POSIX_Proactor *proactor = this->posix_proactor (); ACE_NEW_RETURN (result, ACE_POSIX_Asynch_Write_Dgram_Result (*this->handler_, - this->handle_, - message_block, - len, - flags, - act, - proactor->get_handle (), - priority, - signal_number), + this->handle_, + message_block, + len, + flags, + act, + proactor->get_handle (), + priority, + signal_number), -1); int return_val = proactor->start_aio (result, ACE_POSIX_Proactor::WRITE); diff --git a/ace/SOCK_Dgram.cpp b/ace/SOCK_Dgram.cpp index f45093faa62..fe4598ea2d3 100644 --- a/ace/SOCK_Dgram.cpp +++ b/ace/SOCK_Dgram.cpp @@ -124,8 +124,8 @@ ACE_SOCK_Dgram::shared_open (const ACE_Addr &local, ) { if (ACE::bind_port (this->get_handle (), - INADDR_ANY, - protocol_family) == -1) + INADDR_ANY, + protocol_family) == -1) error = 1; } } diff --git a/ace/System_Time.cpp b/ace/System_Time.cpp index 6f588822b34..dcb1480aa51 100644 --- a/ace/System_Time.cpp +++ b/ace/System_Time.cpp @@ -82,14 +82,14 @@ ACE_System_Time::get_master_system_time (ACE_UINT32 &time_out) // Try to find it void * temp; if (this->shmem_->find (ACE_DEFAULT_TIME_SERVER_STR, temp) == -1) - { - // No time entry in shared memory (meaning no Clerk exists) - // so return the local time of the host. - return this->get_local_system_time (time_out); - } + { + // No time entry in shared memory (meaning no Clerk exists) + // so return the local time of the host. + return this->get_local_system_time (time_out); + } else - // Extract the delta time. - this->delta_time_ = (long *) temp; + // Extract the delta time. + this->delta_time_ = (long *) temp; } ACE_UINT32 local_time; @@ -141,4 +141,3 @@ template class ACE_Allocator_Adapter<ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_Null_M #pragma instantiate ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_Null_Mutex> #pragma instantiate ACE_Allocator_Adapter<ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_Null_Mutex> > #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ - diff --git a/ace/UPIPE_Connector.cpp b/ace/UPIPE_Connector.cpp index 138aeb3707c..64af6e9a58d 100644 --- a/ace/UPIPE_Connector.cpp +++ b/ace/UPIPE_Connector.cpp @@ -64,12 +64,12 @@ ACE_UPIPE_Connector::connect (ACE_UPIPE_Stream &new_stream, // to our corresponding ACE_UPIPE_Acceptor, so he may link the // two streams. ssize_t result = ACE_OS::write (handle, - (const char *) &ustream, - sizeof ustream); + (const char *) &ustream, + sizeof ustream); if (result == -1) - ACE_ERROR ((LM_ERROR, - ACE_LIB_TEXT ("ACE_UPIPE_Connector %p\n"), - ACE_LIB_TEXT ("write to pipe failed"))); + ACE_ERROR ((LM_ERROR, + ACE_LIB_TEXT ("ACE_UPIPE_Connector %p\n"), + ACE_LIB_TEXT ("write to pipe failed"))); // Wait for confirmation of stream linking. ACE_Message_Block *mb_p = 0; @@ -80,15 +80,15 @@ ACE_UPIPE_Connector::connect (ACE_UPIPE_Stream &new_stream, // Do *not* coalesce the following two checks for result == -1. // They perform different checks and cannot be merged. if (result == -1) - ACE_ERROR ((LM_ERROR, + ACE_ERROR ((LM_ERROR, ACE_LIB_TEXT ("ACE_UPIPE_Connector %p\n"), - ACE_LIB_TEXT ("no confirmation from server"))); + ACE_LIB_TEXT ("no confirmation from server"))); else - // Close down the new_stream at this point in order to - // conserve handles. Note that we don't need the SPIPE - // connection anymore since we're linked via the Message_Queue - // now. - new_stream.ACE_SPIPE::close (); + // Close down the new_stream at this point in order to + // conserve handles. Note that we don't need the SPIPE + // connection anymore since we're linked via the Message_Queue + // now. + new_stream.ACE_SPIPE::close (); return result; } } diff --git a/tests/Enum_Interfaces_Test.cpp b/tests/Enum_Interfaces_Test.cpp index 4afb92de031..b9bd438c6c0 100644 --- a/tests/Enum_Interfaces_Test.cpp +++ b/tests/Enum_Interfaces_Test.cpp @@ -52,22 +52,22 @@ run_main (int, ACE_TCHAR *[]) if (rc != 0) ACE_ERROR ((LM_ERROR, - ACE_TEXT ("%p\n"), - ACE_TEXT ("ACE::get_ip_interfaces failed"))); + ACE_TEXT ("%p\n"), + ACE_TEXT ("ACE::get_ip_interfaces failed"))); else if (how_many == 0) ACE_ERROR ((LM_ERROR, - ACE_TEXT ("No interfaces presently configured in the kernel\n"))); + ACE_TEXT ("No interfaces presently configured in the kernel\n"))); else { ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("there are %d interfaces\n"), how_many)); for (size_t i = 0; i < how_many; i++) - ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\t%s\n"), + ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\t%s\n"), ACE_TEXT_CHAR_TO_TCHAR (the_addr_array[i].get_host_addr ()))); delete [] the_addr_array; } ACE_END_TEST; - return rc != 0; // return 1 if get_ip_interfaces() failed + return rc != 0; // return 1 if get_ip_interfaces() failed } diff --git a/tests/INET_Addr_Test.cpp b/tests/INET_Addr_Test.cpp index 3f5924b74ab..5a25bd54fba 100644 --- a/tests/INET_Addr_Test.cpp +++ b/tests/INET_Addr_Test.cpp @@ -46,10 +46,10 @@ int check_type_consistency (const ACE_INET_Addr &addr) if (addr.get_type () != family) { ACE_ERROR ((LM_ERROR, - ACE_TEXT ("Inconsistency between ACE_SOCK::addr_type_ (%d) ") - ACE_TEXT ("and the sockaddr family (%d)\n"), - addr.get_type (), - family)); + ACE_TEXT ("Inconsistency between ACE_SOCK::addr_type_ (%d) ") + ACE_TEXT ("and the sockaddr family (%d)\n"), + addr.get_type (), + family)); return 1; } return 0; @@ -202,7 +202,7 @@ int run_main (int argc, ACE_TCHAR *argv[]) for (int i=0; ipv6_addresses[i] != 0; i++) { ACE_INET_Addr addr (80, ipv6_addresses[i]); - status |= check_type_consistency (addr); + status |= check_type_consistency (addr); if (0 != ACE_OS::strcmp (addr.get_host_addr (), ipv6_addresses[i])) { |