From a7c5183d671a8a5769bb302bb71da67350771456 Mon Sep 17 00:00:00 2001
From: "Michael L. Young" <elgueromexicano@gmail.com>
Date: Fri, 12 Apr 2013 22:38:56 +0000
Subject: [PATCH] Fix Manager Segfault When app_queue Is Unloaded

When app_queue is unloaded, some manager commands are not being unregistered
which result in a segfault.  This patch corrects this.

(closes issue ASTERISK-21397)
Reported by: Peter Katzmann, Corey Farrell
Tested by: Corey Farrell
Patches:
    asterisk-21397-missing-unreg-manager-cmd_1.8.diff
                                                 Michael L. Young (license 5026)
    asterisk-21397-missing-unreg-manager-cmd_11.diff
                                                 Michael L. Young (license 5026)

Review: https://reviewboard.asterisk.org/r/2444/
........

Merged revisions 385593 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 385594 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@385595 65c4cc65-6c06-0410-ace0-fbb531ad65f3
---
 apps/app_queue.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/apps/app_queue.c b/apps/app_queue.c
index 6e410002ae..fd692a4b2c 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -9857,6 +9857,9 @@ static int unload_module(void)
 	res |= ast_manager_unregister("QueuePause");
 	res |= ast_manager_unregister("QueueLog");
 	res |= ast_manager_unregister("QueuePenalty");
+	res |= ast_manager_unregister("QueueReload");
+	res |= ast_manager_unregister("QueueReset");
+	res |= ast_manager_unregister("QueueMemberRingInUse");
 	res |= ast_unregister_application(app_aqm);
 	res |= ast_unregister_application(app_rqm);
 	res |= ast_unregister_application(app_pqm);
-- 
GitLab