[asterisk-commits] file: branch file/usecnt-cleanup r54527 -
/team/file/usecnt-cleanup/main/
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Wed Feb 14 17:53:16 MST 2007
Author: file
Date: Wed Feb 14 18:53:16 2007
New Revision: 54527
URL: http://svn.digium.com/view/asterisk?view=rev&rev=54527
Log:
Handle errors from automatic unregistration.
Modified:
team/file/usecnt-cleanup/main/loader.c
Modified: team/file/usecnt-cleanup/main/loader.c
URL: http://svn.digium.com/view/asterisk/team/file/usecnt-cleanup/main/loader.c?view=diff&rev=54527&r1=54526&r2=54527
==============================================================================
--- team/file/usecnt-cleanup/main/loader.c (original)
+++ team/file/usecnt-cleanup/main/loader.c Wed Feb 14 18:53:16 2007
@@ -482,9 +482,10 @@
}
}
/* Check module registration linkages */
- if (!AST_LIST_EMPTY(&mod->links)) {
+ if (!error && !AST_LIST_EMPTY(&mod->links)) {
struct ast_module_link *link = NULL;
AST_LIST_TRAVERSE_SAFE_BEGIN(&mod->links, link, list) {
+ res = 0;
AST_LIST_REMOVE_CURRENT(&mod->links, list);
/* Unregister linkage on behalf of the module */
if (link->registered == AST_MODULE_REGISTERED_APPLICATION)
@@ -507,6 +508,11 @@
res = ast_custom_function_unregister((struct ast_custom_function*)link->data);
free(link);
/* Handle error from unregister process */
+ if (res && force <= AST_FORCE_FIRM) {
+ ast_log(LOG_WARNING, "Module linking unregistration failed for %s\n", resource_name);
+ error = 1;
+ break;
+ }
}
AST_LIST_TRAVERSE_SAFE_END
}
More information about the asterisk-commits
mailing list