diff options
author | Matthew Jordan <mjordan@digium.com> | 2014-06-15 22:12:49 +0000 |
---|---|---|
committer | Matthew Jordan <mjordan@digium.com> | 2014-06-15 22:12:49 +0000 |
commit | 072b61bbede22e2cb4424a29c9c60c707671fc54 (patch) | |
tree | 2679fa0aa0268907821d48350c38abdfc2313569 /main/channel_internal_api.c | |
parent | 705d0c3e819ae6c41b81f3776ad21f524396d17b (diff) |
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
Diffstat (limited to 'main/channel_internal_api.c')
-rw-r--r-- | main/channel_internal_api.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/main/channel_internal_api.c b/main/channel_internal_api.c index 0c5117e6d..c2dc2d737 100644 --- a/main/channel_internal_api.c +++ b/main/channel_internal_api.c @@ -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) |