summaryrefslogtreecommitdiff
path: root/include/asterisk
diff options
context:
space:
mode:
authorzuul <zuul@gerrit.asterisk.org>2016-03-24 19:55:49 -0500
committerGerrit Code Review <gerrit2@gerrit.digium.api>2016-03-24 19:55:50 -0500
commit8271a06dde1e6e7adfabf0f06d45442dee925d5a (patch)
tree7534707011d727307660cac15ef803b8dc546910 /include/asterisk
parentd3af5320d43c73f0655ebaad1c818292c1250cc7 (diff)
parent59c8e189fddcbc861947143f48e5b86e4707b29a (diff)
Merge "Restrict CLI/AMI commands on shutdown." into 13
Diffstat (limited to 'include/asterisk')
-rw-r--r--include/asterisk/cli.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/asterisk/cli.h b/include/asterisk/cli.h
index 458ebc8aa..c51d89eb8 100644
--- a/include/asterisk/cli.h
+++ b/include/asterisk/cli.h
@@ -310,6 +310,18 @@ char **ast_cli_completion_matches(const char *, const char *);
*/
char *ast_complete_channels(const char *line, const char *word, int pos, int state, int rpos);
+/*!
+ * \brief Allow a CLI command to be executed while Asterisk is shutting down.
+ *
+ * CLI commands by defeault are disabled when Asterisk is shutting down. This is
+ * to ensure the safety of the shutdown since CLI commands may attempt to access
+ * resources that have been freed as a result of the shutdown.
+ *
+ * If a CLI command should be allowed at shutdown, then the best way to enable this
+ * is to call ast_cli_allow_at_shutdown during the CLI_INIT state of the CLI handler.
+ */
+int ast_cli_allow_at_shutdown(struct ast_cli_entry *e);
+
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif