From: RĂ©mi Denis-Courmont Date: Mon, 25 Jan 2010 18:29:56 +0000 (+0200) Subject: Save the plugins cache as early as possible X-Git-Tag: 1.1.0-ff~890 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=b9a0fa9677d7084913a9499fd0050c0c952927b9;p=vlc Save the plugins cache as early as possible This rgeatly reduces the changes that it's generated more than once, if there are multiple concurrent VLC's, or if VLC crashes before exit. --- diff --git a/src/modules/modules.c b/src/modules/modules.c index ebc1d08853..267267c730 100644 --- a/src/modules/modules.c +++ b/src/modules/modules.c @@ -164,8 +164,6 @@ void module_EndBank( vlc_object_t *p_this, bool b_plugins ) vlc_mutex_unlock( &module_lock ); #ifdef HAVE_DYNAMIC_PLUGINS - if( p_bank->b_cache ) - CacheSave( p_this, p_bank ); while( p_bank->i_loaded_cache-- ) { if( p_bank->pp_loaded_cache[p_bank->i_loaded_cache] ) @@ -215,6 +213,8 @@ void module_LoadPlugins( vlc_object_t * p_this, bool b_cache_delete ) if( p_module_bank->b_cache || b_cache_delete ) CacheLoad( p_this, p_module_bank, b_cache_delete ); AllocateAllPlugins( p_this, p_module_bank ); + if( p_module_bank->b_cache ) + CacheSave( p_this, p_bank ); config_UnsortConfig (); config_SortConfig (); }