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
3040e09a
Commit
3040e09a
authored
Mar 30, 2007
by
Alessandro Pignotti
Committed by
Alexandre Julliard
Apr 03, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dplayx: Implement proper interface locking for DP_EnumSession.
parent
afdf49f1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
dplay.c
dlls/dplayx/dplay.c
+5
-1
dplay_global.h
dlls/dplayx/dplay_global.h
+1
-0
No files found.
dlls/dplayx/dplay.c
View file @
3040e09a
...
...
@@ -272,6 +272,7 @@ static BOOL DP_CreateDirectPlay2( LPVOID lpDP )
This
->
dp2
->
bConnectionOpen
=
FALSE
;
This
->
dp2
->
hEnumSessionThread
=
INVALID_HANDLE_VALUE
;
This
->
dp2
->
dwEnumSessionLock
=
0
;
This
->
dp2
->
bHostInterface
=
FALSE
;
...
...
@@ -2273,7 +2274,6 @@ static HRESULT WINAPI DP_IF_EnumSessions
return
hr
;
}
/* FIXME: Interface locking sucks in this method */
if
(
(
dwFlags
&
DPENUMSESSIONS_ASYNC
)
)
{
/* Enumerate everything presently in the local session cache */
...
...
@@ -2281,11 +2281,14 @@ static HRESULT WINAPI DP_IF_EnumSessions
This
->
dp2
->
lpNameServerData
,
dwTimeout
,
lpContext
);
if
(
This
->
dp2
->
dwEnumSessionLock
!=
0
)
return
DPERR_CONNECTING
;
/* See if we've already created a thread to service this interface */
if
(
This
->
dp2
->
hEnumSessionThread
==
INVALID_HANDLE_VALUE
)
{
DWORD
dwThreadId
;
This
->
dp2
->
dwEnumSessionLock
++
;
/* Send the first enum request inline since the user may cancel a dialog
* if one is presented. Also, may also have a connecting return code.
...
...
@@ -2326,6 +2329,7 @@ static HRESULT WINAPI DP_IF_EnumSessions
0
,
&
dwThreadId
);
}
This
->
dp2
->
dwEnumSessionLock
--
;
}
}
else
...
...
dlls/dplayx/dplay_global.h
View file @
3040e09a
...
...
@@ -164,6 +164,7 @@ typedef struct tagDirectPlay2Data
/* For async EnumSessions requests */
HANDLE
hEnumSessionThread
;
HANDLE
hKillEnumSessionThreadEvent
;
DWORD
dwEnumSessionLock
;
LPVOID
lpNameServerData
;
/* DPlay interface doesn't know contents */
...
...
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