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
e2972af4
Commit
e2972af4
authored
Mar 05, 2007
by
Rob Shearman
Committed by
Alexandre Julliard
Mar 05, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Rewrite the second loop in ACTION_FinishCustomActions so that it always terminates.
Create an array of handles to wait on so that we can wait without holding a critical section.
parent
95f38b75
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
15 deletions
+16
-15
custom.c
dlls/msi/custom.c
+16
-15
No files found.
dlls/msi/custom.c
View file @
e2972af4
...
@@ -859,6 +859,9 @@ static UINT HANDLE_CustomType34(MSIPACKAGE *package, LPCWSTR source,
...
@@ -859,6 +859,9 @@ static UINT HANDLE_CustomType34(MSIPACKAGE *package, LPCWSTR source,
void
ACTION_FinishCustomActions
(
MSIPACKAGE
*
package
)
void
ACTION_FinishCustomActions
(
MSIPACKAGE
*
package
)
{
{
struct
list
*
item
;
struct
list
*
item
;
HANDLE
*
wait_handles
;
unsigned
int
handle_count
,
i
;
msi_custom_action_info
*
info
,
*
cursor
;
while
((
item
=
list_head
(
&
package
->
RunningActions
)))
while
((
item
=
list_head
(
&
package
->
RunningActions
)))
{
{
...
@@ -874,27 +877,25 @@ void ACTION_FinishCustomActions(MSIPACKAGE* package)
...
@@ -874,27 +877,25 @@ void ACTION_FinishCustomActions(MSIPACKAGE* package)
msi_free
(
action
);
msi_free
(
action
);
}
}
while
(
1
)
{
HANDLE
handle
;
msi_custom_action_info
*
info
;
EnterCriticalSection
(
&
msi_custom_action_cs
);
EnterCriticalSection
(
&
msi_custom_action_cs
);
item
=
list_head
(
&
msi_pending_custom_actions
);
info
=
LIST_ENTRY
(
item
,
msi_custom_action_info
,
entry
);
if
(
item
&&
info
->
package
==
package
)
handle_count
=
list_count
(
&
msi_pending_custom_actions
);
wait_handles
=
HeapAlloc
(
GetProcessHeap
(),
0
,
handle_count
*
sizeof
(
HANDLE
)
);
handle_count
=
0
;
LIST_FOR_EACH_ENTRY_SAFE
(
info
,
cursor
,
&
msi_pending_custom_actions
,
msi_custom_action_info
,
entry
)
{
if
(
info
->
package
==
package
)
{
{
handle
=
info
->
handle
;
wait_handles
[
handle_count
++
]
=
info
->
handle
;
free_custom_action_data
(
info
);
free_custom_action_data
(
info
);
}
}
else
}
handle
=
NULL
;
LeaveCriticalSection
(
&
msi_custom_action_cs
);
LeaveCriticalSection
(
&
msi_custom_action_cs
);
if
(
!
item
)
for
(
i
=
0
;
i
<
handle_count
;
i
++
)
break
;
msi_dialog_check_messages
(
wait_handles
[
i
]
)
;
msi_dialog_check_messages
(
handle
);
HeapFree
(
GetProcessHeap
(),
0
,
wait_handles
);
}
}
}
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