Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sebastian Mayr
wine
Commits
853db9a7
Commit
853db9a7
authored
16 years ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
rpcrt4: Properly handle the case of a client having disconnected in rpcrt4_conn_listen_pipe.
parent
c41a9039
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/rpcrt4/rpc_transport.c
+21
-12
21 additions, 12 deletions
dlls/rpcrt4/rpc_transport.c
with
21 additions
and
12 deletions
dlls/rpcrt4/rpc_transport.c
+
21
−
12
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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment