[asterisk-commits] file: trunk r390473 - /trunk/main/channel.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jun 5 09:50:48 CDT 2013


Author: file
Date: Wed Jun  5 09:50:46 2013
New Revision: 390473

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=390473
Log:
Publish the channel state snapshot *before* calling device state so a device state producer can use
an up to date snapshot.

Modified:
    trunk/main/channel.c

Modified: trunk/main/channel.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/channel.c?view=diff&rev=390473&r1=390472&r2=390473
==============================================================================
--- trunk/main/channel.c (original)
+++ trunk/main/channel.c Wed Jun  5 09:50:46 2013
@@ -7308,12 +7308,12 @@
 
 	ast_channel_state_set(chan, state);
 
+	ast_publish_channel_state(chan);
+
 	/* We have to pass AST_DEVICE_UNKNOWN here because it is entirely possible that the channel driver
 	 * for this channel is using the callback method for device state. If we pass in an actual state here
 	 * we override what they are saying the state is and things go amuck. */
 	ast_devstate_changed_literal(AST_DEVICE_UNKNOWN, (ast_test_flag(ast_channel_flags(chan), AST_FLAG_DISABLE_DEVSTATE_CACHE) ? AST_DEVSTATE_NOT_CACHABLE : AST_DEVSTATE_CACHABLE), name);
-
-	ast_publish_channel_state(chan);
 
 	return 0;
 }




More information about the asterisk-commits mailing list