]> git.sesse.net Git - vlc/commitdiff
Remove redumdant parameter to vlc_global
authorRémi Denis-Courmont <rem@videolan.org>
Thu, 16 Aug 2007 17:42:35 +0000 (17:42 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Thu, 16 Aug 2007 17:42:35 +0000 (17:42 +0000)
20 files changed:
include/vlc_configuration.h
include/vlc_objects.h
modules/control/http/http.c
modules/demux/playlist/luaplaylist.c
modules/gui/skins2/win32/win32_factory.cpp
modules/meta_engine/luameta.c
modules/misc/gnutls.c
src/input/vlm.c
src/libvlc-common.c
src/libvlc.h
src/libvlc.sym
src/misc/beos_specific.cpp
src/misc/darwin_specific.c
src/misc/objects.c
src/misc/stats.c
src/misc/variables.c
src/misc/win32_specific.c
src/modules/configuration.c
src/modules/modules.c
src/network/httpd.c

index 9f0371625d9a38d03a02310142b9ed37751e323b..b4d1c4763370b258d4c44cbfbec7ea82de410f9d 100644 (file)
@@ -210,8 +210,7 @@ VLC_EXPORT( module_t *, config_FindModule,( vlc_object_t *, const char * ) );
 
 VLC_EXPORT( int, config_Duplicate,( module_t *, const module_config_t *, size_t ));
 
-#define config_GetDataDir( a ) __config_GetDataDir( VLC_OBJECT( a ) )
-VLC_EXPORT(const char *, __config_GetDataDir, ( const vlc_object_t * ));
+VLC_EXPORT(const char *, config_GetDataDir, ( void ));
 
 #define config_GetType(a,b) __config_GetType(VLC_OBJECT(a),b)
 #define config_GetInt(a,b) __config_GetInt(VLC_OBJECT(a),b)
index 7e24d4ea673d28d321d95ceae21994c41d8f36b8..a906d517cc9aea7af324bb62369673b711d324af 100644 (file)
@@ -109,7 +109,6 @@ VLC_EXPORT( void, __vlc_object_release, ( vlc_object_t * ) );
 VLC_EXPORT( vlc_list_t *, __vlc_list_find, ( vlc_object_t *, int, int ) );
 VLC_EXPORT( void, vlc_list_release, ( vlc_list_t * ) );
 VLC_EXPORT( libvlc_int_t *, vlc_current_object, ( int ) );
-VLC_EXPORT( vlc_object_t *, vlc_global_object, ( void ) );
 
 /*}@*/
 
index 0c50226b271194d4042608556d0ed1ba7fae8999..c1fe71ec1eaa85d2b73d5f505ab4fbe338e6202c 100644 (file)
@@ -290,7 +290,7 @@ static int Open( vlc_object_t *p_this )
 #if defined(__APPLE__) || defined(SYS_BEOS) || defined(WIN32)
     if ( ( psz_src = config_GetPsz( p_intf, "http-src" )) == NULL )
     {
-        char * psz_vlcpath = config_GetDataDir( p_intf );
+        const char * psz_vlcpath = config_GetDataDir();
         psz_src = malloc( strlen(psz_vlcpath) + strlen("/http" ) + 1 );
         if( !psz_src ) return VLC_ENOMEM;
         sprintf( psz_src, "%s/http", psz_vlcpath );
index 9df8aba620dab77d4af75847a7497efc72aa1af6..d39a3d3c55d784f2a5cb7c72cc91655efc324e7e 100644 (file)
@@ -295,7 +295,7 @@ int E_(Import_LuaPlaylist)( vlc_object_t *p_this )
 
 #   if defined(__APPLE__) || defined(SYS_BEOS) || defined(WIN32)
     {
-        char *psz_vlcpath = config_GetDataDir( p_demux );
+        const char *psz_vlcpath = config_GetDataDir();
         if( asprintf( &ppsz_dir_list[1], "%s" DIR_SEP "luaplaylist", psz_vlcpath ) < 0 )
             return VLC_ENOMEM;
         if( asprintf( &ppsz_dir_list[2], "%s" DIR_SEP "share" DIR_SEP "luaplaylist", psz_vlcpath ) < 0 )
index 6fbe0e87307494ed5e569114faad2916aa0c3b9e..7eb2532da2627417f5b2abbe1e1eef483eddd1dd 100644 (file)
@@ -227,13 +227,13 @@ bool Win32Factory::init()
     // Initialize the resource path
     m_resourcePath.push_back( (string)getIntf()->p_libvlc->psz_homedir +
                                "\\" + CONFIG_DIR + "\\skins" );
-    m_resourcePath.push_back( (string)config_GetDataDir( getIntf() ) +
+    m_resourcePath.push_back( (string)config_GetDataDir() +
                               "\\skins" );
-    m_resourcePath.push_back( (string)config_GetDataDir( getIntf() ) +
+    m_resourcePath.push_back( (string)config_GetDataDir() +
                               "\\skins2" );
-    m_resourcePath.push_back( (string)config_GetDataDir( getIntf() ) +
+    m_resourcePath.push_back( (string)config_GetDataDir() +
                               "\\share\\skins" );
-    m_resourcePath.push_back( (string)config_GetDataDir( getIntf() ) +
+    m_resourcePath.push_back( (string)config_GetDataDir() +
                               "\\share\\skins2" );
 
     // All went well
index 6e642a0db39a50c9fb38b5fe24b06b4ac4a40842..8292912b4e583fe6d3a51279c07b65535b8f8b82 100644 (file)
@@ -301,7 +301,7 @@ static int vlclua_scripts_batch_execute( vlc_object_t *p_this,
 
 #   if defined(__APPLE__) || defined(SYS_BEOS) || defined(WIN32)
     {
-        const char *psz_vlcpath = config_GetDataDir( p_this );
+        const char *psz_vlcpath = config_GetDataDir();
         if( asprintf( &ppsz_dir_list[1], "%s" DIR_SEP "%s", psz_vlcpath, luadirname )  < 0 )
             return VLC_ENOMEM;
 
index 877db6cf97dfe1c310f522a5c0bff504a7f0ffbc..fd368b3acc4587f925b6dee7def4a453b59e8843 100644 (file)
@@ -704,7 +704,7 @@ gnutls_ClientCreate( tls_t *p_tls )
     vlc_object_attach( p_session, p_tls );
 
     const char *homedir = p_tls->p_libvlc->psz_homedir,
-               *datadir = config_GetDataDir ((vlc_object_t *)p_session);
+               *datadir = config_GetDataDir ();
     size_t l1 = strlen (homedir), l2 = strlen (datadir);
     char path[((l1 > l2) ? l1 : l2) + sizeof ("/"CONFIG_DIR"/ssl/private")];
     //                              > sizeof ("/"CONFIG_DIR"/ssl/certs")
index 1004735af64b3a9aad93e46e8f2abe897f27c49f..84457ec947805d940a9da58d8d527aae69a85d34 100644 (file)
@@ -90,8 +90,8 @@ vlm_t *__vlm_New ( vlc_object_t *p_this )
     char *psz_vlmconf;
 
     /* Avoid multiple creation */
-    if( var_Create( p_this->p_libvlc_global, "vlm_mutex", VLC_VAR_MUTEX ) ||
-        var_Get( p_this->p_libvlc_global, "vlm_mutex", &lockval ) )
+    if( var_Create( p_this->p_libvlc, "vlm_mutex", VLC_VAR_MUTEX ) ||
+        var_Get( p_this->p_libvlc, "vlm_mutex", &lockval ) )
         return NULL;
 
     vlc_mutex_lock( lockval.p_address );
@@ -163,7 +163,7 @@ void vlm_Delete( vlm_t *p_vlm )
 {
     vlc_value_t lockval;
 
-    var_Get( p_vlm->p_libvlc_global, "vlm_mutex", &lockval );
+    var_Get( p_vlm->p_libvlc, "vlm_mutex", &lockval );
     vlc_mutex_lock( lockval.p_address );
 
     vlc_object_release( p_vlm );
index b6efb7cc51ead4e046e9eef1e5c67b0852277817..1c70a8f92e387c0f95d591bf4cb5ef152b46bdbb 100644 (file)
@@ -122,9 +122,9 @@ static int  VerboseCallback( vlc_object_t *, char const *,
 
 static void InitDeviceValues( libvlc_int_t * );
 
-vlc_object_t * vlc_global_object( void )
+libvlc_global_data_t *vlc_global( void )
 {
-    return VLC_OBJECT( &libvlc_global );
+    return &libvlc_global;
 }
 
 /*****************************************************************************
index 9aedae50f208455b0036b269118587392f22a3bb..a0ed834067059e7632252bedeb1b55eae715edc5 100644 (file)
@@ -74,11 +74,7 @@ struct libvlc_global_data_t
 #endif
 };
 
-#define vlc_global( a ) __vlc_global( VLC_OBJECT( a ) )
-static inline libvlc_global_data_t *__vlc_global( vlc_object_t *p_this )
-{
-    return (libvlc_global_data_t *)p_this->p_libvlc_global;
-}
+libvlc_global_data_t *vlc_global (void);
 
 extern uint32_t cpu_flags;
 uint32_t CPUCapabilities( void );
index 23610fa1201da713253d77181130891b1083eafc..263b4c5d22facc463fa4705abe27695f49510022 100644 (file)
@@ -4,7 +4,7 @@ sout_SessionSetMedia
 vlc_b64_encode_binary
 vlc_strnlen
 stream_Block
-__config_GetDataDir
+config_GetDataDir
 __vlc_object_find_name
 __var_Command
 net_Listen
index 342a88d4dbaeb21a797a0548f630ddf7c4b547f7..6c621b899520c4380deceb85cd86b1ffe8d97b10 100644 (file)
@@ -80,11 +80,11 @@ static void AppThread( vlc_object_t *p_appthread );
  *****************************************************************************/
 void system_Init( libvlc_int_t *p_this, int *pi_argc, char *ppsz_argv[] )
 {
-    vlc_global( p_this )->p_appthread =
+    vlc_global()->p_appthread =
             (vlc_object_t *)vlc_object_create( p_this, sizeof(vlc_object_t) );
 
     /* Create the BApplication thread and wait for initialization */
-    vlc_thread_create( vlc_global( p_this )->p_appthread, "app thread", AppThread,
+    vlc_thread_create( vlc_global()->p_appthread, "app thread", AppThread,
                        VLC_THREAD_PRIORITY_LOW, VLC_TRUE );
 }
 
@@ -103,10 +103,10 @@ void system_End( libvlc_int_t *p_this )
     /* Tell the BApplication to die */
     be_app->PostMessage( REALLY_QUIT );
 
-    vlc_thread_join( vlc_global( p_this )->p_appthread );
-    vlc_object_destroy( vlc_global( p_this )->p_appthread );
+    vlc_thread_join( vlc_global()->p_appthread );
+    vlc_object_destroy( vlc_global()->p_appthread );
 
-    free( vlc_global( p_this )->psz_vlcpath );
+    free( vlc_global()->psz_vlcpath );
 }
 
 /* following functions are local */
@@ -173,7 +173,7 @@ void VlcApplication::ReadyToRun( )
     BEntry entry( &info.ref );
     entry.GetPath( &path );
     path.GetParent( &path );
-    vlc_global( p_this )->psz_vlcpath = strdup( path.Path() );
+    vlc_global()->psz_vlcpath = strdup( path.Path() );
 
     /* Tell the main thread we are finished initializing the BApplication */
     vlc_thread_ready( p_this );
index 4bc0036b7dac9e19ad38cc14481ae233d6e6b365..18dca1154a28a7cfba787bfe50d410f92548f74e 100644 (file)
@@ -71,7 +71,7 @@ void system_Init( libvlc_int_t *p_this, int *pi_argc, char *ppsz_argv[] )
     char *p_char, *p_oldchar = &i_dummy;
 
     /* Get the full program path and name */
-    p_char = vlc_global( p_this )->psz_vlcpath = strdup( ppsz_argv[ 0 ] );
+    p_char = vlc_global()->psz_vlcpath = strdup( ppsz_argv[ 0 ] );
 
     /* Remove trailing program name */
     for( ; *p_char ; )
@@ -117,8 +117,8 @@ void system_Init( libvlc_int_t *p_this, int *pi_argc, char *ppsz_argv[] )
         CFRelease( all_locales );
     }
 
-    vlc_mutex_init( p_this, &vlc_global( p_this )->iconv_lock );
-    vlc_global( p_this )->iconv_macosx = vlc_iconv_open( "UTF-8", "UTF-8-MAC" );
+    vlc_mutex_init( p_this, &vlc_global()->iconv_lock );
+    vlc_global()->iconv_macosx = vlc_iconv_open( "UTF-8", "UTF-8-MAC" );
 }
 
 /*****************************************************************************
@@ -134,10 +134,10 @@ void system_Configure( libvlc_int_t *p_this, int *pi_argc, char *ppsz_argv[] )
  *****************************************************************************/
 void system_End( libvlc_int_t *p_this )
 {
-    free( vlc_global( p_this )->psz_vlcpath );
+    free( vlc_global()->psz_vlcpath );
 
-    if ( vlc_global( p_this )->iconv_macosx != (vlc_iconv_t)-1 )
-        vlc_iconv_close( vlc_global( p_this )->iconv_macosx );
-    vlc_mutex_destroy( &vlc_global( p_this )->iconv_lock );
+    if ( vlc_global()->iconv_macosx != (vlc_iconv_t)-1 )
+        vlc_iconv_close( vlc_global()->iconv_macosx );
+    vlc_mutex_destroy( &vlc_global()->iconv_lock );
 }
 
index b33447d57a3bd2824da6ae05d5d8c5b75226414e..794898e0b9af0d8b1acffeb9735dad4171b0206e 100644 (file)
@@ -160,7 +160,7 @@ vlc_object_t *vlc_custom_create( vlc_object_t *p_this, size_t i_size,
     }
     else
     {
-        libvlc_global_data_t *p_libvlc_global = vlc_global( p_this );
+        libvlc_global_data_t *p_libvlc_global = vlc_global();
         p_new->p_libvlc_global = VLC_OBJECT (p_libvlc_global);
         p_new->p_libvlc = ( i_type == VLC_OBJECT_LIBVLC ) ? (libvlc_int_t*)p_new
                                                        : p_this->p_libvlc;
@@ -414,7 +414,7 @@ void __vlc_object_destroy( vlc_object_t *p_this )
     }
     else
     {
-        libvlc_global_data_t *p_libvlc_global = vlc_global( p_this );
+        libvlc_global_data_t *p_libvlc_global = vlc_global();
         int i_index;
 
         vlc_mutex_lock( &structure_lock );
@@ -473,7 +473,7 @@ void * __vlc_object_get( vlc_object_t *p_this, int i_id )
 {
     int i_max, i_middle;
     vlc_object_t **pp_objects;
-    libvlc_global_data_t *p_libvlc_global = vlc_global( p_this );
+    libvlc_global_data_t *p_libvlc_global = vlc_global();
 
     vlc_mutex_lock( &structure_lock );
 
@@ -722,7 +722,7 @@ vlc_list_t * __vlc_list_find( vlc_object_t *p_this, int i_type, int i_mode )
     vlc_list_t *p_list;
     vlc_object_t **pp_current, **pp_end;
     int i_count = 0, i_index = 0;
-    libvlc_global_data_t *p_libvlc_global = vlc_global( p_this );
+    libvlc_global_data_t *p_libvlc_global = vlc_global();
 
     vlc_mutex_lock( &structure_lock );
 
@@ -793,7 +793,7 @@ vlc_list_t * __vlc_list_find( vlc_object_t *p_this, int i_type, int i_mode )
 static int DumpCommand( vlc_object_t *p_this, char const *psz_cmd,
                         vlc_value_t oldval, vlc_value_t newval, void *p_data )
 {
-    libvlc_global_data_t *p_libvlc_global = vlc_global( p_this );
+    libvlc_global_data_t *p_libvlc_global = vlc_global();
 
     (void)oldval; (void)p_data;
     if( *psz_cmd == 'l' )
index 3586bb8075a8d59b86c5fe5f05344cb309931710..260da3a5c3594da375cbbabba61a2b738f1528b3 100644 (file)
@@ -290,7 +290,7 @@ void __stats_TimerStart( vlc_object_t *p_obj, const char *psz_name,
     if( !p_counter )
     {
         counter_sample_t *p_sample;
-        p_counter = stats_CounterCreate( p_obj->p_libvlc_global, VLC_VAR_TIME,
+        p_counter = stats_CounterCreate( p_obj->p_libvlc, VLC_VAR_TIME,
                                          STATS_TIMER );
         if( !p_counter )
         {
index 669760a0dacbdc2506b056847aa988c6176b2cf0..5da6f869d12b9befac7da0c477e735f057753ff3 100644 (file)
@@ -30,6 +30,7 @@
 #ifdef HAVE_STDLIB_H
 #   include <stdlib.h>                                          /* realloc() */
 #endif
+#include "libvlc.h"
 
 /*****************************************************************************
  * Private types
@@ -834,7 +835,7 @@ int __var_Get( vlc_object_t *p_this, const char *psz_name, vlc_value_t *p_val )
  */
 vlc_mutex_t *var_GetGlobalMutex( const char *name )
 {
-    vlc_object_t *p_global = vlc_global_object();
+    libvlc_global_data_t *p_global = vlc_global();
     vlc_value_t val;
 
     if( var_Create( p_global, name, VLC_VAR_MUTEX ) )
index 75b5fee4aae1b87cdc058c851b0f5b8ffafe74fd..9a4e868cf75681b6f975717447376763d09f84ba 100644 (file)
@@ -86,7 +86,7 @@ void system_Init( libvlc_int_t *p_this, int *pi_argc, char *ppsz_argv[] )
     }
 #endif
 
-    vlc_global( p_this )->psz_vlcpath = strdup( psz_path );
+    vlc_global()->psz_vlcpath = strdup( psz_path );
 
     /* Set the default file-translation mode */
 #if !defined( UNDER_CE )
@@ -362,10 +362,10 @@ LRESULT CALLBACK WMCOPYWNDPROC( HWND hwnd, UINT uMsg, WPARAM wParam,
  *****************************************************************************/
 void system_End( libvlc_int_t *p_this )
 {
-    if( p_this && p_this->p_libvlc_global && vlc_global( p_this )->psz_vlcpath )
+    if( p_this && vlc_global() )
     {
-        free( vlc_global( p_this )->psz_vlcpath );
-        vlc_global( p_this )->psz_vlcpath = NULL;
+        free( vlc_global()->psz_vlcpath );
+        vlc_global()->psz_vlcpath = NULL;
     }
 
     WSACleanup();
index a9194ec585d4ce7f48a4ad46215fcd1c6c5cc485..57d7a67dc50a649d97cb60700a3ffd82ae628bc0 100644 (file)
@@ -1705,22 +1705,21 @@ int __config_LoadCmdLine( vlc_object_t *p_this, int *pi_argc, char *ppsz_argv[],
  *
  * @return a string (always succeeds).
  */
-const char *__config_GetDataDir( const vlc_object_t *p_this )
+const char *config_GetDataDir( void )
 {
 #if defined (WIN32) || defined (UNDER_CE)
-    return vlc_global( p_this )->psz_vlcpath;
+    return vlc_global()->psz_vlcpath;
 #elif defined(__APPLE__) || defined (SYS_BEOS)
     static char path[PATH_MAX] = "";
 
     if( *path == '\0' )
     {
         snprintf( path, sizeof( path ), "%s/share",
-                  vlc_global( p_this )->psz_vlcpath );
+                  vlc_global()->psz_vlcpath );
         path[sizeof( path ) - 1] = '\0';
     }
     return path;
 #else
-    (void)p_this;
     return DATA_PATH;
 #endif
 }
index 2f3d0d80f02fd96f498aafa3e52676c044afe14e..3d2e10386887c98b44b225b3cac15dc5e4e74cb6 100644 (file)
@@ -171,7 +171,7 @@ void __module_InitBank( vlc_object_t *p_this )
 {
     module_bank_t *p_bank = NULL;
     vlc_value_t  lockval;
-    libvlc_global_data_t *p_libvlc_global = vlc_global( p_this );
+    libvlc_global_data_t *p_libvlc_global = vlc_global();
 
     var_Create( p_libvlc_global, "libvlc", VLC_VAR_MUTEX );
     var_Get( p_libvlc_global, "libvlc", &lockval );
@@ -214,7 +214,7 @@ void __module_EndBank( vlc_object_t *p_this )
 {
     module_t * p_next = NULL;
     vlc_value_t lockval;
-    libvlc_global_data_t *p_libvlc_global = vlc_global( p_this );
+    libvlc_global_data_t *p_libvlc_global = vlc_global();
 
     var_Create( p_libvlc_global, "libvlc", VLC_VAR_MUTEX );
     var_Get( p_libvlc_global, "libvlc", &lockval );
@@ -302,7 +302,7 @@ void __module_EndBank( vlc_object_t *p_this )
 static void module_LoadMain( vlc_object_t *p_this )
 {
     vlc_value_t lockval;
-    libvlc_global_data_t *p_libvlc_global = vlc_global( p_this );
+    libvlc_global_data_t *p_libvlc_global = vlc_global();
 
     var_Create( p_libvlc_global, "libvlc", VLC_VAR_MUTEX );
     var_Get( p_libvlc_global, "libvlc", &lockval );
@@ -328,7 +328,7 @@ static void module_LoadMain( vlc_object_t *p_this )
 void __module_LoadBuiltins( vlc_object_t * p_this )
 {
     vlc_value_t lockval;
-    libvlc_global_data_t *p_libvlc_global = vlc_global( p_this );
+    libvlc_global_data_t *p_libvlc_global = vlc_global();
 
     var_Create( p_libvlc_global, "libvlc", VLC_VAR_MUTEX );
     var_Get( p_libvlc_global, "libvlc", &lockval );
@@ -356,7 +356,7 @@ void __module_LoadPlugins( vlc_object_t * p_this )
 {
 #ifdef HAVE_DYNAMIC_PLUGINS
     vlc_value_t lockval;
-    libvlc_global_data_t *p_libvlc_global = vlc_global( p_this );
+    libvlc_global_data_t *p_libvlc_global = vlc_global();
 
     var_Create( p_libvlc_global, "libvlc", VLC_VAR_MUTEX );
     var_Get( p_libvlc_global, "libvlc", &lockval );
@@ -830,7 +830,7 @@ static void AllocateAllPlugins( vlc_object_t *p_this )
 #endif
         {
             if( 0>= asprintf( &psz_fullpath, "%s"DIR_SEP"%s",
-                              vlc_global( p_this )->psz_vlcpath, *ppsz_path) )
+                              vlc_global()->psz_vlcpath, *ppsz_path) )
                 psz_fullpath = NULL;
         }
         else
@@ -1092,7 +1092,7 @@ static int AllocatePluginFile( vlc_object_t * p_this, char * psz_file,
 
     if( p_module )
     {
-        libvlc_global_data_t *p_libvlc_global = vlc_global( p_this );
+        libvlc_global_data_t *p_libvlc_global = vlc_global();
 
         /* Everything worked fine !
          * The module is ready to be added to the list. */
@@ -1277,7 +1277,7 @@ static int AllocateBuiltinModule( vlc_object_t * p_this,
     /* msg_Dbg( p_this, "builtin \"%s\", %s",
                 p_module->psz_object_name, p_module->psz_longname ); */
 
-    vlc_object_attach( p_module, vlc_global( p_this )->p_module_bank );
+    vlc_object_attach( p_module, vlc_global()->p_module_bank );
 
     return 0;
 }
@@ -1653,7 +1653,7 @@ static void CacheLoad( vlc_object_t *p_this )
     int i_cache;
     module_cache_t **pp_cache = 0;
     int32_t i_file_size, i_marker;
-    libvlc_global_data_t *p_libvlc_global = vlc_global( p_this );
+    libvlc_global_data_t *p_libvlc_global = vlc_global();
 
     psz_homedir = p_this->p_libvlc->psz_homedir;
     if( !psz_homedir )
@@ -2007,7 +2007,7 @@ static void CacheSave( vlc_object_t *p_this )
     int i, j, i_cache;
     module_cache_t **pp_cache;
     int32_t i_file_size = 0;
-    libvlc_global_data_t *p_libvlc_global = vlc_global( p_this );
+    libvlc_global_data_t *p_libvlc_global = vlc_global();
 
     psz_homedir = p_this->p_libvlc->psz_homedir;
     if( !psz_homedir )
@@ -2254,7 +2254,7 @@ static module_cache_t *CacheFind( vlc_object_t *p_this, char *psz_file,
 {
     module_cache_t **pp_cache;
     int i_cache, i;
-    libvlc_global_data_t *p_libvlc_global = vlc_global( p_this );
+    libvlc_global_data_t *p_libvlc_global = vlc_global();
 
     pp_cache = p_libvlc_global->p_module_bank->pp_loaded_cache;
     i_cache = p_libvlc_global->p_module_bank->i_loaded_cache;
index cd384587a50a7ff850ce07856fd7eba38f3f5213..3ff2e3bc021535e740dfa3dcd0f7ec87d8309125 100644 (file)
@@ -996,8 +996,8 @@ httpd_host_t *httpd_TLSHostNew( vlc_object_t *p_this, const char *psz_hostname,
     }
 
     /* to be sure to avoid multiple creation */
-    var_Create( p_this->p_libvlc_global, "httpd_mutex", VLC_VAR_MUTEX );
-    var_Get( p_this->p_libvlc_global, "httpd_mutex", &lockval );
+    var_Create( p_this->p_libvlc, "httpd_mutex", VLC_VAR_MUTEX );
+    var_Get( p_this->p_libvlc, "httpd_mutex", &lockval );
     vlc_mutex_lock( lockval.p_address );
 
     if( !(httpd = vlc_object_find( p_this, VLC_OBJECT_HTTPD, FIND_ANYWHERE )) )
@@ -1138,7 +1138,7 @@ void httpd_HostDelete( httpd_host_t *host )
     vlc_value_t lockval;
     int i;
 
-    var_Get( httpd->p_libvlc_global, "httpd_mutex", &lockval );
+    var_Get( httpd->p_libvlc, "httpd_mutex", &lockval );
     vlc_mutex_lock( lockval.p_address );
 
     host->i_ref--;