From 3ea2708daa0caa8419e9a3d1bcd967d09f445ab8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= Date: Thu, 16 Aug 2007 17:42:35 +0000 Subject: [PATCH] Remove redumdant parameter to vlc_global --- include/vlc_configuration.h | 3 +-- include/vlc_objects.h | 1 - modules/control/http/http.c | 2 +- modules/demux/playlist/luaplaylist.c | 2 +- modules/gui/skins2/win32/win32_factory.cpp | 8 ++++---- modules/meta_engine/luameta.c | 2 +- modules/misc/gnutls.c | 2 +- src/input/vlm.c | 6 +++--- src/libvlc-common.c | 4 ++-- src/libvlc.h | 6 +----- src/libvlc.sym | 2 +- src/misc/beos_specific.cpp | 12 ++++++------ src/misc/darwin_specific.c | 14 +++++++------- src/misc/objects.c | 10 +++++----- src/misc/stats.c | 2 +- src/misc/variables.c | 3 ++- src/misc/win32_specific.c | 8 ++++---- src/modules/configuration.c | 7 +++---- src/modules/modules.c | 22 +++++++++++----------- src/network/httpd.c | 6 +++--- 20 files changed, 58 insertions(+), 64 deletions(-) diff --git a/include/vlc_configuration.h b/include/vlc_configuration.h index 9f0371625d..b4d1c47633 100644 --- a/include/vlc_configuration.h +++ b/include/vlc_configuration.h @@ -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) diff --git a/include/vlc_objects.h b/include/vlc_objects.h index 7e24d4ea67..a906d517cc 100644 --- a/include/vlc_objects.h +++ b/include/vlc_objects.h @@ -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 ) ); /*}@*/ diff --git a/modules/control/http/http.c b/modules/control/http/http.c index 0c50226b27..c1fe71ec1e 100644 --- a/modules/control/http/http.c +++ b/modules/control/http/http.c @@ -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 ); diff --git a/modules/demux/playlist/luaplaylist.c b/modules/demux/playlist/luaplaylist.c index 9df8aba620..d39a3d3c55 100644 --- a/modules/demux/playlist/luaplaylist.c +++ b/modules/demux/playlist/luaplaylist.c @@ -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 ) diff --git a/modules/gui/skins2/win32/win32_factory.cpp b/modules/gui/skins2/win32/win32_factory.cpp index 6fbe0e8730..7eb2532da2 100644 --- a/modules/gui/skins2/win32/win32_factory.cpp +++ b/modules/gui/skins2/win32/win32_factory.cpp @@ -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 diff --git a/modules/meta_engine/luameta.c b/modules/meta_engine/luameta.c index 6e642a0db3..8292912b4e 100644 --- a/modules/meta_engine/luameta.c +++ b/modules/meta_engine/luameta.c @@ -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; diff --git a/modules/misc/gnutls.c b/modules/misc/gnutls.c index 877db6cf97..fd368b3acc 100644 --- a/modules/misc/gnutls.c +++ b/modules/misc/gnutls.c @@ -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") diff --git a/src/input/vlm.c b/src/input/vlm.c index 1004735af6..84457ec947 100644 --- a/src/input/vlm.c +++ b/src/input/vlm.c @@ -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 ); diff --git a/src/libvlc-common.c b/src/libvlc-common.c index b6efb7cc51..1c70a8f92e 100644 --- a/src/libvlc-common.c +++ b/src/libvlc-common.c @@ -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; } /***************************************************************************** diff --git a/src/libvlc.h b/src/libvlc.h index 9aedae50f2..a0ed834067 100644 --- a/src/libvlc.h +++ b/src/libvlc.h @@ -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 ); diff --git a/src/libvlc.sym b/src/libvlc.sym index 23610fa120..263b4c5d22 100644 --- a/src/libvlc.sym +++ b/src/libvlc.sym @@ -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 diff --git a/src/misc/beos_specific.cpp b/src/misc/beos_specific.cpp index 342a88d4db..6c621b8995 100644 --- a/src/misc/beos_specific.cpp +++ b/src/misc/beos_specific.cpp @@ -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 ); diff --git a/src/misc/darwin_specific.c b/src/misc/darwin_specific.c index 4bc0036b7d..18dca1154a 100644 --- a/src/misc/darwin_specific.c +++ b/src/misc/darwin_specific.c @@ -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 ); } diff --git a/src/misc/objects.c b/src/misc/objects.c index b33447d57a..794898e0b9 100644 --- a/src/misc/objects.c +++ b/src/misc/objects.c @@ -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' ) diff --git a/src/misc/stats.c b/src/misc/stats.c index 3586bb8075..260da3a5c3 100644 --- a/src/misc/stats.c +++ b/src/misc/stats.c @@ -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 ) { diff --git a/src/misc/variables.c b/src/misc/variables.c index 669760a0da..5da6f869d1 100644 --- a/src/misc/variables.c +++ b/src/misc/variables.c @@ -30,6 +30,7 @@ #ifdef HAVE_STDLIB_H # include /* 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 ) ) diff --git a/src/misc/win32_specific.c b/src/misc/win32_specific.c index 75b5fee4aa..9a4e868cf7 100644 --- a/src/misc/win32_specific.c +++ b/src/misc/win32_specific.c @@ -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(); diff --git a/src/modules/configuration.c b/src/modules/configuration.c index a9194ec585..57d7a67dc5 100644 --- a/src/modules/configuration.c +++ b/src/modules/configuration.c @@ -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 } diff --git a/src/modules/modules.c b/src/modules/modules.c index 2f3d0d80f0..3d2e103868 100644 --- a/src/modules/modules.c +++ b/src/modules/modules.c @@ -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; diff --git a/src/network/httpd.c b/src/network/httpd.c index cd384587a5..3ff2e3bc02 100644 --- a/src/network/httpd.c +++ b/src/network/httpd.c @@ -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--; -- 2.39.2