Changeset 5c4ceb84ed92fa1dd4a85258f7ee3466eb0ef833
- Timestamp:
- 30/08/08 13:42:38
(3 months ago)
- Author:
- Rémi Denis-Courmont <rdenis@simphalempin.com>
- git-committer:
- Rémi Denis-Courmont <rdenis@simphalempin.com> 1220096558 +0300
- git-parent:
[f3c2c887cf69851b90f2ca45c9e71c65c1ecabfa]
- git-author:
- Rémi Denis-Courmont <rdenis@simphalempin.com> 1220095973 +0300
- Message:
module_Call: specify object for logging
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r4a28278 |
r5c4ceb8 |
|
| 1253 | 1253 | |
|---|
| 1254 | 1254 | /* Initialize the module: fill p_module, default config */ |
|---|
| 1255 | | if( module_Call( p_module ) != 0 ) |
|---|
| | 1255 | if( module_Call( VLC_OBJECT(p_module), p_module ) != 0 ) |
|---|
| 1256 | 1256 | { |
|---|
| 1257 | 1257 | /* We couldn't call module_init() */ |
|---|
| r6d9fde8 |
r5c4ceb8 |
|
| 155 | 155 | |
|---|
| 156 | 156 | /* Low-level OS-dependent handler */ |
|---|
| 157 | | int module_Call (module_t *); |
|---|
| 158 | 157 | int module_Load (vlc_object_t *, const char *, module_handle_t *); |
|---|
| | 158 | int module_Call (vlc_object_t *obj, module_t *); |
|---|
| 159 | 159 | void module_Unload (module_handle_t); |
|---|
| 160 | 160 | |
|---|
| rd666030 |
r5c4ceb8 |
|
| 85 | 85 | * \return 0 if it pass and -1 in case of a failure |
|---|
| 86 | 86 | */ |
|---|
| 87 | | int module_Call( module_t *p_module ) |
|---|
| | 87 | int module_Call( vlc_object_t *obj, module_t *p_module ) |
|---|
| 88 | 88 | { |
|---|
| 89 | 89 | static const char psz_name[] = "vlc_entry" MODULE_SUFFIX; |
|---|
| … | … | |
| 96 | 96 | { |
|---|
| 97 | 97 | #if defined(HAVE_DL_DYLD) || defined(HAVE_DL_BEOS) |
|---|
| 98 | | msg_Warn( p_module, "cannot find symbol \"%s\" in file `%s'", |
|---|
| 99 | | psz_name, p_module->psz_filename ); |
|---|
| | 98 | msg_Warn( obj, "cannot find symbol \"%s\" in file `%s'", |
|---|
| | 99 | psz_name, p_module->psz_filename ); |
|---|
| 100 | 100 | #elif defined(HAVE_DL_WINDOWS) |
|---|
| 101 | 101 | char *psz_error = GetWindowsError(); |
|---|
| 102 | | msg_Warn( p_module, "cannot find symbol \"%s\" in file `%s' (%s)", |
|---|
| 103 | | psz_name, p_module->psz_filename, psz_error ); |
|---|
| | 102 | msg_Warn( obj, "cannot find symbol \"%s\" in file `%s' (%s)", |
|---|
| | 103 | psz_name, p_module->psz_filename, psz_error ); |
|---|
| 104 | 104 | free( psz_error ); |
|---|
| 105 | 105 | #elif defined(HAVE_DL_DLOPEN) |
|---|
| 106 | | msg_Warn( p_module, "cannot find symbol \"%s\" in file `%s' (%s)", |
|---|
| 107 | | psz_name, p_module->psz_filename, dlerror() ); |
|---|
| 108 | | #elif defined(HAVE_DL_SHL_LOAD) |
|---|
| 109 | | msg_Warn( p_module, "cannot find symbol \"%s\" in file `%s' (%m)", |
|---|
| 110 | | psz_name, p_module->psz_filename ); |
|---|
| | 106 | msg_Warn( obj, "cannot find symbol \"%s\" in file `%s' (%s)", |
|---|
| | 107 | psz_name, p_module->psz_filename, dlerror() ); |
|---|
| | 108 | #elif defined(HAVE_DL_SHL_LOAD) |
|---|
| | 109 | msg_Warn( obj, "cannot find symbol \"%s\" in file `%s' (%m)", |
|---|
| | 110 | psz_name, p_module->psz_filename ); |
|---|
| 111 | 111 | #else |
|---|
| 112 | 112 | # error "Something is wrong in modules.c" |
|---|
| … | … | |
| 120 | 120 | /* With a well-written module we shouldn't have to print an |
|---|
| 121 | 121 | * additional error message here, but just make sure. */ |
|---|
| 122 | | msg_Err( p_module, "Failed to call symbol \"%s\" in file `%s'", |
|---|
| 123 | | psz_name, p_module->psz_filename ); |
|---|
| | 122 | msg_Err( obj, "Failed to call symbol \"%s\" in file `%s'", |
|---|
| | 123 | psz_name, p_module->psz_filename ); |
|---|
| 124 | 124 | return -1; |
|---|
| 125 | 125 | } |
|---|