]> git.ipfire.org Git - thirdparty/asterisk.git/commit
Fix a CEL LINKEDID_END race and local channel linkedids
authorTerry Wilson <twilson@digium.com>
Wed, 2 May 2012 15:49:03 +0000 (15:49 +0000)
committerTerry Wilson <twilson@digium.com>
Wed, 2 May 2012 15:49:03 +0000 (15:49 +0000)
commit7da21c68c4d850e90ef8019238ac4b50eb8cf544
treed8d1961cd0ff56250914ae8fab8af0688b376ae1
parenta11540c95b09d4254c88bb1ffd2d9f4a9dc29fc6
Fix a CEL LINKEDID_END race and local channel linkedids

This patch has the ;2 channel inherit the linkedid of the ;1 channel and fixes
the race condition by no longer scanning the channel list for "other" channels
with the same linkedid. Instead, cel.c has an ao2 container of linkedid strings
and uses the refcount of the string as a counter of how many channels with the
linkedid exist. Not only does this eliminate the race condition, but it also
allows us to look up the linkedid by the hashed key instead of traversing the
entire channel list.

Review: https://reviewboard.asterisk.org/r/1895/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@365006 65c4cc65-6c06-0410-ace0-fbb531ad65f3
channels/chan_local.c
main/cel.c