[Home]

Summary:ASTERISK-10519: Remote console command completion is broken
Reporter:James Golovich (jamesgolovich)Labels:
Date Opened:2007-10-13 17:49:19Date Closed:2007-10-15 08:24:11
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) asterisk-clicomplete.diff.txt
Description:With the recent patch to move everything to NEW_CLI all of the builtin commands aren't working (anything starting with _command).

I'm not really sure what the rational for having it setup this way is, but just to see if it would work I moved the commands from builtins[] to cli_cli[] and they all work after that.

In the code theres a comment for the builtins[] array stating:
/* XXX Nothing in this array can currently be deprecated...
  You have to change the way find_cli works in order to remove this array
  I recommend doing this eventually...
I removed all references to builtins and just moving those NEW_CLIs over to cli_cli seems to take care of everything.  I can come up with a patch to do this, but there might be something I'm missing as to why we still need the builtins array
Comments:By: James Golovich (jamesgolovich) 2007-10-14 02:04:42

I just uploaded a patch that resolves this issue.  This essentialy gets rid of the cli_iterator struct and the builtins array since I can't see any reason for them to exist anymore.

I'm sure this could be fixed another way, but it seems like the cli_iterator struct was just there to bridge the gap to what we have now.

By: Digium Subversion (svnbot) 2007-10-15 08:24:11

Repository: asterisk
Revision: 85550

U   trunk/main/cli.c

------------------------------------------------------------------------
r85550 | russell | 2007-10-15 08:24:10 -0500 (Mon, 15 Oct 2007) | 9 lines

Move the CLI commands that were in builtins[] into the cli_cli[] array of CLI
commands and remove the cli_iterator struct.  This gets tab completion working
again.

(closes issue ASTERISK-10519)
Reported by: jamesgolovich
Patches:
     asterisk-clicomplete.diff.txt uploaded by jamesgolovich (license 176)

------------------------------------------------------------------------