Author: tfaber
Date: Sun May 22 10:53:23 2016
New Revision: 71372
URL:
http://svn.reactos.org/svn/reactos?rev=71372&view=rev
Log:
[SCHANNEL]
- Correctly check for ROS_SCHAN_IS_BLOCKING
CORE-11285
Modified:
trunk/reactos/dll/win32/schannel/schannel_mbedtls.c
Modified: trunk/reactos/dll/win32/schannel/schannel_mbedtls.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/schannel/schanne…
==============================================================================
--- trunk/reactos/dll/win32/schannel/schannel_mbedtls.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/schannel/schannel_mbedtls.c [iso-8859-1] Sun May 22 10:53:23
2016
@@ -46,9 +46,9 @@
#include <mbedtls/md_internal.h>
#include <mbedtls/ssl_internal.h>
-#define ROS_SCHAN_IS_BLOCKING (0xCCCFFFFF & 0xFFF00000)
-#define ROS_SCHAN_IS_BLOCKING_MARSHALL(read_len) (ROS_SCHAN_IS_BLOCKING | (read_len &
0x000FFFFF))
-#define ROS_SCHAN_IS_BLOCKING_RETRIEVE(read_len) (read_len &
0x000FFFFF)
+#define ROS_SCHAN_IS_BLOCKING(read_len) ((read_len & 0xFFF00000) ==
0xCCC00000)
+#define ROS_SCHAN_IS_BLOCKING_MARSHALL(read_len) ((read_len & 0x000FFFFF) |
0xCCC00000)
+#define ROS_SCHAN_IS_BLOCKING_RETRIEVE(read_len) (read_len & 0x000FFFFF)
#ifndef __REACTOS__
/* WINE defines the back-end glue in here */
@@ -281,7 +281,7 @@
TRACE("MBEDTLS schan_imp_handshake: %p err: %#x \n", session, err);
- if ((err & ROS_SCHAN_IS_BLOCKING) == ROS_SCHAN_IS_BLOCKING)
+ if (ROS_SCHAN_IS_BLOCKING(err))
{
TRACE("Received ERR_NET_WANT_READ/WRITE... let's try again!\n");
return SEC_I_CONTINUE_NEEDED;
@@ -623,7 +623,7 @@
*length = ret;
}
- else if ((ret & ROS_SCHAN_IS_BLOCKING) == ROS_SCHAN_IS_BLOCKING)
+ else if (ROS_SCHAN_IS_BLOCKING(ret))
{
*length = ROS_SCHAN_IS_BLOCKING_RETRIEVE(ret);
@@ -665,7 +665,7 @@
*length = ret;
}
- else if ((ret & ROS_SCHAN_IS_BLOCKING) == ROS_SCHAN_IS_BLOCKING)
+ else if (ROS_SCHAN_IS_BLOCKING(ret))
{
*length = ROS_SCHAN_IS_BLOCKING_RETRIEVE(ret);