mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-19 19:20:35 +00:00
Merged revisions 320796 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r320796 | rmudgett | 2011-05-25 11:23:11 -0500 (Wed, 25 May 2011) | 17 lines Give zombies a safe channel driver to use. Recent crashes from zombie channels suggests that they need a safe home to goto. When a masquerade happens, the physical part of the zombie channel is hungup. The hangup normally sets the channel private pointer to NULL. If someone then blindly does a callback to the channel driver, a crash is likely because the private pointer is NULL. The masquerade now sets the channel technology of zombie channels to the kill channel driver. Related to the following issues: (issue #19116) (issue #19310) Review: https://reviewboard.asterisk.org/r/1224/ ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@320820 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -307,8 +307,11 @@ int ast_format_cap_iscompatible(const struct ast_format_cap *cap, const struct a
|
||||
{
|
||||
struct ast_format *f;
|
||||
struct ast_format_cap *tmp_cap = (struct ast_format_cap *) cap;
|
||||
f = ao2_find(tmp_cap->formats, (struct ast_format *) format, OBJ_POINTER | tmp_cap->nolock);
|
||||
|
||||
if (!tmp_cap) {
|
||||
return 0;
|
||||
}
|
||||
f = ao2_find(tmp_cap->formats, (struct ast_format *) format, OBJ_POINTER | tmp_cap->nolock);
|
||||
if (f) {
|
||||
ao2_ref(f, -1);
|
||||
return 1;
|
||||
|
Reference in New Issue
Block a user