mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-02 11:06:31 +00:00
cel_custom: Allow absolute filenames.
If a filename starts with a '/' in cel_custom [mappings] assume it is
a absolute file path and not relative filename/path to
AST_LOG_DIR/cel_custom/
(cherry picked from commit 0ed7f5800d
)
This commit is contained in:
committed by
Asterisk Development Team
parent
6da65e52d3
commit
db9ca72e15
@@ -103,7 +103,11 @@ static int load_config(void)
|
||||
}
|
||||
|
||||
ast_string_field_build(sink, format, "%s\n", var->value);
|
||||
ast_string_field_build(sink, filename, "%s/%s/%s", ast_config_AST_LOG_DIR, name, var->name);
|
||||
if (var->name[0] == '/') {
|
||||
ast_string_field_build(sink, filename, "%s", var->name);
|
||||
} else {
|
||||
ast_string_field_build(sink, filename, "%s/%s/%s", ast_config_AST_LOG_DIR, name, var->name);
|
||||
}
|
||||
ast_mutex_init(&sink->lock);
|
||||
|
||||
ast_verb(3, "Added CEL CSV mapping for '%s'.\n", sink->filename);
|
||||
|
Reference in New Issue
Block a user