MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:msvensson Date:June 14 2006 7:30pm
Subject:bk commit into 5.0 tree (msvensson:1.2177) BUG#19191
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of msvensson. When msvensson does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.2177 06/06/14 21:30:49 msvensson@neptunus.(none) +2 -0
  Bug#19191 Repeated crashes on OpenBSD for ssl test cases
   - Import patch from yaSSL

  extra/yassl/src/socket_wrapper.cpp
    1.11 06/06/14 19:19:37 msvensson@neptunus.(none)[msvensson] +11 -2
    Import patch yassl.diff

  extra/yassl/src/handshake.cpp
    1.11 06/06/14 19:19:37 msvensson@neptunus.(none)[msvensson] +4 -4
    Import patch yassl.diff

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	msvensson
# Host:	neptunus.(none)
# Root:	/home/msvensson/mysql/mysql-5.0

--- 1.10/extra/yassl/src/handshake.cpp	2006-06-01 22:57:37 +02:00
+++ 1.11/extra/yassl/src/handshake.cpp	2006-06-14 19:19:37 +02:00
@@ -880,7 +880,7 @@ int sendData(SSL& ssl, const void* buffe
         ssl.SetError(no_error);
 
     ssl.verfiyHandShakeComplete();
-    if (ssl.GetError()) return 0;
+    if (ssl.GetError()) return -1;
     int sent = 0;
 
     for (;;) {
@@ -891,7 +891,7 @@ int sendData(SSL& ssl, const void* buffe
         buildMessage(ssl, out, data);
         ssl.Send(out.get_buffer(), out.get_size());
 
-        if (ssl.GetError()) return 0;
+        if (ssl.GetError()) return -1;
         sent += len;
         if (sent == sz) break;
     }
@@ -918,14 +918,14 @@ int receiveData(SSL& ssl, Data& data)
         ssl.SetError(no_error);
 
     ssl.verfiyHandShakeComplete();
-    if (ssl.GetError()) return 0;
+    if (ssl.GetError()) return -1;
 
     if (!ssl.bufferedData())
         processReply(ssl);
     ssl.fillData(data);
     ssl.useLog().ShowData(data.get_length());
 
-    if (ssl.GetError()) return 0;
+    if (ssl.GetError()) return -1;
 
     if (data.get_length() == 0 && ssl.getSocket().WouldBlock()) {
         ssl.SetError(YasslError(SSL_ERROR_WANT_READ));

--- 1.10/extra/yassl/src/socket_wrapper.cpp	2006-05-15 01:40:59 +02:00
+++ 1.11/extra/yassl/src/socket_wrapper.cpp	2006-06-14 19:19:37 +02:00
@@ -113,13 +113,22 @@ uint Socket::get_ready() const
 
 uint Socket::send(const byte* buf, unsigned int sz, int flags) const
 {
+    const byte* pos = buf;
+    const byte* end = pos + sz;
+
     assert(socket_ != INVALID_SOCKET);
-    int sent = ::send(socket_, reinterpret_cast<const char *>(buf), sz, flags);
+
+    while (pos != end) {
+        int sent = ::send(socket_, reinterpret_cast<const char *>(pos),
+                          static_cast<int>(end - pos), flags);
 
     if (sent == -1)
         return 0;
 
-    return sent;
+        pos += sent;
+    }
+
+    return sz;
 }
 
 
Thread
bk commit into 5.0 tree (msvensson:1.2177) BUG#19191msvensson14 Jun