]> git.ipfire.org Git - thirdparty/asterisk.git/commit
Merged revisions 187421,187424 via svnmerge from
authorMark Michelson <mmichelson@digium.com>
Thu, 9 Apr 2009 17:43:20 +0000 (17:43 +0000)
committerMark Michelson <mmichelson@digium.com>
Thu, 9 Apr 2009 17:43:20 +0000 (17:43 +0000)
commitb8318ad0403046a0587303f712f392f713ed884f
tree3b8367e17c32d4e0bad7cb485407780186bb8e52
parentc6ce9b1560328f09eeb81cba0919ca6692220032
Merged revisions 187421,187424 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r187421 | mmichelson | 2009-04-09 12:30:39 -0500 (Thu, 09 Apr 2009) | 21 lines

  Fix a crash in res_musiconhold when using cached realtime moh.

  The moh_register function links an mohclass and then immediately
  unrefs the class since the container now has a reference. The problem
  with using realtime music on hold is that the class is allocated,
  registered, and started in one fell swoop. The refcounting logic
  resulted in the count being off by one. The same problem did not
  happen when using a static config because the allocation and registration
  of an mohclass is a separate operation from starting moh. This also did
  not affect non-cached realtime moh because the classes are not registered
  at all.

  I also have modified res_musiconhold to use the _t_ variants of the ao2_
  functions so that more info can be gleaned when attempting to trace the
  refcounts. I found this to be incredibly helpful for debugging this issue
  and there's no good reason to remove it.

  (closes issue #14661)
  Reported by: sum
........
  r187424 | mmichelson | 2009-04-09 12:34:39 -0500 (Thu, 09 Apr 2009) | 3 lines

  Use safe macro practices even though they really aren't necessary.
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@187427 65c4cc65-6c06-0410-ace0-fbb531ad65f3
res/res_musiconhold.c