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
3a4a76be
Commit
3a4a76be
authored
Apr 20, 2006
by
Mike McCormack
Committed by
Alexandre Julliard
Apr 20, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Abstract access to the connection's waitable object.
parent
555cf382
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
9 deletions
+16
-9
rpc_server.c
dlls/rpcrt4/rpc_server.c
+16
-9
No files found.
dlls/rpcrt4/rpc_server.c
View file @
3a4a76be
...
...
@@ -455,6 +455,11 @@ static void RPCRT4_new_client(RpcConnection* conn)
CloseHandle
(
thread
);
}
static
HANDLE
rpcrt4_conn_get_wait_object
(
RpcConnection
*
conn
)
{
return
conn
->
ovl
.
hEvent
;
}
static
DWORD
CALLBACK
RPCRT4_server_thread
(
LPVOID
the_arg
)
{
HANDLE
m_event
=
mgr_event
,
b_handle
;
...
...
@@ -476,16 +481,17 @@ static DWORD CALLBACK RPCRT4_server_thread(LPVOID the_arg)
conn
=
cps
->
conn
;
while
(
conn
)
{
RPCRT4_OpenConnection
(
conn
);
if
(
conn
->
ovl
.
hEvent
)
count
++
;
if
(
rpcrt4_conn_get_wait_object
(
conn
))
count
++
;
conn
=
conn
->
Next
;
}
cps
=
cps
->
Next
;
}
/* make array of connections */
if
(
objs
)
objs
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
objs
,
count
*
sizeof
(
HANDLE
));
objs
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
objs
,
count
*
sizeof
(
HANDLE
));
else
objs
=
HeapAlloc
(
GetProcessHeap
(),
0
,
count
*
sizeof
(
HANDLE
));
objs
=
HeapAlloc
(
GetProcessHeap
(),
0
,
count
*
sizeof
(
HANDLE
));
objs
[
0
]
=
m_event
;
count
=
1
;
...
...
@@ -493,7 +499,8 @@ static DWORD CALLBACK RPCRT4_server_thread(LPVOID the_arg)
while
(
cps
)
{
conn
=
cps
->
conn
;
while
(
conn
)
{
if
(
conn
->
ovl
.
hEvent
)
objs
[
count
++
]
=
conn
->
ovl
.
hEvent
;
if
((
objs
[
count
]
=
rpcrt4_conn_get_wait_object
(
conn
)))
count
++
;
conn
=
conn
->
Next
;
}
cps
=
cps
->
Next
;
...
...
@@ -529,18 +536,18 @@ static DWORD CALLBACK RPCRT4_server_thread(LPVOID the_arg)
while
(
cps
)
{
conn
=
cps
->
conn
;
while
(
conn
)
{
if
(
conn
->
ovl
.
hEvent
==
b_handle
)
break
;
if
(
b_handle
==
rpcrt4_conn_get_wait_object
(
conn
)
)
break
;
conn
=
conn
->
Next
;
}
if
(
conn
)
break
;
cps
=
cps
->
Next
;
}
cconn
=
NULL
;
if
(
conn
)
RPCRT4_SpawnConnection
(
&
cconn
,
conn
);
LeaveCriticalSection
(
&
server_cs
);
if
(
!
conn
)
{
if
(
conn
)
RPCRT4_SpawnConnection
(
&
cconn
,
conn
);
else
ERR
(
"failed to locate connection for handle %p
\n
"
,
b_handle
);
}
LeaveCriticalSection
(
&
server_cs
);
if
(
cconn
)
RPCRT4_new_client
(
cconn
);
}
}
...
...
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