mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-20 08:40:16 +00:00
chan_sip: Fix order of variables specified in SIPNotify action
Prior to this patch, sequential variables would be ordered in reverse from the order specified in the manager action. Review: https://reviewboard.asterisk.org/r/3588/ ........ Merged revisions 415359 from http://svn.asterisk.org/svn/asterisk/branches/1.8 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@415390 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -2096,6 +2096,12 @@ static struct ast_variable *man_do_variable_value(struct ast_variable *head, con
|
||||
}
|
||||
|
||||
struct ast_variable *astman_get_variables(const struct message *m)
|
||||
{
|
||||
return astman_get_variables_order(m, ORDER_REVERSE);
|
||||
}
|
||||
|
||||
struct ast_variable *astman_get_variables_order(const struct message *m,
|
||||
enum variable_orders order)
|
||||
{
|
||||
int varlen;
|
||||
int x;
|
||||
@@ -2112,6 +2118,10 @@ struct ast_variable *astman_get_variables(const struct message *m)
|
||||
head = man_do_variable_value(head, m->headers[x] + varlen);
|
||||
}
|
||||
|
||||
if (order == ORDER_NATURAL) {
|
||||
head = ast_variables_reverse(head);
|
||||
}
|
||||
|
||||
return head;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user