summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCorey Farrell <git@cfware.com>2018-01-25 13:06:12 -0500
committerCorey Farrell <git@cfware.com>2018-01-27 15:18:45 -0500
commit84a6365164394c8d8f9129d433b310ef3214b5dc (patch)
treed40b5dbf54532748398d6daa41bcff0ee6cd783a /include
parent7fbf1e32caedf26c9b24b3ba04cae433dd9451b3 (diff)
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
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/file.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/asterisk/file.h b/include/asterisk/file.h
index 453dc0746..c17cb327b 100644
--- a/include/asterisk/file.h
+++ b/include/asterisk/file.h
@@ -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);