Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
3375ccba
Commit
3375ccba
authored
Aug 16, 2018
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 16, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Use pipe stored in pipe_end in get_named_pipe_info.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6f6f6e59
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
33 deletions
+18
-33
pipe.c
dlls/ntdll/tests/pipe.c
+0
-11
named_pipe.c
server/named_pipe.c
+18
-22
No files found.
dlls/ntdll/tests/pipe.c
View file @
3375ccba
...
...
@@ -1355,7 +1355,6 @@ static void test_pipe_with_data_state(HANDLE pipe, BOOL is_server, DWORD state)
memset
(
&
io
,
0xcc
,
sizeof
(
io
));
status
=
pNtQueryInformationFile
(
pipe
,
&
io
,
&
local_info
,
sizeof
(
local_info
),
FilePipeLocalInformation
);
if
(
!
is_server
&&
state
==
FILE_PIPE_DISCONNECTED_STATE
)
todo_wine
ok
(
status
==
STATUS_PIPE_DISCONNECTED
,
"NtQueryInformationFile(FilePipeLocalInformation) failed in %s state %u: %x
\n
"
,
is_server
?
"server"
:
"client"
,
state
,
status
);
...
...
@@ -1370,7 +1369,6 @@ static void test_pipe_with_data_state(HANDLE pipe, BOOL is_server, DWORD state)
status
=
pNtQueryInformationFile
(
pipe
,
&
io
,
&
pipe_info
,
sizeof
(
pipe_info
),
FilePipeInformation
);
if
(
!
is_server
&&
state
==
FILE_PIPE_DISCONNECTED_STATE
)
todo_wine
ok
(
status
==
STATUS_PIPE_DISCONNECTED
,
"NtQueryInformationFile(FilePipeInformation) failed in %s state %u: %x
\n
"
,
is_server
?
"server"
:
"client"
,
state
,
status
);
...
...
@@ -1555,7 +1553,6 @@ static void test_pipe_local_info(HANDLE pipe, BOOL is_server, DWORD state)
memset
(
&
local_info
,
0xcc
,
sizeof
(
local_info
));
status
=
pNtQueryInformationFile
(
pipe
,
&
iosb
,
&
local_info
,
sizeof
(
local_info
),
FilePipeLocalInformation
);
if
(
!
is_server
&&
state
==
FILE_PIPE_DISCONNECTED_STATE
)
todo_wine
ok
(
status
==
STATUS_PIPE_DISCONNECTED
,
"NtQueryInformationFile(FilePipeLocalInformation) failed in %s state %u: %x
\n
"
,
is_server
?
"server"
:
"client"
,
state
,
status
);
...
...
@@ -1566,23 +1563,18 @@ static void test_pipe_local_info(HANDLE pipe, BOOL is_server, DWORD state)
if
(
!
status
)
{
ok
(
local_info
.
NamedPipeType
==
1
,
"NamedPipeType = %u
\n
"
,
local_info
.
NamedPipeType
);
todo_wine_if
(
!
is_server
&&
(
state
==
FILE_PIPE_CLOSING_STATE
||
state
==
FILE_PIPE_DISCONNECTED_STATE
))
ok
(
local_info
.
NamedPipeConfiguration
==
1
,
"NamedPipeConfiguration = %u
\n
"
,
local_info
.
NamedPipeConfiguration
);
todo_wine_if
(
!
is_server
&&
(
state
==
FILE_PIPE_CLOSING_STATE
||
state
==
FILE_PIPE_DISCONNECTED_STATE
))
ok
(
local_info
.
MaximumInstances
==
1
,
"MaximumInstances = %u
\n
"
,
local_info
.
MaximumInstances
);
if
(
!
is_server
&&
state
==
FILE_PIPE_CLOSING_STATE
)
ok
(
local_info
.
CurrentInstances
==
0
||
broken
(
local_info
.
CurrentInstances
==
1
/* winxp */
),
"CurrentInstances = %u
\n
"
,
local_info
.
CurrentInstances
);
else
todo_wine_if
(
!
is_server
&&
state
==
FILE_PIPE_DISCONNECTED_STATE
)
ok
(
local_info
.
CurrentInstances
==
1
,
"CurrentInstances = %u
\n
"
,
local_info
.
CurrentInstances
);
todo_wine_if
(
!
is_server
&&
(
state
==
FILE_PIPE_CLOSING_STATE
||
state
==
FILE_PIPE_DISCONNECTED_STATE
))
ok
(
local_info
.
InboundQuota
==
100
,
"InboundQuota = %u
\n
"
,
local_info
.
InboundQuota
);
ok
(
local_info
.
ReadDataAvailable
==
0
,
"ReadDataAvailable = %u
\n
"
,
local_info
.
ReadDataAvailable
);
todo_wine_if
(
!
is_server
&&
(
state
==
FILE_PIPE_CLOSING_STATE
||
state
==
FILE_PIPE_DISCONNECTED_STATE
))
ok
(
local_info
.
OutboundQuota
==
200
,
"OutboundQuota = %u
\n
"
,
local_info
.
OutboundQuota
);
todo_wine
ok
(
local_info
.
WriteQuotaAvailable
==
(
is_server
?
200
:
100
),
"WriteQuotaAvailable = %u
\n
"
,
...
...
@@ -1608,7 +1600,6 @@ static void test_pipe_local_info(HANDLE pipe, BOOL is_server, DWORD state)
&
attr
,
&
iosb
,
FILE_SHARE_WRITE
,
FILE_CREATE
,
0
,
0
,
0
,
0
,
1
,
100
,
200
,
&
timeout
);
if
(
!
local_info
.
CurrentInstances
)
todo_wine_if
(
status
)
/* FIXME */
ok
(
status
==
STATUS_SUCCESS
,
"NtCreateNamedPipeFile failed: %x
\n
"
,
status
);
else
ok
(
status
==
STATUS_INSTANCE_NOT_AVAILABLE
,
"NtCreateNamedPipeFile failed: %x
\n
"
,
status
);
...
...
@@ -1625,7 +1616,6 @@ static void test_pipe_local_info(HANDLE pipe, BOOL is_server, DWORD state)
ok
(
local_info
.
CurrentInstances
==
0
||
broken
(
local_info
.
CurrentInstances
==
1
/* winxp */
),
"CurrentInstances = %u
\n
"
,
local_info
.
CurrentInstances
);
else
todo_wine_if
(
!
is_server
&&
state
==
FILE_PIPE_DISCONNECTED_STATE
)
ok
(
local_info
.
CurrentInstances
==
1
,
"CurrentInstances = %u
\n
"
,
local_info
.
CurrentInstances
);
}
...
...
@@ -1633,7 +1623,6 @@ static void test_pipe_local_info(HANDLE pipe, BOOL is_server, DWORD state)
memset
(
&
iosb
,
0xcc
,
sizeof
(
iosb
));
status
=
pNtQueryInformationFile
(
pipe
,
&
iosb
,
&
pipe_info
,
sizeof
(
pipe_info
),
FilePipeInformation
);
if
(
!
is_server
&&
state
==
FILE_PIPE_DISCONNECTED_STATE
)
todo_wine
ok
(
status
==
STATUS_PIPE_DISCONNECTED
,
"NtQueryInformationFile(FilePipeLocalInformation) failed in %s state %u: %x
\n
"
,
is_server
?
"server"
:
"client"
,
state
,
status
);
...
...
server/named_pipe.c
View file @
3375ccba
...
...
@@ -1354,39 +1354,35 @@ DECL_HANDLER(create_named_pipe)
DECL_HANDLER
(
get_named_pipe_info
)
{
struct
pipe_server
*
server
;
struct
pipe_client
*
client
=
NULL
;
struct
pipe_end
*
pipe_end
;
server
=
get_pipe_server_obj
(
current
->
process
,
req
->
handle
,
FILE_READ_ATTRIBUTES
);
if
(
!
server
)
pipe_end
=
(
struct
pipe_end
*
)
get_handle_obj
(
current
->
process
,
req
->
handle
,
FILE_READ_ATTRIBUTES
,
&
pipe_server_ops
);
if
(
!
pipe_end
)
{
if
(
get_error
()
!=
STATUS_OBJECT_TYPE_MISMATCH
)
return
;
clear_error
();
client
=
(
struct
pipe_client
*
)
get_handle_obj
(
current
->
process
,
req
->
handle
,
0
,
&
pipe_client_ops
);
if
(
!
client
)
return
;
server
=
client
->
server
;
pipe_end
=
(
struct
pipe_end
*
)
get_handle_obj
(
current
->
process
,
req
->
handle
,
0
,
&
pipe_client_ops
);
if
(
!
pipe_end
)
return
;
}
reply
->
flags
=
client
?
client
->
pipe_end
.
flags
:
server
->
pipe_end
.
flags
;
if
(
server
)
if
(
pipe_end
->
pipe
)
{
reply
->
sharing
=
server
->
pipe
->
sharing
;
reply
->
maxinstances
=
server
->
pipe
->
maxinstances
;
reply
->
instances
=
server
->
pipe
->
instances
;
reply
->
insize
=
server
->
pipe
->
insize
;
reply
->
outsize
=
server
->
pipe
->
outsize
;
reply
->
flags
=
pipe_end
->
flags
;
reply
->
sharing
=
pipe_end
->
pipe
->
sharing
;
reply
->
maxinstances
=
pipe_end
->
pipe
->
maxinstances
;
reply
->
instances
=
pipe_end
->
pipe
->
instances
;
reply
->
insize
=
pipe_end
->
pipe
->
insize
;
reply
->
outsize
=
pipe_end
->
pipe
->
outsize
;
if
(
pipe_end
->
obj
.
ops
==
&
pipe_server_ops
)
reply
->
flags
|=
NAMED_PIPE_SERVER_END
;
}
else
set_error
(
STATUS_PIPE_DISCONNECTED
);
if
(
client
)
release_object
(
client
);
else
{
reply
->
flags
|=
NAMED_PIPE_SERVER_END
;
release_object
(
server
);
}
release_object
(
pipe_end
);
}
DECL_HANDLER
(
set_named_pipe_info
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment