CLI: Remove calls to ast_cli_generator.

The ability to add to localized storage cannot be supported by
ast_cli_generator.  The only calls to ast_cli_generator should be by
functions that need to proxy the CLI generator, for example 'cli check
permissions' or 'core show help'.

* ast_cli_generatornummatches now retrieves the vector of matches and
  reports the number of elements (not including 'best' match).
* test_substitution retrieves and iterates the vector.

Change-Id: I8cd6b93905363cf7a33a2d2b0e2a8f8446d9f248
This commit is contained in:
Corey Farrell
2017-11-09 01:39:13 -05:00
parent 3abf8dfeae
commit a02cbc2ef3
3 changed files with 25 additions and 16 deletions

View File

@@ -287,6 +287,9 @@ int ast_cli_unregister_multiple(struct ast_cli_entry *e, int len);
* Useful for readline, that's about it
* \retval 0 on success
* \retval -1 on failure
*
* Only call this function to proxy the CLI generator to
* another.
*/
char *ast_cli_generator(const char *, const char *, int);