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
73e0e8bf
Commit
73e0e8bf
authored
Mar 23, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: A named pipe wait can be satisfied by an idle pipe server too.
parent
c0fca0a1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
16 deletions
+4
-16
named_pipe.c
server/named_pipe.c
+4
-16
No files found.
server/named_pipe.c
View file @
73e0e8bf
...
...
@@ -666,25 +666,13 @@ static struct pipe_client *create_pipe_client( unsigned int flags )
return
client
;
}
static
inline
struct
pipe_server
*
find_server
(
struct
named_pipe
*
pipe
,
enum
pipe_state
stat
e
)
static
struct
pipe_server
*
find_available_server
(
struct
named_pipe
*
pip
e
)
{
struct
pipe_server
*
server
;
LIST_FOR_EACH_ENTRY
(
server
,
&
pipe
->
servers
,
struct
pipe_server
,
entry
)
{
if
(
server
->
state
==
state
)
return
(
struct
pipe_server
*
)
grab_object
(
server
);
}
return
NULL
;
}
static
inline
struct
pipe_server
*
find_server2
(
struct
named_pipe
*
pipe
,
enum
pipe_state
state1
,
enum
pipe_state
state2
)
{
struct
pipe_server
*
server
;
LIST_FOR_EACH_ENTRY
(
server
,
&
pipe
->
servers
,
struct
pipe_server
,
entry
)
{
if
(
server
->
state
==
state1
||
server
->
state
==
state2
)
if
(
server
->
state
==
ps_idle_server
||
server
->
state
==
ps_wait_open
)
return
(
struct
pipe_server
*
)
grab_object
(
server
);
}
return
NULL
;
...
...
@@ -698,7 +686,7 @@ static struct object *named_pipe_open_file( struct object *obj, unsigned int acc
struct
pipe_client
*
client
;
int
fds
[
2
];
if
(
!
(
server
=
find_
server2
(
pipe
,
ps_idle_server
,
ps_wait_open
)))
if
(
!
(
server
=
find_
available_server
(
pipe
)))
{
set_error
(
STATUS_PIPE_NOT_AVAILABLE
);
return
NULL
;
...
...
@@ -867,7 +855,7 @@ DECL_HANDLER(wait_named_pipe)
set_error
(
STATUS_PIPE_NOT_AVAILABLE
);
return
;
}
server
=
find_
server
(
pipe
,
ps_wait_open
);
server
=
find_
available_server
(
pipe
);
if
(
!
server
)
{
if
(
req
->
timeout
==
NMPWAIT_WAIT_FOREVER
)
...
...
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