diff options
author | Joshua Colp <jcolp@digium.com> | 2013-06-05 14:50:46 +0000 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2013-06-05 14:50:46 +0000 |
commit | fb6344e2492c87e90644f63380932b9fa6536fb0 (patch) | |
tree | d82a45ebd85727d90fe8ec724d07d13779108c24 /main/channel.c | |
parent | f574a76e3ed5ab003f833a47c623c5e3bdd70d41 (diff) |
Publish the channel state snapshot *before* calling device state so a device state producer can use
an up to date snapshot.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390473 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/channel.c')
-rw-r--r-- | main/channel.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/main/channel.c b/main/channel.c index 1c2d6bf57..62856d43a 100644 --- a/main/channel.c +++ b/main/channel.c @@ -7308,13 +7308,13 @@ int ast_setstate(struct ast_channel *chan, enum ast_channel_state state) 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; } |