mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-16 23:08:32 +00:00
loader: Use ast_cli_completion_add for 'module load' completion.
This addresses all performance issues with 'module load' completion. In addition to using ast_cli_completion_add we stop using libedit's filename_completion_function, instead using ast_file_read_dir. This ensures all results are produced from a single call to opendir. Change-Id: I8bf51ffaa7ef1606f3bd1b5bb13f1905d72c6134
This commit is contained in:
@@ -143,6 +143,11 @@ int ast_filecopy(const char *oldname, const char *newname, const char *fmt);
|
||||
* \param filename the name of the file
|
||||
* \param obj user data object
|
||||
* \return non-zero to stop reading, otherwise zero to continue
|
||||
*
|
||||
* \note dir_name is not processed by realpath or other functions,
|
||||
* symbolic links are not resolved. This ensures dir_name
|
||||
* always starts with the exact string originally passed to
|
||||
* \ref ast_file_read_dir or \ref ast_file_read_dirs.
|
||||
*/
|
||||
typedef int (*ast_file_on_file)(const char *dir_name, const char *filename, void *obj);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user