aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-02-22 00:57:36 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-02-22 00:57:36 +0000
commit2c9f09970b0ce9c29608a1fb9b9d9a8ea14efcb6 (patch)
tree239369e1d0f22d740ee0877157c64b058ef4f2b5 /channels
parent8e891d437a0ccb35b4175830f3ac9656b6dcadc5 (diff)
Merged revisions 56010 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r56010 | russell | 2007-02-21 18:53:25 -0600 (Wed, 21 Feb 2007) | 3 lines If we receive a frame that is not in any of the negotiated formats, then drop it. (potentially issue #8781 and SPD-12) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@56011 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index e27497608..77861078d 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -4078,6 +4078,13 @@ static struct ast_frame *sip_rtp_read(struct ast_channel *ast, struct sip_pvt *p
/* We already hold the channel lock */
if (f->frametype == AST_FRAME_VOICE) {
if (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",
+ ast_getformatname(f->subclass), p->owner->name);
+ }
+ return &ast_null_frame;
+ }
if (option_debug)
ast_log(LOG_DEBUG, "Oooh, format changed to %d\n", f->subclass);
p->owner->nativeformats = (p->owner->nativeformats & AST_FORMAT_VIDEO_MASK) | f->subclass;