summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJonathan Rose <jrose@digium.com>2014-06-06 21:44:16 +0000
committerJonathan Rose <jrose@digium.com>2014-06-06 21:44:16 +0000
commit5ca495ed2f60fe8907503196ae50a2cfba9ff1fd (patch)
treeb711478b90599d2457f905c3d4d444864a4e6d13 /include
parent4308aa5648ef4d7332dd14f920b944b0806ec8fb (diff)
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 ........ Merged revisions 415390 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 415410 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@415411 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/config.h10
-rw-r--r--include/asterisk/manager.h14
2 files changed, 23 insertions, 1 deletions
diff --git a/include/asterisk/config.h b/include/asterisk/config.h
index 1c10d176b..2579ef279 100644
--- a/include/asterisk/config.h
+++ b/include/asterisk/config.h
@@ -560,6 +560,16 @@ int ast_realtime_enabled(void);
struct ast_variable *ast_variables_dup(struct ast_variable *var);
/*!
+ * \brief Reverse a variable list
+ * \param var the linked list of variables to reverse
+ * \return The head of the reversed variable list
+ *
+ * \note The variable list var is not preserved in this function and should
+ * not be used after reversing it.
+ */
+struct ast_variable *ast_variables_reverse(struct ast_variable *var);
+
+/*!
* \brief Free variable list
* \param var the linked list of variables to free
*
diff --git a/include/asterisk/manager.h b/include/asterisk/manager.h
index 42ff31a45..978151ab1 100644
--- a/include/asterisk/manager.h
+++ b/include/asterisk/manager.h
@@ -260,9 +260,21 @@ int __ast_manager_event_multichan(int category, const char *event, int chancount
/*! \brief Get header from mananger transaction */
const char *astman_get_header(const struct message *m, char *var);
-/*! \brief Get a linked list of the Variable: headers */
+/*! \brief Get a linked list of the Variable: headers
+ *
+ * \note Order of variables is reversed from the order they are specified in
+ * the manager message
+ */
struct ast_variable *astman_get_variables(const struct message *m);
+enum variable_orders {
+ ORDER_NATURAL,
+ ORDER_REVERSE
+};
+
+/*! \brief Get a linked list of the Variable: headers with order specified */
+struct ast_variable *astman_get_variables_order(const struct message *m, enum variable_orders order);
+
/*! \brief Send error in manager transaction */
void astman_send_error(struct mansession *s, const struct message *m, char *error);