diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-06-04 16:26:43 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-06-04 16:26:43 +0000 |
commit | d8be482a706ecce628d63efdba22eab8a5856252 (patch) | |
tree | 770274cba264b6b03043e80da1075bd6c3178667 /pbx/pbx_config.c | |
parent | 946fadd5cf17931696d4cdd049351881a243d3eb (diff) |
Make the "dialplan remove include" CLI command actually work. Also, tweak
some formatting, and make the success message a little bit more clear.
(closes AST-52)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@120371 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx/pbx_config.c')
-rw-r--r-- | pbx/pbx_config.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/pbx/pbx_config.c b/pbx/pbx_config.c index 8083fda66..3d4a08c29 100644 --- a/pbx/pbx_config.c +++ b/pbx/pbx_config.c @@ -135,20 +135,23 @@ static int handle_context_dont_include_deprecated(int fd, int argc, char *argv[] static int handle_context_remove_include(int fd, int argc, char *argv[]) { - if (argc != 6) + if (argc != 6) { return RESULT_SHOWUSAGE; + } - if (strcmp(argv[4], "into")) + if (strcmp(argv[4], "from")) { return RESULT_SHOWUSAGE; + } if (!ast_context_remove_include(argv[5], argv[3], registrar)) { - ast_cli(fd, "We are not including '%s' into '%s' now\n", + ast_cli(fd, "The dialplan no longer includes '%s' into '%s'\n", argv[3], argv[5]); return RESULT_SUCCESS; } ast_cli(fd, "Failed to remove '%s' include from '%s' context\n", argv[3], argv[5]); + return RESULT_FAILURE; } |