summaryrefslogtreecommitdiff
path: root/main/asterisk.c
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2007-06-05 15:54:36 +0000
committerRussell Bryant <russell@russellbryant.com>2007-06-05 15:54:36 +0000
commit508d36f5ad922aa4ae6a3c1ed586dd04af24a993 (patch)
tree299f09a143a0dc32fe4717f35700fca9c04113df /main/asterisk.c
parent72cd0474f6a1b9ba5b0dbb8ec11efeb1d9d595a4 (diff)
Merged revisions 67308 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r67308 | russell | 2007-06-05 10:51:53 -0500 (Tue, 05 Jun 2007) | 5 lines When shutting down "gracefully", go through and run the unload() callbacks for all of the modules. "stop now" is considered a non-graceful shutdown and will not go through this process. (issue #9804, reported by chrisost, patch by me) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@67310 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/asterisk.c')
-rw-r--r--main/asterisk.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/main/asterisk.c b/main/asterisk.c
index efb6403d9..18a121339 100644
--- a/main/asterisk.c
+++ b/main/asterisk.c
@@ -126,6 +126,7 @@ int daemon(int, int); /* defined in libresolv of all places */
#include "asterisk/version.h"
#include "asterisk/linkedlists.h"
#include "asterisk/devicestate.h"
+#include "asterisk/module.h"
#include "asterisk/doxyref.h" /* Doxygen documentation */
@@ -1244,6 +1245,9 @@ static void quit_handler(int num, int nice, int safeshutdown, int restart)
ast_verbose("Asterisk %s cancelled.\n", restart ? "restart" : "shutdown");
return;
}
+
+ if (nice)
+ ast_module_shutdown();
}
if (ast_opt_console || ast_opt_remote) {
if (getenv("HOME"))