Commit 1b9db994 authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Return the correct IOSB information when creating a named pipe.

parent d74b084e
......@@ -379,7 +379,6 @@ static void test_name_collisions(void)
FILE_OPEN_IF, FILE_PIPE_FULL_DUPLEX,
FALSE, FALSE, FALSE, 10, 256, 256, &timeout );
ok(status == STATUS_SUCCESS, "failed to create pipe %08lx\n", status);
todo_wine
ok( iosb.Information == FILE_CREATED, "wrong info %Ix\n", iosb.Information );
pNtClose( h );
......@@ -389,7 +388,6 @@ static void test_name_collisions(void)
FILE_CREATE, FILE_PIPE_FULL_DUPLEX,
FALSE, FALSE, FALSE, 10, 256, 256, &timeout );
ok(status == STATUS_SUCCESS, "failed to create pipe %08lx\n", status);
todo_wine
ok( iosb.Information == FILE_CREATED, "wrong info %Ix\n", iosb.Information );
memset( &iosb, 0xcc, sizeof(iosb) );
......@@ -398,7 +396,6 @@ static void test_name_collisions(void)
FILE_OPEN, FILE_PIPE_FULL_DUPLEX,
FALSE, FALSE, FALSE, 10, 256, 256, &timeout );
ok(status == STATUS_SUCCESS, "failed to create pipe %08lx\n", status);
todo_wine
ok( iosb.Information == FILE_OPENED, "wrong info %Ix\n", iosb.Information );
pNtClose(h1);
......@@ -408,7 +405,6 @@ static void test_name_collisions(void)
FILE_OPEN_IF, FILE_PIPE_FULL_DUPLEX,
FALSE, FALSE, FALSE, 10, 256, 256, &timeout );
ok(status == STATUS_SUCCESS, "failed to create pipe %08lx\n", status);
todo_wine
ok( iosb.Information == FILE_OPENED, "wrong info %Ix\n", iosb.Information );
pNtClose(h1);
......
......@@ -4144,7 +4144,11 @@ NTSTATUS WINAPI NtCreateNamedPipeFile( HANDLE *handle, ULONG access, OBJECT_ATTR
req->insize = inbound_quota;
req->timeout = timeout->QuadPart;
wine_server_add_data( req, objattr, len );
if (!(status = wine_server_call( req ))) *handle = wine_server_ptr_handle( reply->handle );
if (!(status = wine_server_call( req )))
{
*handle = wine_server_ptr_handle( reply->handle );
io->Information = reply->created ? FILE_CREATED : FILE_OPENED;
}
}
SERVER_END_REQ;
......
......@@ -3086,7 +3086,7 @@ struct create_named_pipe_reply
{
struct reply_header __header;
obj_handle_t handle;
char __pad_12[4];
int created;
};
......@@ -6356,7 +6356,7 @@ union generic_reply
/* ### protocol_version begin ### */
#define SERVER_PROTOCOL_VERSION 759
#define SERVER_PROTOCOL_VERSION 760
/* ### protocol_version end ### */
......
......@@ -1437,6 +1437,7 @@ DECL_HANDLER(create_named_pipe)
GROUP_SECURITY_INFORMATION |
DACL_SECURITY_INFORMATION |
SACL_SECURITY_INFORMATION );
reply->created = 1;
}
else
{
......
......@@ -2279,6 +2279,7 @@ enum message_type
VARARG(objattr,object_attributes); /* object attributes */
@REPLY
obj_handle_t handle; /* handle to the pipe */
int created;
@END
/* flags in create_named_pipe and get_named_pipe_info */
......
......@@ -1459,6 +1459,7 @@ C_ASSERT( FIELD_OFFSET(struct create_named_pipe_request, timeout) == 40 );
C_ASSERT( FIELD_OFFSET(struct create_named_pipe_request, flags) == 48 );
C_ASSERT( sizeof(struct create_named_pipe_request) == 56 );
C_ASSERT( FIELD_OFFSET(struct create_named_pipe_reply, handle) == 8 );
C_ASSERT( FIELD_OFFSET(struct create_named_pipe_reply, created) == 12 );
C_ASSERT( sizeof(struct create_named_pipe_reply) == 16 );
C_ASSERT( FIELD_OFFSET(struct set_named_pipe_info_request, handle) == 12 );
C_ASSERT( FIELD_OFFSET(struct set_named_pipe_info_request, flags) == 16 );
......
......@@ -2873,6 +2873,7 @@ static void dump_create_named_pipe_request( const struct create_named_pipe_reque
static void dump_create_named_pipe_reply( const struct create_named_pipe_reply *req )
{
fprintf( stderr, " handle=%04x", req->handle );
fprintf( stderr, ", created=%d", req->created );
}
static void dump_set_named_pipe_info_request( const struct set_named_pipe_info_request *req )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment