mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
Speed up ast_list macros (bug #3135)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4546 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -551,8 +551,7 @@ static int dundi_lookup_local(struct dundi_result *dr, struct dundi_mapping *map
|
||||
AST_LIST_INSERT_HEAD(&headp, newvariable, entries);
|
||||
pbx_substitute_variables_varshead(&headp, map->dest, dr[anscnt].dest, sizeof(dr[anscnt].dest));
|
||||
while (!AST_LIST_EMPTY(&headp)) { /* List Deletion. */
|
||||
newvariable = AST_LIST_FIRST(&headp);
|
||||
AST_LIST_REMOVE_HEAD(&headp, entries);
|
||||
newvariable = AST_LIST_REMOVE_HEAD(&headp, ast_var_t, entries);
|
||||
ast_var_delete(newvariable);
|
||||
}
|
||||
} else
|
||||
|
@@ -81,8 +81,7 @@ static char *loopback_helper(char *buf, int buflen, const char *exten, const cha
|
||||
pbx_substitute_variables_varshead(&headp, data, buf, buflen);
|
||||
/* Substitute variables */
|
||||
while (!AST_LIST_EMPTY(&headp)) { /* List Deletion. */
|
||||
newvariable = AST_LIST_FIRST(&headp);
|
||||
AST_LIST_REMOVE_HEAD(&headp, entries);
|
||||
newvariable = AST_LIST_REMOVE_HEAD(&headp, ast_var_t, entries);
|
||||
ast_var_delete(newvariable);
|
||||
}
|
||||
return buf;
|
||||
|
Reference in New Issue
Block a user