mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-07 22:05:25 +00:00
Reduce channel snapshot creation and publishing by up to 50%.
This change introduces the ability to stage channel snapshot creation and publishing by suppressing the implicit creation and publishing that some functions have. Once all operations are executed the staging is marked as done and a single snapshot is created and published. Review: https://reviewboard.asterisk.org/r/2889/ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@400265 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -923,6 +923,11 @@ enum {
|
||||
* occur.
|
||||
*/
|
||||
AST_FLAG_DEAD = (1 << 24),
|
||||
/*!
|
||||
* Channel snapshot should not be published, it is being staged for an explicit
|
||||
* publish.
|
||||
*/
|
||||
AST_FLAG_SNAPSHOT_STAGE = (1 << 25),
|
||||
};
|
||||
|
||||
/*! \brief ast_bridge_config flags */
|
||||
|
@@ -314,6 +314,22 @@ void ast_multi_channel_blob_add_channel(struct ast_multi_channel_blob *obj,
|
||||
void ast_channel_publish_blob(struct ast_channel *chan, struct stasis_message_type *type,
|
||||
struct ast_json *blob);
|
||||
|
||||
/*!
|
||||
* \since 12
|
||||
* \brief Set flag to indicate channel snapshot is being staged.
|
||||
*
|
||||
* \param chan Channel being staged.
|
||||
*/
|
||||
void ast_channel_stage_snapshot(struct ast_channel *chan);
|
||||
|
||||
/*!
|
||||
* \since 12
|
||||
* \brief Clear flag to indicate channel snapshot is being staged, and publish snapshot.
|
||||
*
|
||||
* \param chan Channel being staged.
|
||||
*/
|
||||
void ast_channel_stage_snapshot_done(struct ast_channel *chan);
|
||||
|
||||
/*!
|
||||
* \since 12
|
||||
* \brief Publish a \ref ast_channel_snapshot for a channel.
|
||||
|
Reference in New Issue
Block a user