summaryrefslogtreecommitdiff
path: root/main/config.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/config.c')
-rw-r--r--main/config.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/main/config.c b/main/config.c
index bc622ccab..d6a077b2d 100644
--- a/main/config.c
+++ b/main/config.c
@@ -735,6 +735,19 @@ const char *ast_variable_find_in_list(const struct ast_variable *list, const cha
return NULL;
}
+const char *ast_variable_find_last_in_list(const struct ast_variable *list, const char *variable)
+{
+ const struct ast_variable *v;
+ const char *found = NULL;
+
+ for (v = list; v; v = v->next) {
+ if (!strcasecmp(variable, v->name)) {
+ found = v->value;
+ }
+ }
+ return found;
+}
+
static struct ast_variable *variable_clone(const struct ast_variable *old)
{
struct ast_variable *new = ast_variable_new(old->name, old->value, old->file);