mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-13 16:21:01 +00:00
res_fax: unregister manager actions on unload
* Unregister manager actions FAXSessions, FAXSession and FAXStats at unload. * Update ast_manager_register2 use ao2_t_alloc tagged with the action name. ASTERISK-24058 #close Reported by: Corey Farrell Review: https://reviewboard.asterisk.org/r/3831/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@419268 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -6317,7 +6317,7 @@ int ast_manager_register2(const char *action, int auth, int (*func)(struct manse
|
||||
{
|
||||
struct manager_action *cur;
|
||||
|
||||
cur = ao2_alloc(sizeof(*cur), action_destroy);
|
||||
cur = ao2_t_alloc(sizeof(*cur), action_destroy, action);
|
||||
if (!cur) {
|
||||
return -1;
|
||||
}
|
||||
|
@@ -4553,6 +4553,10 @@ static int unload_module(void)
|
||||
ast_log(LOG_WARNING, "failed to unregister '%s'\n", app_receivefax);
|
||||
}
|
||||
|
||||
ast_manager_unregister("FAXSessions");
|
||||
ast_manager_unregister("FAXSession");
|
||||
ast_manager_unregister("FAXStats");
|
||||
|
||||
if (fax_logger_level != -1) {
|
||||
ast_logger_unregister_level("FAX");
|
||||
}
|
||||
|
Reference in New Issue
Block a user