mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
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
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user