[vlc-devel] commit: module_Call: specify object for logging ( Rémi Denis-Courmont )

git version control git at videolan.org
Sat Aug 30 13:39:38 CEST 2008


vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Sat Aug 30 14:32:53 2008 +0300| [5c4ceb84ed92fa1dd4a85258f7ee3466eb0ef833] | committer: Rémi Denis-Courmont 

module_Call: specify object for logging

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5c4ceb84ed92fa1dd4a85258f7ee3466eb0ef833
---

 src/modules/modules.c |    2 +-
 src/modules/modules.h |    2 +-
 src/modules/os.c      |   22 +++++++++++-----------
 3 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/src/modules/modules.c b/src/modules/modules.c
index 9ff601b..4a9f674 100644
--- a/src/modules/modules.c
+++ b/src/modules/modules.c
@@ -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 );
diff --git a/src/modules/modules.h b/src/modules/modules.h
index cc2207b..8c32451 100644
--- a/src/modules/modules.h
+++ b/src/modules/modules.h
@@ -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 */
diff --git a/src/modules/os.c b/src/modules/os.c
index 5cf3a82..af70b69 100644
--- a/src/modules/os.c
+++ b/src/modules/os.c
@@ -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,19 +95,19 @@ 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'",
-                            psz_name, p_module->psz_filename );
+        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)",
-                            psz_name, p_module->psz_filename, psz_error );
+        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)",
-                            psz_name, p_module->psz_filename, dlerror() );
+        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)",
-                            psz_name, p_module->psz_filename );
+        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"
 #endif
@@ -119,8 +119,8 @@ 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'",
-                           psz_name, p_module->psz_filename );
+        msg_Err( obj, "Failed to call symbol \"%s\" in file `%s'",
+                 psz_name, p_module->psz_filename );
         return -1;
     }
 




More information about the vlc-devel mailing list