mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 12:16:00 +00:00
Pass through a frame if we don't know what it is, rather than trying to pass a
NULL, which will segfault a channel driver (Bug 8149) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@46078 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -2611,7 +2611,10 @@ int ast_write(struct ast_channel *chan, struct ast_frame *fr)
|
|||||||
res = 0;
|
res = 0;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
res = chan->tech->write(chan, f);
|
/* At this point, fr is the incoming frame and f is NULL. Channels do
|
||||||
|
* not expect to get NULL as a frame pointer and will segfault. Hence,
|
||||||
|
* we output the original frame passed in. */
|
||||||
|
res = chan->tech->write(chan, fr);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user