diff options
author | alex <alex@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-03-01 02:45:03 +0000 |
---|---|---|
committer | alex <alex@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-03-01 02:45:03 +0000 |
commit | 7d718055a16ce5d3d0d8cca7e3b7f871b6b22dab (patch) | |
tree | 0b91a08ac39dd2f8797e8c76bca018a2205614b6 | |
parent | e8b1c617e240d218fca59cf99ba4e95de1f3bafb (diff) | |
download | ATCD-7d718055a16ce5d3d0d8cca7e3b7f871b6b22dab.tar.gz |
Defined the fields <bytes_transferred_> and <error_> in
<ACE_POSIX_Asynch_Result> so that they can be used instead of
<AIO_SYSERROR> and <AIO_SYSRETURN>. Because <aiocb:;aio_return> and
<aiocb::aio_error> fields are not supported on HP yet.
-rw-r--r-- | ace/POSIX_Asynch_IO.cpp | 35 | ||||
-rw-r--r-- | ace/POSIX_Asynch_IO.h | 4 |
2 files changed, 16 insertions, 23 deletions
diff --git a/ace/POSIX_Asynch_IO.cpp b/ace/POSIX_Asynch_IO.cpp index e94e1ddc5dd..50e66ca7c74 100644 --- a/ace/POSIX_Asynch_IO.cpp +++ b/ace/POSIX_Asynch_IO.cpp @@ -19,7 +19,7 @@ u_long ACE_POSIX_Asynch_Result::bytes_transferred (void) const { - return this->AIO_SYSRETURN; + return this->bytes_transferred_; } const void * @@ -43,7 +43,7 @@ ACE_POSIX_Asynch_Result::completion_key (void) const u_long ACE_POSIX_Asynch_Result::error (void) const { - return this->AIO_SYSERRNO; + return this->error_; } ACE_HANDLE @@ -273,11 +273,10 @@ ACE_POSIX_Asynch_Read_Stream_Result::complete (u_long bytes_transferred, const void *completion_key, u_long error) { - // <bytes_transferred> is availble in the aiocb. - ACE_UNUSED_ARG (bytes_transferred); - + this->bytes_transferred_ = bytes_transferred; this->success_ = success; this->completion_key_ = completion_key; + this->error_ = error; // <errno> is available in the aiocb. ACE_UNUSED_ARG (error); @@ -602,12 +601,10 @@ ACE_POSIX_Asynch_Write_Stream_Result::complete (u_long bytes_transferred, u_long error) { // Get all the data copied. - - // <bytes_transferred> is availble in the aiocb. - ACE_UNUSED_ARG (bytes_transferred); - + this->bytes_transferred_ = bytes_transferred; this->success_ = success; this->completion_key_ = completion_key; + this->error_ = error; // <errno> is available in the aiocb. ACE_UNUSED_ARG (error); @@ -912,12 +909,10 @@ ACE_POSIX_Asynch_Read_File_Result::complete (u_long bytes_transferred, u_long error) { // Copy all the data. - - // <bytes_transferred> is availble in the aiocb. - ACE_UNUSED_ARG (bytes_transferred); - + this->bytes_transferred_ = bytes_transferred; this->success_ = success; this->completion_key_ = completion_key; + this->error_ = error; // <errno> is available in the aiocb. ACE_UNUSED_ARG (error); @@ -1214,12 +1209,10 @@ ACE_POSIX_Asynch_Write_File_Result::complete (u_long bytes_transferred, u_long error) { // Copy the data. - - // <bytes_transferred> is available in <AIO_SYSRETURN> - ACE_UNUSED_ARG (bytes_transferred); - + this->bytes_transferred_ = bytes_transferred; this->success_ = success; this->completion_key_ = completion_key; + this->error_ = error; // <error> is available in <aio_resultp.aio_error> ACE_UNUSED_ARG (error); @@ -1532,10 +1525,10 @@ ACE_POSIX_Asynch_Accept_Result::complete (u_long bytes_transferred, u_long error) { // Copy the data. - this->AIO_SYSRETURN = bytes_transferred; + this->bytes_transferred_ = bytes_transferred; this->success_ = success; this->completion_key_ = completion_key; - this->AIO_SYSERRNO = error; + this->error_ = error; // Appropriately move the pointers in the message block. this->message_block_.wr_ptr (bytes_transferred); @@ -2261,10 +2254,10 @@ ACE_POSIX_Asynch_Transmit_File_Result::complete (u_long bytes_transferred, u_long error) { // Copy the data. - this->AIO_SYSRETURN = bytes_transferred; + this->bytes_transferred_ = bytes_transferred; this->success_ = success; this->completion_key_ = completion_key; - this->AIO_SYSERRNO = error; + this->error_ = error; // We will not do this because (a) the header and trailer blocks may // be the same message_blocks and (b) in cases of failures we have diff --git a/ace/POSIX_Asynch_IO.h b/ace/POSIX_Asynch_IO.h index 2bce0c72bf6..d2a931697ed 100644 --- a/ace/POSIX_Asynch_IO.h +++ b/ace/POSIX_Asynch_IO.h @@ -111,7 +111,7 @@ protected: // this. But it doesnot provide the constness, so this may be // better. - // aiocb::aio_resultp.aio_return + u_long bytes_transferred_; // Bytes transferred by this operation. int success_; @@ -120,7 +120,7 @@ protected: const void *completion_key_; // ACT associated with handle. - // aiocb::aio_resultp.aio_errno + u_long error_; // Error if operation failed. }; |