mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-02 19:16:15 +00:00
channel_internal_api: Publish a snapshot change when linkedids change
Snapshots are now not published *quite* as much as they used to. One instance where they are not published any longer is during bridge enter and exit - the state of the channel doesn't change, the bridge does. However, channels are changed when a linkedid is propagated; previously, the channel's state would be updated and published during the bridge enter event. Now this must be explicitly done. ........ Merged revisions 416300 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@416301 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -57,7 +57,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||
struct ast_channel_id {
|
||||
time_t creation_time; /*!< Creation time */
|
||||
int creation_unique; /*!< sub-second unique value */
|
||||
char unique_id[AST_MAX_UNIQUEID]; /*< Unique Identifier */
|
||||
char unique_id[AST_MAX_UNIQUEID]; /*!< Unique Identifier */
|
||||
};
|
||||
|
||||
/*!
|
||||
@@ -1463,7 +1463,13 @@ struct ast_channel *ast_channel_internal_oldest_linkedid(struct ast_channel *a,
|
||||
|
||||
void ast_channel_internal_copy_linkedid(struct ast_channel *dest, struct ast_channel *source)
|
||||
{
|
||||
if (dest->linkedid.creation_time == source->linkedid.creation_time
|
||||
&& dest->linkedid.creation_unique == source->linkedid.creation_unique
|
||||
&& !strcmp(dest->linkedid.unique_id, source->linkedid.unique_id)) {
|
||||
return;
|
||||
}
|
||||
dest->linkedid = source->linkedid;
|
||||
ast_channel_publish_snapshot(dest);
|
||||
}
|
||||
|
||||
void ast_channel_internal_swap_uniqueid_and_linkedid(struct ast_channel *a, struct ast_channel *b)
|
||||
|
Reference in New Issue
Block a user