Removed direct references to the file descriptor, use the new fd

functions instead so that get_fd works properly.
This commit is contained in:
Alexandre Julliard 2003-02-12 21:30:44 +00:00
parent bf8237553c
commit 8b56deb85f
1 changed files with 7 additions and 7 deletions

View File

@ -169,8 +169,8 @@ static void pipe_user_destroy( struct object *obj)
if(user->other)
{
close(user->other->obj.fd);
user->other->obj.fd = -1;
close_fd( user->other->obj.fd_obj );
user->other->obj.fd_obj = NULL;
switch(user->other->state)
{
case ps_connected_server:
@ -330,7 +330,7 @@ DECL_HANDLER(open_named_pipe)
if( (user = create_pipe_user (pipe, fds[1])) )
{
partner->obj.fd = fds[0];
set_unix_fd( &partner->obj, fds[0] );
notify_waiter(partner,STATUS_SUCCESS);
partner->state = ps_connected_server;
partner->other = user;
@ -443,13 +443,13 @@ DECL_HANDLER(disconnect_named_pipe)
if( (user->state == ps_connected_server) &&
(user->other->state == ps_connected_client) )
{
close(user->other->obj.fd);
user->other->obj.fd = -1;
close_fd( user->other->obj.fd_obj );
user->other->obj.fd_obj = NULL;
user->other->state = ps_disconnected;
user->other->other = NULL;
close(user->obj.fd);
user->obj.fd = -1;
close_fd( user->obj.fd_obj );
user->obj.fd_obj = NULL;
user->state = ps_idle_server;
user->other = NULL;
}