channel_internal_api.c: Replace some code with ao2_replace().
authorRichard Mudgett <rmudgett@digium.com>
Thu, 14 Aug 2014 16:01:39 +0000 (16:01 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Thu, 14 Aug 2014 16:01:39 +0000 (16:01 +0000)
commite4b32731b910cdbcc1f9de49dbc8b5fe34d938a5
treee5c4d9f9090b1dc6b2120d21f4af2e12dd4ef7b3
parentdd41d0ff01097dda0fcade4a22e989de5f1b5619
channel_internal_api.c: Replace some code with ao2_replace().

Use ao2_replace() instead of ao2_cleanup(); ao2_bump().

ao2_replace() has the advantange of not altering the ref count if the
replaced pointer is the same.

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

Merged revisions 420992 from http://svn.asterisk.org/svn/asterisk/branches/13

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