[asterisk-commits] mjordan: branch 12 r416300 - /branches/12/main/channel_internal_api.c

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


Author: mjordan
Date: Sun Jun 15 17:11:49 2014
New Revision: 416300

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

Modified:
    branches/12/main/channel_internal_api.c

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