stasis_channels: Update the stasis cache if manager variables are needed
authorMatthew Jordan <mjordan@digium.com>
Wed, 18 Jun 2014 04:22:05 +0000 (04:22 +0000)
committerMatthew Jordan <mjordan@digium.com>
Wed, 18 Jun 2014 04:22:05 +0000 (04:22 +0000)
commita965613cf7eb65e9caf71d00614f00f9bda7c985
treed44eb17c08c42592537675909ff494b73844ea3d
parentfc52fd88847e9ff0dd3be7848be01ab757be97ac
stasis_channels: Update the stasis cache if manager variables are needed

In r416211, the publishing of variable changes was modified such that a
cached channel snapshot was used if manager variables were not requested
with each AMI event. This was done to reduce the amount of channel snapshots
created.

However, an assumption was made that generating a channel snapshot and
publishing the snapshot to the channel topic was sufficient to ensure that
the cache would be updated; this is not the case. The channel snapshot type
must be used to force a snapshot update.

This patch updates the publication of channel variables such that the cache
is updated prior to publication of the channel variable message if manager
variables are in use. This ensures that all AMI events receive the variable
update when they are supposed to.

Note that this issue was caught by the Asterisk Test Suite (go go testing)
........

Merged revisions 416557 from http://svn.asterisk.org/svn/asterisk/branches/12

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