[asterisk-commits] file: branch 1.6.2 r192701 - in /branches/1.6.2: ./ res/res_clialiases.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed May 6 09:37:38 CDT 2009
Author: file
Date: Wed May 6 09:37:32 2009
New Revision: 192701
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=192701
Log:
Merged revisions 192700 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r192700 | file | 2009-05-06 11:35:47 -0300 (Wed, 06 May 2009) | 5 lines
Fix an infinite loop with tab completion of CLI aliases that reference themselves.
(closes issue #15020)
Reported by: junky
........
Modified:
branches/1.6.2/ (props changed)
branches/1.6.2/res/res_clialiases.c
Propchange: branches/1.6.2/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.
Modified: branches/1.6.2/res/res_clialiases.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.6.2/res/res_clialiases.c?view=diff&rev=192701&r1=192700&r2=192701
==============================================================================
--- branches/1.6.2/res/res_clialiases.c (original)
+++ branches/1.6.2/res/res_clialiases.c Wed May 6 09:37:32 2009
@@ -98,7 +98,9 @@
case CLI_GENERATE:
line = a->line;
line += (strlen(alias->alias));
- if (!ast_strlen_zero(a->word)) {
+ if (!strncmp(alias->alias, alias->real_cmd, strlen(alias->alias))) {
+ generator = NULL;
+ } else if (!ast_strlen_zero(a->word)) {
struct ast_str *real_cmd = ast_str_alloca(strlen(alias->real_cmd) + strlen(line) + 1);
ast_str_append(&real_cmd, 0, "%s%s", alias->real_cmd, line);
generator = ast_cli_generator(ast_str_buffer(real_cmd), a->word, a->n);
More information about the asterisk-commits
mailing list