]> git.saurik.com Git - wxWidgets.git/commitdiff
Continue reading after checking the pushback buffer if more data is requested. Otherw...
authorKevin Hock <hockkn@yahoo.com>
Sun, 14 May 2006 19:49:19 +0000 (19:49 +0000)
committerKevin Hock <hockkn@yahoo.com>
Sun, 14 May 2006 19:49:19 +0000 (19:49 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39150 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/changes.txt
src/common/socket.cpp

index d0ec88bfb5a79cfeeb39a68cae6a87e2dd385342..405a87cb06770048774d5debdd374104f432b134 100644 (file)
@@ -73,7 +73,8 @@ All:
   the first time it was called.
 - Added wxString::rbegin() and rend()
 - Added wxString::EndsWith()
-
+- wxSocket::_Read continues reading from socket after exhausting pushback buffer.
+  Previously, only the buffer would be returned, even if more data was requested.
 
 All (GUI):
 
index 048fe30407062d7cb71e4c528a9b4e5333b39b95..080518cd0ee4d0f5bcbdde05c0b8fa1fe7e1e682 100644 (file)
@@ -330,11 +330,9 @@ wxUint32 wxSocketBase::_Read(void* buffer, wxUint32 nbytes)
 
   // Return now in one of the following cases:
   // - the socket is invalid,
-  // - we got all the data,
-  // - we got *some* data and we are not using wxSOCKET_WAITALL.
+  // - we got all the data
   if ( !m_socket ||
-       !nbytes ||
-       ((total != 0) && !(m_flags & wxSOCKET_WAITALL)) )
+       !nbytes )
     return total;
 
   // Possible combinations (they are checked in this order)