Paul Chitescu : wininet: MSG_WAITALL support in NETCON_recv with SSL.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Aug 10 04:43:11 CDT 2006
Module: wine
Branch: refs/heads/master
Commit: 8b1b3818726c967b27cf938aa312cd317578f282
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=8b1b3818726c967b27cf938aa312cd317578f282
Author: Paul Chitescu <pchitescu at voip.null.ro>
Date: Tue Aug 8 23:37:41 2006 +0300
wininet: MSG_WAITALL support in NETCON_recv with SSL.
---
dlls/wininet/netconnection.c | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/dlls/wininet/netconnection.c b/dlls/wininet/netconnection.c
index 42fc9fe..d491724 100644
--- a/dlls/wininet/netconnection.c
+++ b/dlls/wininet/netconnection.c
@@ -511,7 +511,7 @@ BOOL NETCON_recv(WININET_NETCONNECTION *
else
{
#if defined HAVE_OPENSSL_SSL_H && defined HAVE_OPENSSL_ERR_H
- if (flags & (~MSG_PEEK))
+ if (flags & ~(MSG_PEEK|MSG_WAITALL))
FIXME("SSL_read does not support the following flag: %08x\n", flags);
/* this ugly hack is all for MSG_PEEK. eww gross */
@@ -538,6 +538,15 @@ #if defined HAVE_OPENSSL_SSL_H && define
HeapFree(GetProcessHeap(), 0, connection->peek_msg_mem);
connection->peek_msg_mem = NULL;
connection->peek_msg = NULL;
+ /* check if the peek buffer held too few data */
+ if ((flags & MSG_WAITALL) && (*recvd < len))
+ {
+ int recv2 = 0;
+ /* recursive call - but now the peek buffer is empty */
+ if (!NETCON_recv(connection, (char*)buf + *recvd, len - *recvd, flags, &recv2))
+ return FALSE;
+ *recvd += recv2;
+ }
}
return TRUE;
}
More information about the wine-cvs
mailing list