Merged revisions 322749 via svnmerge from
authorRichard Mudgett <rmudgett@digium.com>
Thu, 9 Jun 2011 16:47:07 +0000 (16:47 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Thu, 9 Jun 2011 16:47:07 +0000 (16:47 +0000)
commit0a8f9d2cf0872be7ffc623066c4220de3bdfb97c
tree6132cd6991a104993a524ca957535c1f880b5bc8
parentf0deadaf6088889b24748144f64b2a493c8fd071
Merged revisions 322749 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r322749 | rmudgett | 2011-06-09 11:31:53 -0500 (Thu, 09 Jun 2011) | 15 lines

  Remove potential deadlock in call pickup race.

  Deadlock is possible in ast_do_pickup() when holding the target channel
  lock and trying to get the chan channel lock.  Also, holding the target
  lock when calling ast_channel_masquerade() is not a good idea because that
  routine does deadlock avoidance.

  * Removed the need to hold the target lock after marking the target with a
  datastore and getting the connected line data off of the target channel.

  * Moved can_pickup() to ast_can_pickup() in features.c.  Now all the call
  pickup methods use the same basic call pickup availability check.

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@322750 65c4cc65-6c06-0410-ace0-fbb531ad65f3
apps/app_directed_pickup.c
include/asterisk/features.h
main/features.c