Rebase against 3198fb0c1c3779882944659d52a676319ffcc68d.

This commit is contained in:
Sebastian Lackner
2016-01-15 21:13:24 +01:00
parent a7583fd387
commit 6e91988232
5 changed files with 186 additions and 189 deletions

View File

@@ -1,4 +1,4 @@
From db0a81d0a3513d169335286471969b1fb9c38be1 Mon Sep 17 00:00:00 2001
From f86aa112cd8f4f4372ea065866f2a98afa5d9d3b Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Mon, 4 Aug 2014 00:29:26 +0200
Subject: server: Show warning if message mode is not supported.
@@ -13,20 +13,20 @@ missing message mode support.
3 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index 5232027..01cef2c 100644
index cd34194..45ff692 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -3091,6 +3091,7 @@ NTSTATUS WINAPI NtCreateNamedPipeFile( PHANDLE handle, ULONG access,
{
struct security_descriptor *sd = NULL;
struct object_attributes objattr;
+ unsigned int flags;
@@ -3507,6 +3507,7 @@ NTSTATUS WINAPI NtCreateNamedPipeFile( PHANDLE handle, ULONG access,
NTSTATUS status;
data_size_t len;
struct object_attributes *objattr;
+ unsigned int flags;
TRACE("(%p %x %s %p %x %d %x %d %d %d %d %d %d %p)\n",
@@ -3109,16 +3110,17 @@ NTSTATUS WINAPI NtCreateNamedPipeFile( PHANDLE handle, ULONG access,
status = NTDLL_create_struct_sd( attr->SecurityDescriptor, &sd, &objattr.sd_len );
if (status != STATUS_SUCCESS) return status;
handle, access, debugstr_w(attr->ObjectName->Buffer), iosb, sharing, dispo,
@@ -3519,16 +3520,17 @@ NTSTATUS WINAPI NtCreateNamedPipeFile( PHANDLE handle, ULONG access,
if ((status = alloc_object_attributes( attr, &objattr, &len ))) return status;
+ flags = (pipe_type ? NAMED_PIPE_MESSAGE_STREAM_WRITE : 0) |
+ (read_mode ? NAMED_PIPE_MESSAGE_STREAM_READ : 0) |
@@ -46,8 +46,8 @@ index 5232027..01cef2c 100644
req->maxinstances = max_inst;
req->outsize = outbound_quota;
req->insize = inbound_quota;
@@ -3128,9 +3130,13 @@ NTSTATUS WINAPI NtCreateNamedPipeFile( PHANDLE handle, ULONG access,
wine_server_add_data( req, attr->ObjectName->Buffer, attr->ObjectName->Length );
@@ -3536,9 +3538,13 @@ NTSTATUS WINAPI NtCreateNamedPipeFile( PHANDLE handle, ULONG access,
wine_server_add_data( req, objattr, len );
status = wine_server_call( req );
if (!status) *handle = wine_server_ptr_handle( reply->handle );
+ flags &= ~reply->flags; /* contains now all unsupported flags */
@@ -57,14 +57,14 @@ index 5232027..01cef2c 100644
+ if (!status && (flags & (NAMED_PIPE_MESSAGE_STREAM_WRITE | NAMED_PIPE_MESSAGE_STREAM_READ)))
+ FIXME("Message mode not supported, falling back to byte mode.\n");
+
NTDLL_free_struct_sd( sd );
RtlFreeHeap( GetProcessHeap(), 0, objattr );
return status;
}
diff --git a/server/named_pipe.c b/server/named_pipe.c
index 047b62c..81741de 100644
index 8d5753a..79ca3a1 100644
--- a/server/named_pipe.c
+++ b/server/named_pipe.c
@@ -965,6 +965,7 @@ DECL_HANDLER(create_named_pipe)
@@ -933,6 +933,7 @@ DECL_HANDLER(create_named_pipe)
return;
}
@@ -73,10 +73,10 @@ index 047b62c..81741de 100644
if (!objattr_is_valid( objattr, get_req_data_size() ))
diff --git a/server/protocol.def b/server/protocol.def
index fc6bec5..503b02f 100644
index ea5bd61..e83e65e 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -2283,6 +2283,7 @@ enum message_type
@@ -2382,6 +2382,7 @@ enum message_type
unsigned int flags;
VARARG(objattr,object_attributes); /* object attributes */
@REPLY
@@ -85,5 +85,5 @@ index fc6bec5..503b02f 100644
@END
--
2.1.3
2.6.4