ARI: Fix a crash caused by hanging during playback to a channel in a bridge

ASTERISK-24147 #close
Reported by: Edvin Vidmar
Review: https://reviewboard.asterisk.org/r/3908/
........

Merged revisions 421879 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 421880 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@421881 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Jonathan Rose
2014-08-22 16:52:51 +00:00
parent 1498ae0830
commit 33835e17a0
9 changed files with 113 additions and 68 deletions

View File

@@ -48,6 +48,19 @@
int stasis_app_exec(struct ast_channel *chan, const char *app_name, int argc,
char *argv[]);
/*!
* \brief Typedef for data destructor for stasis app commands
*
* \param data Data to destroy.
*
* \details
* This is called during destruction of the command or if we fail to schedule
* a command. It is passed a pointer to the user-defined data of the command.
*
* \return Nothing
*/
typedef void (*command_data_destructor_fn)(void *data);
/*! Callback type for stasis app commands */
typedef int (*stasis_app_command_cb)(struct stasis_app_control *control,
struct ast_channel *chan, void *data);
@@ -63,16 +76,19 @@ typedef int (*stasis_app_command_cb)(struct stasis_app_control *control,
* \param control Control object for the channel to send the command to.
* \param command Command function to execute.
* \param data Optional data to pass along with the control function.
* \param data_destructor Optional function which will be called on
* the data in either the event of command completion or failure
* to schedule or complete the command
*
* \return zero on success.
* \return error code otherwise.
*/
int stasis_app_send_command(struct stasis_app_control *control,
stasis_app_command_cb command, void *data);
stasis_app_command_cb command, void *data, command_data_destructor_fn data_destructor);
/*!
* \since 12
* \brief Asynchronous version of stasis_app_send().
* \brief Asynchronous version of stasis_app_send_command().
*
* This function enqueues a command for execution, but returns immediately
* without waiting for the response.
@@ -80,10 +96,13 @@ int stasis_app_send_command(struct stasis_app_control *control,
* \param control Control object for the channel to send the command to.
* \param command Command function to execute.
* \param data Optional data to pass along with the control function.
* \param data_destructor Optional function which will be called on
* the data in either the event of command completion or failure
* to schedule or complete the command
* \return 0 on success.
* \return Non-zero on error.
*/
int stasis_app_send_command_async(struct stasis_app_control *control,
stasis_app_command_cb command, void *data);
stasis_app_command_cb command, void *data, command_data_destructor_fn data_destructor);
#endif /* _ASTERISK_RES_STASIS_H */