]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Cleanup taskprocessor on exit.
authorRichard Mudgett <rmudgett@digium.com>
Tue, 11 Dec 2012 20:37:36 +0000 (20:37 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Tue, 11 Dec 2012 20:37:36 +0000 (20:37 +0000)
* Cleanup CLI commands on exit.

(issue ASTERISK-20649)
Reported by: Corey Farrell
Patches:
      taskprocessor-cleanup-1_8-11-trunk.patch (license #5909) patch uploaded by Corey Farrell
      taskprocessor-cleanup-10-only.patch (license #5909) patch uploaded by Corey Farrell
      Modified

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@377837 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/taskprocessor.c

index 3a79f21decec0d94a5a74fd64e1e6c04387f62ce..391432d1c5ab255f89ddfa70c776b33231e1f8a9 100644 (file)
@@ -125,7 +125,9 @@ static struct ast_cli_entry taskprocessor_clis[] = {
 /*! \internal \brief Clean up resources on Asterisk shutdown */
 static void tps_shutdown(void)
 {
+       ast_cli_unregister_multiple(taskprocessor_clis, ARRAY_LEN(taskprocessor_clis));
        ao2_t_ref(tps_singletons, -1, "Unref tps_singletons in shutdown");
+       tps_singletons = NULL;
 }
 
 /* initialize the taskprocessor container and register CLI operations */