Changeset 1eea47cd41875604da84a414e17511920f88a40d
- Timestamp:
- 05/08/08 22:08:46
(2 months ago)
- Author:
- Rémi Denis-Courmont <rem@videolan.org>
- git-committer:
- Rémi Denis-Courmont <rem@videolan.org> 1210277326 +0300
- git-parent:
[a8c44b836bd56fa4676f4fe18a73ee166aa0516a]
- git-author:
- Rémi Denis-Courmont <rem@videolan.org> 1210277319 +0300
- Message:
DeleteModule? cannot fail * don't handle impossible errors
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| ra8c44b8 |
r1eea47c |
|
| 101 | 101 | #endif |
|---|
| 102 | 102 | static int AllocateBuiltinModule( vlc_object_t *, int ( * ) ( module_t * ) ); |
|---|
| 103 | | static int DeleteModule ( module_t *, bool ); |
|---|
| | 103 | static void DeleteModule ( module_t *, bool ); |
|---|
| 104 | 104 | #ifdef HAVE_DYNAMIC_PLUGINS |
|---|
| 105 | 105 | static void DupModule ( module_t * ); |
|---|
| … | … | |
| 218 | 218 | { |
|---|
| 219 | 219 | p_next = (module_t *)p_libvlc_global->p_module_bank->pp_children[0]; |
|---|
| 220 | | |
|---|
| 221 | | if( DeleteModule( p_next, true ) ) |
|---|
| 222 | | { |
|---|
| 223 | | /* Module deletion failed */ |
|---|
| 224 | | msg_Err( p_this, "module \"%s\" can't be removed, trying harder", |
|---|
| 225 | | p_next->psz_object_name ); |
|---|
| 226 | | |
|---|
| 227 | | /* We just free the module by hand. Niahahahahaha. */ |
|---|
| 228 | | vlc_object_detach( p_next ); |
|---|
| 229 | | vlc_object_release( p_next ); |
|---|
| 230 | | } |
|---|
| | 220 | DeleteModule( p_next, true ); |
|---|
| 231 | 221 | } |
|---|
| 232 | 222 | |
|---|
| … | … | |
| 1403 | 1393 | * This function can only be called if the module isn't being used. |
|---|
| 1404 | 1394 | *****************************************************************************/ |
|---|
| 1405 | | static int DeleteModule( module_t * p_module, bool b_detach ) |
|---|
| 1406 | | { |
|---|
| 1407 | | if( !p_module ) return VLC_EGENERIC; |
|---|
| | 1395 | static void DeleteModule( module_t * p_module, bool b_detach ) |
|---|
| | 1396 | { |
|---|
| | 1397 | assert( p_module ); |
|---|
| | 1398 | |
|---|
| 1408 | 1399 | if( b_detach ) |
|---|
| 1409 | 1400 | vlc_object_detach( p_module ); |
|---|
| … | … | |
| 1432 | 1423 | config_Free( p_module ); |
|---|
| 1433 | 1424 | vlc_object_release( p_module ); |
|---|
| 1434 | | p_module = NULL; |
|---|
| 1435 | | return 0; |
|---|
| 1436 | | } |
|---|
| | 1425 | } |
|---|