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
853db9a7
Commit
853db9a7
authored
Jun 09, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Properly handle the case of a client having disconnected in rpcrt4_conn_listen_pipe.
parent
c41a9039
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
12 deletions
+21
-12
rpc_transport.c
dlls/rpcrt4/rpc_transport.c
+21
-12
No files found.
dlls/rpcrt4/rpc_transport.c
View file @
853db9a7
...
...
@@ -118,20 +118,29 @@ static RPC_STATUS rpcrt4_conn_listen_pipe(RpcConnection_np *npc)
return
RPC_S_OK
;
npc
->
listening
=
TRUE
;
if
(
ConnectNamedPipe
(
npc
->
pipe
,
&
npc
->
ovl
))
return
RPC_S_OK
;
for
(;;)
{
if
(
ConnectNamedPipe
(
npc
->
pipe
,
&
npc
->
ovl
))
return
RPC_S_OK
;
if
(
GetLastError
()
==
ERROR_PIPE_CONNECTED
)
{
SetEvent
(
npc
->
ovl
.
hEvent
);
return
RPC_S_OK
;
}
if
(
GetLastError
()
==
ERROR_IO_PENDING
)
{
/* will be completed in rpcrt4_protseq_np_wait_for_new_connection */
return
RPC_S_OK
;
switch
(
GetLastError
())
{
case
ERROR_PIPE_CONNECTED
:
SetEvent
(
npc
->
ovl
.
hEvent
);
return
RPC_S_OK
;
case
ERROR_IO_PENDING
:
/* will be completed in rpcrt4_protseq_np_wait_for_new_connection */
return
RPC_S_OK
;
case
ERROR_NO_DATA_DETECTED
:
/* client has disconnected, retry */
DisconnectNamedPipe
(
npc
->
pipe
);
break
;
default:
npc
->
listening
=
FALSE
;
WARN
(
"Couldn't ConnectNamedPipe (error was %d)
\n
"
,
GetLastError
());
return
RPC_S_OUT_OF_RESOURCES
;
}
}
npc
->
listening
=
FALSE
;
WARN
(
"Couldn't ConnectNamedPipe (error was %d)
\n
"
,
GetLastError
());
return
RPC_S_OUT_OF_RESOURCES
;
}
static
RPC_STATUS
rpcrt4_conn_create_pipe
(
RpcConnection
*
Connection
,
LPCSTR
pname
)
...
...
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