Fixed a consistency problem with channel snapshot and endpoint state.
authorDavid M. Lee <dlee@digium.com>
Wed, 5 Jun 2013 14:47:30 +0000 (14:47 +0000)
committerDavid M. Lee <dlee@digium.com>
Wed, 5 Jun 2013 14:47:30 +0000 (14:47 +0000)
commitf574a76e3ed5ab003f833a47c623c5e3bdd70d41
treed2cf675c7d32ec73963e2117ffadac1a98978eeb
parent18338967c45ef00d8aad4528b9620b790bbaec07
Fixed a consistency problem with channel snapshot and endpoint state.

When channels are added to an endpoint, the code originally posted a channel
snapshot to the endoint's topic directly. Turns out, this is a bad idea.

This causes the endpoint to see an inconsistent view of the channel, since it
will later receive in-flight messages with old channel snapshots.

This patch instead just publishes channel state immediately after setting up
the forward to the endpoint's topic. This gives the endpoints a consistent
view of the channel's state.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390472 65c4cc65-6c06-0410-ace0-fbb531ad65f3
main/channel_internal_api.c