server: Don't set the client's server field before the server has
changed into a connected state, otherwise we could assert in pipe_client_destroy.
This commit is contained in:
parent
5558652ea3
commit
43890d88f7
|
@ -637,7 +637,7 @@ static struct pipe_server *create_pipe_server( struct named_pipe *pipe, unsigned
|
||||||
return server;
|
return server;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct pipe_client *create_pipe_client( struct pipe_server *server, unsigned int flags )
|
static struct pipe_client *create_pipe_client( unsigned int flags )
|
||||||
{
|
{
|
||||||
struct pipe_client *client;
|
struct pipe_client *client;
|
||||||
|
|
||||||
|
@ -646,7 +646,7 @@ static struct pipe_client *create_pipe_client( struct pipe_server *server, unsig
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
client->fd = NULL;
|
client->fd = NULL;
|
||||||
client->server = server;
|
client->server = NULL;
|
||||||
client->flags = flags;
|
client->flags = flags;
|
||||||
|
|
||||||
return client;
|
return client;
|
||||||
|
@ -762,7 +762,7 @@ DECL_HANDLER(open_named_pipe)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
client = create_pipe_client( server, req->flags );
|
client = create_pipe_client( req->flags );
|
||||||
if (client)
|
if (client)
|
||||||
{
|
{
|
||||||
if (!socketpair( PF_UNIX, SOCK_STREAM, 0, fds ))
|
if (!socketpair( PF_UNIX, SOCK_STREAM, 0, fds ))
|
||||||
|
|
Loading…
Reference in New Issue