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
2085be2a
Commit
2085be2a
authored
May 06, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Config lock is pointless while reading/resetting the configuration
parent
baa37df2
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
16 deletions
+0
-16
src/config/core.c
src/config/core.c
+0
-7
src/config/file.c
src/config/file.c
+0
-9
No files found.
src/config/core.c
View file @
2085be2a
...
...
@@ -26,7 +26,6 @@
#endif
#include <vlc_common.h>
#include "../libvlc.h"
#include "vlc_keys.h"
#include "vlc_charset.h"
#include "vlc_configuration.h"
...
...
@@ -534,14 +533,9 @@ void config_UnsetCallbacks( module_config_t *p_new, size_t n )
*****************************************************************************/
void
__config_ResetAll
(
vlc_object_t
*
p_this
)
{
libvlc_priv_t
*
priv
=
libvlc_priv
(
p_this
->
p_libvlc
);
module_t
*
p_module
;
module_t
**
list
=
module_list_get
(
NULL
);
/* Acquire config file lock */
vlc_mutex_lock
(
&
priv
->
config_lock
);
for
(
size_t
j
=
0
;
(
p_module
=
list
[
j
])
!=
NULL
;
j
++
)
{
if
(
p_module
->
b_submodule
)
continue
;
...
...
@@ -568,5 +562,4 @@ void __config_ResetAll( vlc_object_t *p_this )
}
module_list_free
(
list
);
vlc_mutex_unlock
(
&
priv
->
config_lock
);
}
src/config/file.c
View file @
2085be2a
...
...
@@ -152,16 +152,12 @@ static int strtoi (const char *str)
*****************************************************************************/
int
__config_LoadConfigFile
(
vlc_object_t
*
p_this
,
const
char
*
psz_module_name
)
{
libvlc_priv_t
*
priv
=
libvlc_priv
(
p_this
->
p_libvlc
);
FILE
*
file
;
file
=
config_OpenConfigFile
(
p_this
,
"rt"
);
if
(
file
==
NULL
)
return
VLC_EGENERIC
;
/* Acquire config file lock */
vlc_mutex_lock
(
&
priv
->
config_lock
);
/* Look for the selected module, if NULL then save everything */
module_t
**
list
=
module_list_get
(
NULL
);
...
...
@@ -314,8 +310,6 @@ int __config_LoadConfigFile( vlc_object_t *p_this, const char *psz_module_name )
uselocale
(
baseloc
);
freelocale
(
loc
);
}
vlc_mutex_unlock
(
&
priv
->
config_lock
);
return
0
;
}
...
...
@@ -703,14 +697,12 @@ error:
int
config_AutoSaveConfigFile
(
vlc_object_t
*
p_this
)
{
libvlc_priv_t
*
priv
=
libvlc_priv
(
p_this
->
p_libvlc
);
size_t
i_index
;
bool
save
=
false
;
assert
(
p_this
);
/* Check if there's anything to save */
vlc_mutex_lock
(
&
priv
->
config_lock
);
module_t
**
list
=
module_list_get
(
NULL
);
for
(
i_index
=
0
;
list
[
i_index
]
&&
!
save
;
i_index
++
)
{
...
...
@@ -729,7 +721,6 @@ int config_AutoSaveConfigFile( vlc_object_t *p_this )
}
}
module_list_free
(
list
);
vlc_mutex_unlock
(
&
priv
->
config_lock
);
return
save
?
VLC_SUCCESS
:
SaveConfigFile
(
p_this
,
NULL
,
true
);
}
...
...
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