From 5aacb6a82d4cf625774fa1ea39ca193a3be73b35 Mon Sep 17 00:00:00 2001 From: kpfleming Date: Mon, 18 Sep 2006 19:54:18 +0000 Subject: merge qwell's CLI verbification work git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43212 f38db490-d61c-443f-a65b-d21fe96a405b --- pbx/pbx_ael.c | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) (limited to 'pbx/pbx_ael.c') diff --git a/pbx/pbx_ael.c b/pbx/pbx_ael.c index c45f73601..cbef91f6a 100644 --- a/pbx/pbx_ael.c +++ b/pbx/pbx_ael.c @@ -3861,25 +3861,42 @@ static int ael2_reload(int fd, int argc, char *argv[]) return (pbx_load_module()); } -static struct ast_cli_entry ael_cli[] = { - { { "ael", "reload", NULL }, ael2_reload, "Reload AEL configuration"}, - { { "ael", "debug", "read", NULL }, ael2_debug_read, "Enable AEL read debug (does nothing)"}, - { { "ael", "debug", "tokens", NULL }, ael2_debug_tokens, "Enable AEL tokens debug (does nothing)"}, - { { "ael", "debug", "macros", NULL }, ael2_debug_macros, "Enable AEL macros debug (does nothing)"}, - { { "ael", "debug", "contexts", NULL }, ael2_debug_contexts, "Enable AEL contexts debug (does nothing)"}, - { { "ael", "no", "debug", NULL }, ael2_no_debug, "Disable AEL debug messages"}, +static struct ast_cli_entry cli_ael_no_debug = { + { "ael", "no", "debug", NULL }, + ael2_no_debug, NULL, + NULL }; + +static struct ast_cli_entry cli_ael[] = { + { { "ael", "reload", NULL }, + ael2_reload, "Reload AEL configuration" }, + + { { "ael", "debug", "read", NULL }, + ael2_debug_read, "Enable AEL read debug (does nothing)" }, + + { { "ael", "debug", "tokens", NULL }, + ael2_debug_tokens, "Enable AEL tokens debug (does nothing)" }, + + { { "ael", "debug", "macros", NULL }, + ael2_debug_macros, "Enable AEL macros debug (does nothing)" }, + + { { "ael", "debug", "contexts", NULL }, + ael2_debug_contexts, "Enable AEL contexts debug (does nothing)" }, + + { { "ael", "nodebug", NULL }, + ael2_no_debug, "Disable AEL debug messages", + NULL, NULL, &cli_ael_no_debug }, }; static int unload_module(void) { ast_context_destroy(NULL, registrar); - ast_cli_unregister_multiple(ael_cli, sizeof(ael_cli)/ sizeof(ael_cli[0])); + ast_cli_unregister_multiple(cli_ael, sizeof(cli_ael) / sizeof(struct ast_cli_entry)); return 0; } static int load_module(void) { - ast_cli_register_multiple(ael_cli, sizeof(ael_cli)/ sizeof(ael_cli[0])); + ast_cli_register_multiple(cli_ael, sizeof(cli_ael) / sizeof(struct ast_cli_entry)); return (pbx_load_module()); } -- cgit v1.2.3