[asterisk-commits] mjordan: trunk r416301 - in /trunk: ./ main/channel_internal_api.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sun Jun 15 17:12:53 CDT 2014


Author: mjordan
Date: Sun Jun 15 17:12:49 2014
New Revision: 416301

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=416301
Log:
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

Modified:
    trunk/   (props changed)
    trunk/main/channel_internal_api.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-12-merged' - no diff available.

Modified: trunk/main/channel_internal_api.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/channel_internal_api.c?view=diff&rev=416301&r1=416300&r2=416301
==============================================================================
--- trunk/main/channel_internal_api.c (original)
+++ trunk/main/channel_internal_api.c Sun Jun 15 17:12:49 2014
@@ -57,7 +57,7 @@
 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 @@
 
 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)




More information about the asterisk-commits mailing list