Module: wine Branch: master Commit: 584ffc23418a5611cef1a38c4532001f0e518960 URL: https://source.winehq.org/git/wine.git/?a=commit;h=584ffc23418a5611cef1a38c4...
Author: Jacek Caban jacek@codeweavers.com Date: Wed Aug 8 22:01:11 2018 +0200
server: Don't use set_no_fd_status for error handling in pipe objects.
Signed-off-by: Jacek Caban jacek@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/ntdll/tests/pipe.c | 2 -- server/fd.c | 6 ------ server/file.h | 1 - server/named_pipe.c | 15 --------------- 4 files changed, 24 deletions(-)
diff --git a/dlls/ntdll/tests/pipe.c b/dlls/ntdll/tests/pipe.c index b312831..cb31956 100644 --- a/dlls/ntdll/tests/pipe.c +++ b/dlls/ntdll/tests/pipe.c @@ -1481,14 +1481,12 @@ static void pipe_for_each_state(HANDLE (*create_server)(void), ok(ret, "DisconnectNamedPipe failed: %u\n", GetLastError()); test(server, TRUE, FILE_PIPE_DISCONNECTED_STATE);
- if(broken(1)) { /* FIXME: Remove once Wine can handle this case */ status = listen_pipe(server, event, &iosb, FALSE); ok(status == STATUS_PENDING, "listen_pipe returned %x\n", status); client = connect_client(server); test(server, TRUE, FILE_PIPE_CONNECTED_STATE); test(client, FALSE, FILE_PIPE_CONNECTED_STATE); CloseHandle(client); - } CloseHandle(server);
CloseHandle(event); diff --git a/server/fd.c b/server/fd.c index 4fa5758..6118f52 100644 --- a/server/fd.c +++ b/server/fd.c @@ -1713,12 +1713,6 @@ struct fd *get_fd_object_for_mapping( struct fd *fd, unsigned int access, unsign return NULL; }
-/* set the status to return when the fd has no associated unix fd */ -void set_no_fd_status( struct fd *fd, unsigned int status ) -{ - fd->no_fd_status = status; -} - /* sets the user of an fd that previously had no user */ void set_fd_user( struct fd *fd, const struct fd_ops *user_ops, struct object *user ) { diff --git a/server/file.h b/server/file.h index 1d25961..8609db0 100644 --- a/server/file.h +++ b/server/file.h @@ -78,7 +78,6 @@ struct fd_ops
extern struct fd *alloc_pseudo_fd( const struct fd_ops *fd_user_ops, struct object *user, unsigned int options ); -extern void set_no_fd_status( struct fd *fd, unsigned int status ); extern struct fd *open_fd( struct fd *root, const char *name, int flags, mode_t *mode, unsigned int access, unsigned int sharing, unsigned int options ); extern struct fd *create_anonymous_fd( const struct fd_ops *fd_user_ops, diff --git a/server/named_pipe.c b/server/named_pipe.c index f7b8b54..66e3607 100644 --- a/server/named_pipe.c +++ b/server/named_pipe.c @@ -338,20 +338,6 @@ static struct fd *pipe_end_get_fd( struct object *obj ) static void set_server_state( struct pipe_server *server, enum pipe_state state ) { server->state = state; - - switch(state) - { - case ps_connected_server: - case ps_wait_disconnect: - break; - case ps_wait_open: - case ps_idle_server: - set_no_fd_status( server->pipe_end.fd, STATUS_PIPE_LISTENING ); - break; - case ps_wait_connect: - set_no_fd_status( server->pipe_end.fd, STATUS_PIPE_DISCONNECTED ); - break; - } }
@@ -1232,7 +1218,6 @@ static struct object *named_pipe_open_file( struct object *obj, unsigned int acc
if ((client = create_pipe_client( options, pipe->flags, pipe->outsize, options ))) { - set_no_fd_status( server->pipe_end.fd, STATUS_BAD_DEVICE_TYPE ); allow_fd_caching( server->pipe_end.fd ); if (server->state == ps_wait_open) fd_async_wake_up( server->pipe_end.fd, ASYNC_TYPE_WAIT, STATUS_SUCCESS );