summaryrefslogtreecommitdiff
path: root/ace/Asynch_IO.cpp
diff options
context:
space:
mode:
authoralex <alex@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-10-06 07:14:52 +0000
committeralex <alex@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-10-06 07:14:52 +0000
commit4a53ac428f1f59e4d31dc656a773a087896cfa0d (patch)
tree4da7b81bb67adb14b01064a54ce1b60ed8d88ecc /ace/Asynch_IO.cpp
parent7c9e853b77dbb5a820149dac5686641d2016ca25 (diff)
downloadATCD-4a53ac428f1f59e4d31dc656a773a087896cfa0d.tar.gz
Changed the behavior of the POSIX implementation of Asynch_Accept
further more to make it behave exactly like the NT implementation. The Message Block now will contain <Local Address, Remote Addess> in that order as it looks in NT. THANKS a lot to Irfan for this change, so things will be robust even if Asynch_Accpet is used directly not through Asynch_Acceptor.
Diffstat (limited to 'ace/Asynch_IO.cpp')
-rw-r--r--ace/Asynch_IO.cpp26
1 files changed, 1 insertions, 25 deletions
diff --git a/ace/Asynch_IO.cpp b/ace/Asynch_IO.cpp
index 3491658089d..ac6ed91aa38 100644
--- a/ace/Asynch_IO.cpp
+++ b/ace/Asynch_IO.cpp
@@ -909,26 +909,10 @@ ACE_Asynch_Accept_Handler::handle_input (ACE_HANDLE fd)
fd,
result->listen_handle ()));
- // There is not going to be any data read. So we can use the
- // <message_block> itself to take the <remote_address> as well as
- // the size of that address.
-
- // We will have atleast 2 * (sizeof (sockaddr_in) + sizeof (sockaddr)).
- size_t buffer_size = sizeof (sockaddr_in) + sizeof (sockaddr);
-
- // Parameters for the <accept> call.
- int *address_size = (int *)result->message_block ().wr_ptr ();
- *address_size = buffer_size;
-
- // Increment the wr_ptr.
- result->message_block ().wr_ptr (sizeof (int));
-
// Issue <accept> now.
// @@ We shouldnt block here since we have already done poll/select
// thru reactor. But are we sure?
- ACE_HANDLE new_handle = ACE_OS::accept (result->listen_handle (),
- (struct sockaddr *) result->message_block ().wr_ptr (),
- address_size);
+ ACE_HANDLE new_handle = ACE_OS::accept (result->listen_handle (), 0, 0);
if (new_handle == ACE_INVALID_HANDLE)
ACE_ERROR_RETURN ((LM_ERROR,
"Error:(%P | %t):%p:\n",
@@ -937,14 +921,6 @@ ACE_Asynch_Accept_Handler::handle_input (ACE_HANDLE fd)
// Accept has completed.
- // Update the <wr_ptr> for the <message block>.
- result->message_block ().wr_ptr (*address_size);
-
- // @@ Just debugging.
- ACE_DEBUG ((LM_DEBUG,
- "%N:%l:Address_size = [%d], New_handle = [%d]\n",
- *address_size, new_handle));
-
// Store the new handle.
result->accept_handle_ = new_handle;