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
f3adfbd8
Commit
f3adfbd8
authored
Sep 25, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Save submodules in the same order as we create/load them
Buggy CacheMerge assumes this (among other wrong things)
parent
8f72c1e2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
17 deletions
+28
-17
src/modules/cache.c
src/modules/cache.c
+28
-17
No files found.
src/modules/cache.c
View file @
f3adfbd8
...
@@ -462,6 +462,8 @@ static int CacheLoadConfig( module_t *p_module, FILE *file )
...
@@ -462,6 +462,8 @@ static int CacheLoadConfig( module_t *p_module, FILE *file )
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
}
static
int
CacheSaveSubmodule
(
FILE
*
file
,
module_t
*
p_module
);
/*****************************************************************************
/*****************************************************************************
* SavePluginsCache: saves the plugins cache to a file
* SavePluginsCache: saves the plugins cache to a file
*****************************************************************************/
*****************************************************************************/
...
@@ -588,23 +590,8 @@ void CacheSave( vlc_object_t *p_this )
...
@@ -588,23 +590,8 @@ void CacheSave( vlc_object_t *p_this )
i_submodule
=
pp_cache
[
i
]
->
p_module
->
submodule_count
;
i_submodule
=
pp_cache
[
i
]
->
p_module
->
submodule_count
;
SAVE_IMMEDIATE
(
i_submodule
);
SAVE_IMMEDIATE
(
i_submodule
);
for
(
module_t
*
p_module
=
pp_cache
[
i
]
->
p_module
->
submodule
;
if
(
CacheSaveSubmodule
(
file
,
pp_cache
[
i
]
->
p_module
->
submodule
)
)
p_module
!=
NULL
;
p_module
=
p_module
->
next
)
goto
error
;
{
SAVE_STRING
(
p_module
->
psz_object_name
);
SAVE_STRING
(
p_module
->
psz_shortname
);
SAVE_STRING
(
p_module
->
psz_longname
);
SAVE_STRING
(
p_module
->
psz_help
);
for
(
j
=
0
;
j
<
MODULE_SHORTCUT_MAX
;
j
++
)
{
SAVE_STRING
(
p_module
->
pp_shortcuts
[
j
]
);
// FIX
}
SAVE_STRING
(
p_module
->
psz_capability
);
SAVE_IMMEDIATE
(
p_module
->
i_score
);
SAVE_IMMEDIATE
(
p_module
->
i_cpu
);
SAVE_IMMEDIATE
(
p_module
->
b_unloadable
);
SAVE_IMMEDIATE
(
p_module
->
b_reentrant
);
}
}
}
/* Fill-up file size */
/* Fill-up file size */
...
@@ -627,6 +614,30 @@ error:
...
@@ -627,6 +614,30 @@ error:
}
}
}
}
static
int
CacheSaveSubmodule
(
FILE
*
file
,
module_t
*
p_module
)
{
if
(
p_module
->
next
&&
CacheSaveSubmodule
(
file
,
p_module
->
next
)
)
goto
error
;
SAVE_STRING
(
p_module
->
psz_object_name
);
SAVE_STRING
(
p_module
->
psz_shortname
);
SAVE_STRING
(
p_module
->
psz_longname
);
SAVE_STRING
(
p_module
->
psz_help
);
for
(
unsigned
j
=
0
;
j
<
MODULE_SHORTCUT_MAX
;
j
++
)
SAVE_STRING
(
p_module
->
pp_shortcuts
[
j
]
);
// FIXME
SAVE_STRING
(
p_module
->
psz_capability
);
SAVE_IMMEDIATE
(
p_module
->
i_score
);
SAVE_IMMEDIATE
(
p_module
->
i_cpu
);
SAVE_IMMEDIATE
(
p_module
->
b_unloadable
);
SAVE_IMMEDIATE
(
p_module
->
b_reentrant
);
return
0
;
error:
return
-
1
;
}
static
int
CacheSaveConfig
(
module_t
*
p_module
,
FILE
*
file
)
static
int
CacheSaveConfig
(
module_t
*
p_module
,
FILE
*
file
)
{
{
uint32_t
i_lines
=
p_module
->
confsize
;
uint32_t
i_lines
=
p_module
->
confsize
;
...
...
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