diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 2001-11-11 18:23:53 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 2001-11-11 18:23:53 +0000 |
commit | 17ef444a342c10e1b4a0507aab15680955e11321 (patch) | |
tree | 3c4cfa0ec38d3d7faf3bd80c48e8fb8e5bcc4d02 /ace/SSL | |
parent | ebeefd7f313e699ad8854fcf8191736a44d1f2eb (diff) | |
download | ATCD-17ef444a342c10e1b4a0507aab15680955e11321.tar.gz |
ChangeLogTag:Sun Nov 11 10:00:56 2001 Ossama Othman <ossama@uci.edu>
Diffstat (limited to 'ace/SSL')
-rw-r--r-- | ace/SSL/SSL_SOCK_Stream.cpp | 27 | ||||
-rw-r--r-- | ace/SSL/SSL_SOCK_Stream.h | 14 |
2 files changed, 16 insertions, 25 deletions
diff --git a/ace/SSL/SSL_SOCK_Stream.cpp b/ace/SSL/SSL_SOCK_Stream.cpp index 6a7700a27a4..79ca5bc3a0a 100644 --- a/ace/SSL/SSL_SOCK_Stream.cpp +++ b/ace/SSL/SSL_SOCK_Stream.cpp @@ -21,11 +21,7 @@ ACE_ALLOC_HOOK_DEFINE(ACE_SSL_SOCK_Stream) ACE_SSL_SOCK_Stream::ACE_SSL_SOCK_Stream (ACE_SSL_Context *context) : ssl_ (0), - stream_ (), - reactor_ (0), - handler_ (0), - read_notification_pending_ (0), - write_notification_pending_ (0) + stream_ () { ACE_TRACE ("ACE_SSL_SOCK_Stream::ACE_SSL_SOCK_Stream"); @@ -101,17 +97,26 @@ ACE_SSL_SOCK_Stream::sendv (const iovec iov[], { // There is a subtle difference in behaviour depending on // whether or not any data was sent. If no data was sent, - // then always return -1. Otherwise only return bytes_sent - // if errno == EWOULDBLOCK or the send timed out. This - // gives the caller an opportunity to keep track of which - // data was actually sent. - if (bytes_sent > 0 && (errno == EWOULDBLOCK || errno == ETIME)) + // then always return -1. Otherwise return bytes_sent. + // This gives the caller an opportunity to keep track of + // which data was actually sent. + if (bytes_sent > 0) break; else return -1; } else - bytes_sent += result; + { + bytes_sent += result; + + // Do not continue on to the next loop iteration if the + // amount of data sent was less than the amount data given. + // This avoids a subtle problem where "holes" in the data + // stream would occur if partial sends of a given buffer in + // the iovec array occured. + if (ACE_static_cast (size_t, result) < iov[i].iov_len) + break; + } (void) countdown.update (); } diff --git a/ace/SSL/SSL_SOCK_Stream.h b/ace/SSL/SSL_SOCK_Stream.h index cdad4ace191..d899e629152 100644 --- a/ace/SSL/SSL_SOCK_Stream.h +++ b/ace/SSL/SSL_SOCK_Stream.h @@ -293,20 +293,6 @@ protected: /// The stream which works under the ssl connection. ACE_SOCK_Stream stream_; - /// Pointer to the Reactor being used to dispatch events coming in - /// on this stream's handle. - ACE_Reactor *reactor_; - - /// Event handler that handles events coming in this - /// ACE_SSL_SOCK_Stream's handle. - ACE_Event_Handler *handler_; - - /// If true, a read notification is pending in the Reactor. - int read_notification_pending_; - - /// If true, a read notification is pending in the Reactor. - int write_notification_pending_; - }; #if !defined (ACE_LACKS_INLINE_FUNCTIONS) |