Rebase against 37503be65497b97fe5197c2c5c28486e3ff73e59.

This commit is contained in:
Sebastian Lackner 2016-02-03 14:13:14 +01:00
parent ad65139e3d
commit d55612ab9c
3 changed files with 31 additions and 31 deletions

View File

@ -1,4 +1,4 @@
From 47754a35cfc710d9900a1f25cde3c6d0a62f1a38 Mon Sep 17 00:00:00 2001
From 630edc66479db789c7541e2c356a41090524d838 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,10 +13,10 @@ missing message mode support.
3 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index 4cac2ca..d585d6c 100644
index 3883e5a..9e98f36 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -3506,6 +3506,7 @@ NTSTATUS WINAPI NtCreateNamedPipeFile( PHANDLE handle, ULONG access,
@@ -3507,6 +3507,7 @@ NTSTATUS WINAPI NtCreateNamedPipeFile( PHANDLE handle, ULONG access,
NTSTATUS status;
data_size_t len;
struct object_attributes *objattr;
@ -24,7 +24,7 @@ index 4cac2ca..d585d6c 100644
TRACE("(%p %x %s %p %x %d %x %d %d %d %d %d %d %p)\n",
handle, access, debugstr_w(attr->ObjectName->Buffer), iosb, sharing, dispo,
@@ -3518,15 +3519,16 @@ NTSTATUS WINAPI NtCreateNamedPipeFile( PHANDLE handle, ULONG access,
@@ -3521,15 +3522,16 @@ NTSTATUS WINAPI NtCreateNamedPipeFile( PHANDLE handle, ULONG access,
if ((status = alloc_object_attributes( attr, &objattr, &len ))) return status;
@ -45,7 +45,7 @@ index 4cac2ca..d585d6c 100644
req->maxinstances = max_inst;
req->outsize = outbound_quota;
req->insize = inbound_quota;
@@ -3534,9 +3536,13 @@ NTSTATUS WINAPI NtCreateNamedPipeFile( PHANDLE handle, ULONG access,
@@ -3537,9 +3539,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 );
@ -60,23 +60,23 @@ index 4cac2ca..d585d6c 100644
return status;
}
diff --git a/server/named_pipe.c b/server/named_pipe.c
index 2621642..51650cd 100644
index 7a97e35..ee6008c 100644
--- a/server/named_pipe.c
+++ b/server/named_pipe.c
@@ -939,6 +939,8 @@ DECL_HANDLER(create_named_pipe)
@@ -934,6 +934,8 @@ DECL_HANDLER(create_named_pipe)
return;
}
+ reply->flags = req->flags & ~(NAMED_PIPE_MESSAGE_STREAM_WRITE | NAMED_PIPE_MESSAGE_STREAM_READ);
+
if (objattr->rootdir && !(root = get_directory_obj( current->process, objattr->rootdir, 0 )))
return;
if (!name.len) /* pipes need a root directory even without a name */
{
if (!objattr->rootdir)
diff --git a/server/protocol.def b/server/protocol.def
index 4becb8f..9facc59 100644
index a5a45eb..2d87f03 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -2376,6 +2376,7 @@ enum message_type
@@ -2370,6 +2370,7 @@ enum message_type
unsigned int flags;
VARARG(objattr,object_attributes); /* object attributes */
@REPLY
@ -85,5 +85,5 @@ index 4becb8f..9facc59 100644
@END
--
2.6.4
2.7.0

View File

@ -1,4 +1,4 @@
From 504a202bba0312a71c4e5ea662e4a498c46be82a Mon Sep 17 00:00:00 2001
From 4ae4e05064134eb80698a6cb3c2bfe77a50997c1 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Mon, 4 Aug 2014 05:01:11 +0200
Subject: server: Use SOCK_SEQPACKET socket in combination with SO_PEEK_OFF to
@ -149,7 +149,7 @@ index 544b7fa..5f5553b 100644
ret = RpcReadFile(hnp, ibuf + 8, sizeof(ibuf), &readden, NULL);
ok(ret, "RpcReadFile 10\n");
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index 5e3a9e1..dfb7812 100644
index eef36ad..420984c 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -91,6 +91,10 @@
@ -163,7 +163,7 @@ index 5e3a9e1..dfb7812 100644
#include "ntstatus.h"
#define WIN32_NO_STATUS
#define NONAMELESSUNION
@@ -508,18 +512,57 @@ static NTSTATUS unix_fd_avail(int fd, int *avail)
@@ -509,18 +513,57 @@ static NTSTATUS unix_fd_avail(int fd, int *avail)
STATUS_PIPE_BROKEN : STATUS_SUCCESS;
}
@ -224,7 +224,7 @@ index 5e3a9e1..dfb7812 100644
{
if (*total)
return STATUS_SUCCESS;
@@ -535,16 +578,17 @@ static NTSTATUS read_unix_fd(int fd, char *buf, ULONG *total, ULONG length,
@@ -536,16 +579,17 @@ static NTSTATUS read_unix_fd(int fd, char *buf, ULONG *total, ULONG length,
return STATUS_PIPE_BROKEN;
}
}
@ -246,7 +246,7 @@ index 5e3a9e1..dfb7812 100644
}
/***********************************************************************
@@ -1102,13 +1146,14 @@ NTSTATUS WINAPI NtReadFileScatter( HANDLE file, HANDLE event, PIO_APC_ROUTINE ap
@@ -1103,13 +1147,14 @@ NTSTATUS WINAPI NtReadFileScatter( HANDLE file, HANDLE event, PIO_APC_ROUTINE ap
/* helper function for NtWriteFile and FILE_AsyncWriteService */
static NTSTATUS write_unix_fd(int fd, const char *buf, ULONG *total, ULONG length, enum server_fd_type type)
{
@ -262,7 +262,7 @@ index 5e3a9e1..dfb7812 100644
if (result >= 0)
{
*total += result;
@@ -1117,6 +1162,17 @@ static NTSTATUS write_unix_fd(int fd, const char *buf, ULONG *total, ULONG lengt
@@ -1118,6 +1163,17 @@ static NTSTATUS write_unix_fd(int fd, const char *buf, ULONG *total, ULONG lengt
else if (type != FD_TYPE_FILE) /* no async I/O on regular files */
return STATUS_PENDING;
}
@ -280,7 +280,7 @@ index 5e3a9e1..dfb7812 100644
else if (errno != EINTR)
{
if (errno == EAGAIN)
@@ -1707,20 +1763,40 @@ NTSTATUS WINAPI NtFsControlFile(HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc
@@ -1708,20 +1764,40 @@ NTSTATUS WINAPI NtFsControlFile(HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc
status = unix_fd_avail( fd, &avail );
if (!status)
{
@ -329,7 +329,7 @@ index 5e3a9e1..dfb7812 100644
if (needs_close) close( fd );
}
diff --git a/server/named_pipe.c b/server/named_pipe.c
index 51650cd..670eafe 100644
index ee6008c..9cc3939 100644
--- a/server/named_pipe.c
+++ b/server/named_pipe.c
@@ -42,6 +42,10 @@
@ -351,7 +351,7 @@ index 51650cd..670eafe 100644
#include "handle.h"
#include "thread.h"
#include "request.h"
@@ -787,14 +792,43 @@ static struct pipe_server *find_available_server( struct named_pipe *pipe )
@@ -782,14 +787,43 @@ static struct pipe_server *find_available_server( struct named_pipe *pipe )
return NULL;
}
@ -396,7 +396,7 @@ index 51650cd..670eafe 100644
if (!(server = find_available_server( pipe )))
{
@@ -813,7 +847,10 @@ static struct object *named_pipe_open_file( struct object *obj, unsigned int acc
@@ -808,7 +842,10 @@ static struct object *named_pipe_open_file( struct object *obj, unsigned int acc
if ((client = create_pipe_client( options, pipe->flags )))
{
@ -408,7 +408,7 @@ index 51650cd..670eafe 100644
{
assert( !server->fd );
@@ -823,32 +860,55 @@ static struct object *named_pipe_open_file( struct object *obj, unsigned int acc
@@ -818,32 +855,55 @@ static struct object *named_pipe_open_file( struct object *obj, unsigned int acc
if (is_overlapped( options )) fcntl( fds[1], F_SETFL, O_NONBLOCK );
if (is_overlapped( server->options )) fcntl( fds[0], F_SETFL, O_NONBLOCK );
@ -483,16 +483,16 @@ index 51650cd..670eafe 100644
release_object( client );
client = NULL;
}
@@ -939,7 +999,7 @@ DECL_HANDLER(create_named_pipe)
@@ -934,7 +994,7 @@ DECL_HANDLER(create_named_pipe)
return;
}
- reply->flags = req->flags & ~(NAMED_PIPE_MESSAGE_STREAM_WRITE | NAMED_PIPE_MESSAGE_STREAM_READ);
+ reply->flags = messagemode_flags(req->flags);
if (objattr->rootdir && !(root = get_directory_obj( current->process, objattr->rootdir, 0 )))
return;
@@ -1035,6 +1095,9 @@ DECL_HANDLER(set_named_pipe_info)
if (!name.len) /* pipes need a root directory even without a name */
{
@@ -1037,6 +1097,9 @@ DECL_HANDLER(set_named_pipe_info)
{
struct pipe_server *server;
struct pipe_client *client = NULL;
@ -502,7 +502,7 @@ index 51650cd..670eafe 100644
server = get_pipe_server_obj( current->process, req->handle, FILE_WRITE_ATTRIBUTES );
if (!server)
@@ -1061,10 +1124,20 @@ DECL_HANDLER(set_named_pipe_info)
@@ -1063,10 +1126,20 @@ DECL_HANDLER(set_named_pipe_info)
else if (client)
{
client->pipe_flags = server->pipe->flags | req->flags;
@ -585,5 +585,5 @@ index 0000000..21551b4
+
+#endif /* __WINE_SERVER_SOCK_H */
--
2.6.4
2.7.0

View File

@ -51,7 +51,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "80ea5a01ef42b0e9e0b6c872f8f5bbbf393c0ae7"
echo "37503be65497b97fe5197c2c5c28486e3ff73e59"
}
# Show version information