[asterisk-commits] russell: branch 1.2 r56010 -
/branches/1.2/channels/chan_sip.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Wed Feb 21 17:53:26 MST 2007
Author: russell
Date: Wed Feb 21 18:53:25 2007
New Revision: 56010
URL: http://svn.digium.com/view/asterisk?view=rev&rev=56010
Log:
If we receive a frame that is not in any of the negotiated formats, then drop
it. (potentially issue #8781 and SPD-12)
Modified:
branches/1.2/channels/chan_sip.c
Modified: branches/1.2/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/channels/chan_sip.c?view=diff&rev=56010&r1=56009&r2=56010
==============================================================================
--- branches/1.2/channels/chan_sip.c (original)
+++ branches/1.2/channels/chan_sip.c Wed Feb 21 18:53:25 2007
@@ -3043,6 +3043,11 @@
/* We already hold the channel lock */
if (f->frametype == AST_FRAME_VOICE) {
if (f->subclass != p->owner->nativeformats) {
+ if (!(f->subclass & p->jointcapability)) {
+ ast_log(LOG_DEBUG, "Bogus frame of format '%s' received from '%s'!\n",
+ ast_getformatname(f->subclass), p->owner->name);
+ return &null_frame;
+ }
ast_log(LOG_DEBUG, "Oooh, format changed to %d\n", f->subclass);
p->owner->nativeformats = f->subclass;
ast_set_read_format(p->owner, p->owner->readformat);
More information about the asterisk-commits
mailing list