Commit 5c4ceb84 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

module_Call: specify object for logging

parent f3c2c887
......@@ -1252,7 +1252,7 @@ static module_t * AllocatePlugin( vlc_object_t * p_this, char * psz_file )
p_module->b_loaded = true;
/* Initialize the module: fill p_module, default config */
if( module_Call( p_module ) != 0 )
if( module_Call( VLC_OBJECT(p_module), p_module ) != 0 )
{
/* We couldn't call module_init() */
vlc_object_release( p_module );
......
......@@ -154,8 +154,8 @@ void __module_EndBank ( vlc_object_t * );
void __module_ResetBank ( vlc_object_t * );
/* Low-level OS-dependent handler */
int module_Call (module_t *);
int module_Load (vlc_object_t *, const char *, module_handle_t *);
int module_Call (vlc_object_t *obj, module_t *);
void module_Unload (module_handle_t);
/* Plugins cache */
......
......@@ -84,7 +84,7 @@ static char * GetWindowsError ( void );
* \param p_module the modules
* \return 0 if it pass and -1 in case of a failure
*/
int module_Call( module_t *p_module )
int module_Call( vlc_object_t *obj, module_t *p_module )
{
static const char psz_name[] = "vlc_entry" MODULE_SUFFIX;
int (* pf_symbol) ( module_t * p_module );
......@@ -95,18 +95,18 @@ int module_Call( module_t *p_module )
if( pf_symbol == NULL )
{
#if defined(HAVE_DL_DYLD) || defined(HAVE_DL_BEOS)
msg_Warn( p_module, "cannot find symbol \"%s\" in file `%s'",
msg_Warn( obj, "cannot find symbol \"%s\" in file `%s'",
psz_name, p_module->psz_filename );
#elif defined(HAVE_DL_WINDOWS)
char *psz_error = GetWindowsError();
msg_Warn( p_module, "cannot find symbol \"%s\" in file `%s' (%s)",
msg_Warn( obj, "cannot find symbol \"%s\" in file `%s' (%s)",
psz_name, p_module->psz_filename, psz_error );
free( psz_error );
#elif defined(HAVE_DL_DLOPEN)
msg_Warn( p_module, "cannot find symbol \"%s\" in file `%s' (%s)",
msg_Warn( obj, "cannot find symbol \"%s\" in file `%s' (%s)",
psz_name, p_module->psz_filename, dlerror() );
#elif defined(HAVE_DL_SHL_LOAD)
msg_Warn( p_module, "cannot find symbol \"%s\" in file `%s' (%m)",
msg_Warn( obj, "cannot find symbol \"%s\" in file `%s' (%m)",
psz_name, p_module->psz_filename );
#else
# error "Something is wrong in modules.c"
......@@ -119,7 +119,7 @@ int module_Call( module_t *p_module )
{
/* With a well-written module we shouldn't have to print an
* additional error message here, but just make sure. */
msg_Err( p_module, "Failed to call symbol \"%s\" in file `%s'",
msg_Err( obj, "Failed to call symbol \"%s\" in file `%s'",
psz_name, p_module->psz_filename );
return -1;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment