mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-06 02:28:19 +00:00
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>
This commit is contained in:
parent
41e39c6a63
commit
584ffc2341
|
@ -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);
|
||||
|
|
|
@ -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 )
|
||||
{
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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 );
|
||||
|
|
Loading…
Reference in a new issue