]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
pbx_variables: add missing ASTSBINDIR variable
authorNaveen Albert <asterisk@phreaknet.org>
Sat, 8 Jan 2022 15:09:13 +0000 (15:09 +0000)
committerN A <mail@interlinked.x10host.com>
Tue, 11 Jan 2022 15:29:45 +0000 (09:29 -0600)
Every config variable in the directories
section of asterisk.conf currently has a
counterpart built-in variable containing
the value of the config option, except
for the last one, astsbindir, which should
have an ASTSBINDIR variable.

However, the actual corresponding ASTSBINDIR
variable is missing in pbx_variables.c.

This adds the missing variable so that all
the config options have their corresponding
variable.

ASTERISK-29847 #close

Change-Id: I36006faf471825b36ebc8aa5e87a3bcb38d446fc

main/pbx_variables.c

index 7a859890c37eef8c0ce0b4b65a9a580afedb2e2a..6f7439f72f39c97dd5855aa8e05342f076f310c0 100644 (file)
@@ -350,6 +350,8 @@ const char *ast_str_retrieve_variable(struct ast_str **str, ssize_t maxlen, stru
                        s = ast_config_AST_RUN_DIR;
                } else if (!strcmp(var, "ASTLOGDIR")) {
                        s = ast_config_AST_LOG_DIR;
+               } else if (!strcmp(var, "ASTSBINDIR")) {
+                       s = ast_config_AST_SBIN_DIR;
                } else if (!strcmp(var, "ENTITYID")) {
                        ast_eid_to_str(workspace, sizeof(workspace), &ast_eid_default);
                        s = workspace;