[asterisk-commits] mnicholson: branch 1.4 r275143 - /branches/1.4/main/loader.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jul 9 12:50:09 CDT 2010


Author: mnicholson
Date: Fri Jul  9 12:50:05 2010
New Revision: 275143

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=275143
Log:
don't unload modules that returned AST_MODULE_LOAD_DECLINE when they were loaded

Modified:
    branches/1.4/main/loader.c

Modified: branches/1.4/main/loader.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.4/main/loader.c?view=diff&rev=275143&r1=275142&r2=275143
==============================================================================
--- branches/1.4/main/loader.c (original)
+++ branches/1.4/main/loader.c Fri Jul  9 12:50:05 2010
@@ -472,7 +472,7 @@
 				continue;
 			}
 			AST_LIST_REMOVE_CURRENT(&module_list, entry);
-			if (mod->info->unload) {
+			if (mod->flags.running && !mod->flags.declined && mod->info->unload) {
 				mod->info->unload();
 			}
 			AST_LIST_HEAD_DESTROY(&mod->users);
@@ -498,7 +498,7 @@
 		return 0;
 	}
 
-	if (!(mod->flags.running || mod->flags.declined))
+	if (!mod->flags.running || mod->flags.declined)
 		error = 1;
 
 	if (!mod->lib) {




More information about the asterisk-commits mailing list