aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-05-31 16:18:14 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-05-31 16:18:14 +0000
commitefb9fda1000fd8c33fe3a4a41c238391ee222042 (patch)
tree284a431c483326c0247742def3b52610d075df90 /channels
parent8f6dcc6b3f1ec3d156f51afa76eae4ec13a7a321 (diff)
Merged revisions 66768 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r66768 | file | 2007-05-31 12:14:48 -0400 (Thu, 31 May 2007) | 10 lines Merged revisions 66764 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r66764 | file | 2007-05-31 12:12:39 -0400 (Thu, 31 May 2007) | 2 lines It is now possible for this path of execution to have the frame pointer be NULL, therefore we need to check for it before trying to access it. (issue #9836 reported by barthpbx) ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@66769 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 3dbfb3fe8..ebec59f26 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -4547,10 +4547,10 @@ static struct ast_frame *sip_rtp_read(struct ast_channel *ast, struct sip_pvt *p
return &ast_null_frame;
/* We already hold the channel lock */
- if (!p->owner || f->frametype != AST_FRAME_VOICE)
+ if (!p->owner || (f && f->frametype != AST_FRAME_VOICE))
return f;
- if (f->subclass != (p->owner->nativeformats & AST_FORMAT_AUDIO_MASK)) {
+ if (f && f->subclass != (p->owner->nativeformats & AST_FORMAT_AUDIO_MASK)) {
if (!(f->subclass & p->jointcapability)) {
if (option_debug) {
ast_log(LOG_DEBUG, "Bogus frame of format '%s' received from '%s'!\n",
@@ -4565,7 +4565,7 @@ static struct ast_frame *sip_rtp_read(struct ast_channel *ast, struct sip_pvt *p
ast_set_write_format(p->owner, p->owner->writeformat);
}
- if ((ast_test_flag(&p->flags[0], SIP_DTMF) == SIP_DTMF_INBAND) && p->vad) {
+ if (f && (ast_test_flag(&p->flags[0], SIP_DTMF) == SIP_DTMF_INBAND) && p->vad) {
f = ast_dsp_process(p->owner, p->vad, f);
if (f && f->frametype == AST_FRAME_DTMF) {
if (ast_test_flag(&p->t38.t38support, SIP_PAGE2_T38SUPPORT_UDPTL) && f->subclass == 'f') {