Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
85cc2c13
Commit
85cc2c13
authored
May 22, 2010
by
Andrey Turkin
Committed by
Alexandre Julliard
May 24, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Connect named pipe synchronously when overlapped param is NULL.
parent
c30688c4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
22 deletions
+30
-22
pipe.c
dlls/kernel32/tests/pipe.c
+28
-20
file.c
dlls/ntdll/file.c
+1
-1
named_pipe.c
server/named_pipe.c
+1
-1
No files found.
dlls/kernel32/tests/pipe.c
View file @
85cc2c13
...
...
@@ -547,28 +547,36 @@ static DWORD CALLBACK serverThreadMain3(LPVOID arg)
oOverlap
.
hEvent
=
hEvent
;
/* Wait for client to connect */
trace
(
"Server calling overlapped ConnectNamedPipe...
\n
"
);
success
=
ConnectNamedPipe
(
hnp
,
&
oOverlap
);
err
=
GetLastError
();
ok
(
!
success
&&
(
err
==
ERROR_IO_PENDING
||
err
==
ERROR_PIPE_CONNECTED
),
"overlapped ConnectNamedPipe
\n
"
);
trace
(
"overlapped ConnectNamedPipe returned.
\n
"
);
if
(
!
success
&&
(
err
==
ERROR_IO_PENDING
))
{
if
(
letWFSOEwait
)
{
DWORD
ret
;
do
{
ret
=
WaitForSingleObjectEx
(
hEvent
,
INFINITE
,
TRUE
);
}
while
(
ret
==
WAIT_IO_COMPLETION
);
ok
(
ret
==
0
,
"wait ConnectNamedPipe returned %x
\n
"
,
ret
);
}
success
=
GetOverlappedResult
(
hnp
,
&
oOverlap
,
&
dummy
,
letGORwait
);
if
(
!
letGORwait
&&
!
letWFSOEwait
&&
!
success
)
{
ok
(
GetLastError
()
==
ERROR_IO_INCOMPLETE
,
"GetOverlappedResult
\n
"
);
success
=
GetOverlappedResult
(
hnp
,
&
oOverlap
,
&
dummy
,
TRUE
);
if
(
i
==
0
)
{
trace
(
"Server calling non-overlapped ConnectNamedPipe on overlapped pipe...
\n
"
);
success
=
ConnectNamedPipe
(
hnp
,
NULL
);
err
=
GetLastError
();
ok
(
success
||
(
err
==
ERROR_PIPE_CONNECTED
),
"ConnectNamedPipe failed: %d
\n
"
,
err
);
trace
(
"ConnectNamedPipe operation complete.
\n
"
);
}
else
{
trace
(
"Server calling overlapped ConnectNamedPipe...
\n
"
);
success
=
ConnectNamedPipe
(
hnp
,
&
oOverlap
);
err
=
GetLastError
();
ok
(
!
success
&&
(
err
==
ERROR_IO_PENDING
||
err
==
ERROR_PIPE_CONNECTED
),
"overlapped ConnectNamedPipe
\n
"
);
trace
(
"overlapped ConnectNamedPipe returned.
\n
"
);
if
(
!
success
&&
(
err
==
ERROR_IO_PENDING
))
{
if
(
letWFSOEwait
)
{
DWORD
ret
;
do
{
ret
=
WaitForSingleObjectEx
(
hEvent
,
INFINITE
,
TRUE
);
}
while
(
ret
==
WAIT_IO_COMPLETION
);
ok
(
ret
==
0
,
"wait ConnectNamedPipe returned %x
\n
"
,
ret
);
}
success
=
GetOverlappedResult
(
hnp
,
&
oOverlap
,
&
dummy
,
letGORwait
);
if
(
!
letGORwait
&&
!
letWFSOEwait
&&
!
success
)
{
ok
(
GetLastError
()
==
ERROR_IO_INCOMPLETE
,
"GetOverlappedResult
\n
"
);
success
=
GetOverlappedResult
(
hnp
,
&
oOverlap
,
&
dummy
,
TRUE
);
}
}
ok
(
success
||
(
err
==
ERROR_PIPE_CONNECTED
),
"GetOverlappedResult ConnectNamedPipe
\n
"
);
trace
(
"overlapped ConnectNamedPipe operation complete.
\n
"
);
}
ok
(
success
||
(
err
==
ERROR_PIPE_CONNECTED
),
"GetOverlappedResult ConnectNamedPipe
\n
"
);
trace
(
"overlapped ConnectNamedPipe operation complete.
\n
"
);
/* Echo bytes once */
memset
(
buf
,
0
,
sizeof
(
buf
));
...
...
dlls/ntdll/file.c
View file @
85cc2c13
...
...
@@ -1227,7 +1227,7 @@ static NTSTATUS server_ioctl_file( HANDLE handle, HANDLE event,
SERVER_START_REQ
(
ioctl
)
{
req
->
code
=
code
;
req
->
blocking
=
!
apc
&&
!
event
;
req
->
blocking
=
!
apc
&&
!
event
&&
!
cvalue
;
req
->
async
.
handle
=
wine_server_obj_handle
(
handle
);
req
->
async
.
callback
=
wine_server_client_ptr
(
ioctl_completion
);
req
->
async
.
iosb
=
wine_server_client_ptr
(
io
);
...
...
server/named_pipe.c
View file @
85cc2c13
...
...
@@ -613,7 +613,7 @@ static obj_handle_t pipe_server_ioctl( struct fd *fd, ioctl_code_t code, const a
{
case
ps_idle_server
:
case
ps_wait_connect
:
if
(
blocking
&&
!
is_overlapped
(
get_fd_options
(
fd
)
)
)
if
(
blocking
)
{
async_data_t
new_data
=
*
async_data
;
if
(
!
(
wait_handle
=
alloc_wait_event
(
current
->
process
)))
break
;
...
...
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