summaryrefslogtreecommitdiff
path: root/include/asterisk/manager.h
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2011-10-11 18:57:47 +0000
committerRichard Mudgett <rmudgett@digium.com>2011-10-11 18:57:47 +0000
commit067250f74c1e2b869b598f422935445b2459f3c6 (patch)
tree08807820cf2ffa988d80c0fbb5eee40346d1eadf /include/asterisk/manager.h
parent15fd1e375cd9c047cbad8d60798e9abdc4a64daa (diff)
Convert registered AMI actions to ao2 objects.
* Fixed race between calling an AMI action callback and unregistering that action. Refixes ASTERISK-13784 broken by ASTERISK-17785 change. * Fixed potential memory leak if an AMI action failed to get registered because is already was registered. Part of the ao2 conversion. * Fixed AMI ListCommands action not walking the actions list with a lock held. * Fix usage of ast_strdupa() and alloca() in loops. Excess stack usage. * Fix AMI Originate action Variable header requiring a space after the header colon. Reported by Yaroslav Panych on the asterisk-dev list. * Increased the number of listed variables allowed per AMI Originate action Variable header to 64. * Fixed AMI GetConfigJSON action output format. * Fixed usage of res contents outside of scope in append_channel_vars(). * Fixed inconsistency of config file channelvars option. The values no longer accumulate with every channelvars option in the config file. Only the last value is kept to be consistent with the CLI "manager show settings" command. (closes issue ASTERISK-18479) Reported by: Jaco Kroon ........ Merged revisions 340279 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 340281 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@340282 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk/manager.h')
-rw-r--r--include/asterisk/manager.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/asterisk/manager.h b/include/asterisk/manager.h
index 12da11b44..eaf48cecf 100644
--- a/include/asterisk/manager.h
+++ b/include/asterisk/manager.h
@@ -152,6 +152,13 @@ struct manager_action {
enum ast_doc_src docsrc;
/*! For easy linking */
AST_RWLIST_ENTRY(manager_action) list;
+ /*!
+ * \brief TRUE if the AMI action is registered and the callback can be called.
+ *
+ * \note Needed to prevent a race between calling the callback
+ * function and unregestring the AMI action object.
+ */
+ unsigned int registered:1;
};
/*! \brief External routines may register/unregister manager callbacks this way