Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
06fe2cd0
Commit
06fe2cd0
authored
Jul 09, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
addons: simplify cancellation preemption
parent
790f3b33
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
8 deletions
+2
-8
src/misc/addons.c
src/misc/addons.c
+2
-8
No files found.
src/misc/addons.c
View file @
06fe2cd0
...
...
@@ -437,7 +437,7 @@ static int installOrRemoveAddon( addons_manager_t *p_manager, addon_entry_t *p_e
static
void
*
InstallerThread
(
void
*
p_data
)
{
addons_manager_t
*
p_manager
=
p_data
;
int
i_ret
,
i_cancel
;
int
i_ret
;
vlc_event_t
event
;
event
.
type
=
vlc_AddonChanged
;
...
...
@@ -458,6 +458,7 @@ static void *InstallerThread( void *p_data )
addon_entry_Hold
(
p_entry
);
vlc_mutex_unlock
(
&
p_manager
->
p_priv
->
installer
.
lock
);
int
i_cancel
=
vlc_savecancel
();
vlc_mutex_lock
(
&
p_entry
->
lock
);
/* DO WORK */
if
(
p_entry
->
e_state
==
ADDON_INSTALLED
)
...
...
@@ -466,12 +467,10 @@ static void *InstallerThread( void *p_data )
vlc_mutex_unlock
(
&
p_entry
->
lock
);
/* notify */
i_cancel
=
vlc_savecancel
();
event
.
u
.
addon_generic_event
.
p_entry
=
p_entry
;
vlc_event_send
(
p_manager
->
p_event_manager
,
&
event
);
i_ret
=
installOrRemoveAddon
(
p_manager
,
p_entry
,
false
);
vlc_restorecancel
(
i_cancel
);
vlc_mutex_lock
(
&
p_entry
->
lock
);
p_entry
->
e_state
=
(
i_ret
==
VLC_SUCCESS
)
?
ADDON_NOTINSTALLED
...
...
@@ -484,12 +483,10 @@ static void *InstallerThread( void *p_data )
vlc_mutex_unlock
(
&
p_entry
->
lock
);
/* notify */
i_cancel
=
vlc_savecancel
();
event
.
u
.
addon_generic_event
.
p_entry
=
p_entry
;
vlc_event_send
(
p_manager
->
p_event_manager
,
&
event
);
i_ret
=
installOrRemoveAddon
(
p_manager
,
p_entry
,
true
);
vlc_restorecancel
(
i_cancel
);
vlc_mutex_lock
(
&
p_entry
->
lock
);
p_entry
->
e_state
=
(
i_ret
==
VLC_SUCCESS
)
?
ADDON_INSTALLED
...
...
@@ -500,14 +497,11 @@ static void *InstallerThread( void *p_data )
vlc_mutex_unlock
(
&
p_entry
->
lock
);
/* !DO WORK */
i_cancel
=
vlc_savecancel
();
event
.
u
.
addon_generic_event
.
p_entry
=
p_entry
;
vlc_event_send
(
p_manager
->
p_event_manager
,
&
event
);
vlc_restorecancel
(
i_cancel
);
addon_entry_Release
(
p_entry
);
i_cancel
=
vlc_savecancel
();
addons_manager_WriteCatalog
(
p_manager
);
vlc_restorecancel
(
i_cancel
);
}
...
...
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