]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_pjsip_config_wizard/config: Fix template processing 73/473/4
authorGeorge Joseph <george.joseph@fairview5.com>
Thu, 14 May 2015 23:01:56 +0000 (17:01 -0600)
committerGeorge Joseph <george.joseph@fairview5.com>
Fri, 15 May 2015 22:18:11 +0000 (16:18 -0600)
commitdd78ab42e4316c53fa517ca19956d9be38f368a5
treedd26c3896768f61a4c426504dfd300f72d4d3020
parent091b436007c55fbcc827cceb97a414a172aa36af
res_pjsip_config_wizard/config: Fix template processing

The config wizard was always pulling the first occurrence of
a variable from an ast_variable list but this gets the template
value from the list instead of any overridden value.  This patch
creates ast_variable_find_last_in_list() in config.c and updates
res_pjsip_config_wizard to use it instead of
ast_variable_find_in_list.  Now the overridden values, where they
exist, are used instead of template variables.

Updated test_config to test the new API.

ASTERISK-25089 #close

Reported-by: George Joseph <george.joseph@fairview5.com>
Tested-by: George Joseph <george.joseph@fairview5.com>
Change-Id: Ifa7ddefc956a463923ee6839dd1ebe021c299de4
include/asterisk/config.h
main/config.c
res/res_pjsip_config_wizard.c
tests/test_config.c