diff options
author | Corey Farrell <git@cfware.com> | 2017-11-13 17:20:27 -0500 |
---|---|---|
committer | Corey Farrell <git@cfware.com> | 2017-11-13 17:28:02 -0500 |
commit | 45b8f444ab32abe3759be8d3273c7ee866c33c1d (patch) | |
tree | abe3ca0f3a822158cf3ce80357cc7572b95cbd56 | |
parent | 51597fe1df8fcef596de0ebc00e300b0be8932fb (diff) |
core: Fix configuration of remote console socket path.
The remote console socket path is the combination of asterisk.conf
settings astrundir from [directories] and astctl from [files].
Unconditionally combine the two strings after processing all values
to ensure we end up with the correct socket path.
ASTERISK-27415
Change-Id: Ib1e2805d55d6b0955c6430a1a2a93acbf9b091e8
-rw-r--r-- | main/asterisk.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/main/asterisk.c b/main/asterisk.c index 40986a484..2126487b8 100644 --- a/main/asterisk.c +++ b/main/asterisk.c @@ -3655,7 +3655,6 @@ static void ast_readconfig(void) ast_copy_string(cfg_paths.agi_dir, v->value, sizeof(cfg_paths.agi_dir)); } else if (!strcasecmp(v->name, "astrundir")) { snprintf(cfg_paths.pid_path, sizeof(cfg_paths.pid_path), "%s/%s", v->value, "asterisk.pid"); - snprintf(cfg_paths.socket_path, sizeof(cfg_paths.socket_path), "%s/%s", v->value, ast_config_AST_CTL); ast_copy_string(cfg_paths.run_dir, v->value, sizeof(cfg_paths.run_dir)); } else if (!strcasecmp(v->name, "astmoddir")) { ast_copy_string(cfg_paths.module_dir, v->value, sizeof(cfg_paths.module_dir)); @@ -3664,6 +3663,10 @@ static void ast_readconfig(void) } } + /* Combine astrundir and astctl settings. */ + snprintf(cfg_paths.socket_path, sizeof(cfg_paths.socket_path), "%s/%s", + ast_config_AST_RUN_DIR, ast_config_AST_CTL); + for (v = ast_variable_browse(cfg, "options"); v; v = v->next) { /* verbose level (-v at startup) */ if (!strcasecmp(v->name, "verbose")) { |