[Asterisk-code-review] core: Fix configuration of remote console socket path. (asterisk[15])

Jenkins2 asteriskteam at digium.com
Tue Nov 14 10:46:05 CST 2017


Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/7211 )

Change subject: core: Fix configuration of remote console socket path.
......................................................................

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
---
M main/asterisk.c
1 file changed, 4 insertions(+), 1 deletion(-)

Approvals:
  Joshua Colp: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved
  Jenkins2: Approved for Submit



diff --git a/main/asterisk.c b/main/asterisk.c
index 40986a4..2126487 100644
--- a/main/asterisk.c
+++ b/main/asterisk.c
@@ -3655,7 +3655,6 @@
 			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 @@
 		}
 	}
 
+	/* 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")) {

-- 
To view, visit https://gerrit.asterisk.org/7211
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib1e2805d55d6b0955c6430a1a2a93acbf9b091e8
Gerrit-Change-Number: 7211
Gerrit-PatchSet: 1
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171114/16986e26/attachment.html>


More information about the asterisk-code-review mailing list