[svn-commits] mmichelson: branch 1.4 r136062 - in /branches/1.4: channels/ main/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Aug 6 10:58:41 CDT 2008


Author: mmichelson
Date: Wed Aug  6 10:58:40 2008
New Revision: 136062

URL: http://svn.digium.com/view/asterisk?view=rev&rev=136062
Log:
Since adding the AST_CONTROL_SRCUPDATE frame type,
there are places where ast_rtp_new_source may be called
where the tech_pvt of a channel may not yet have an
rtp structure allocated. This caused a crash in chan_skinny,
which was fixed earlier, but now the same crash has been 
reported against chan_h323 as well. It seems that the best 
solution is to modify ast_rtp_new_source to not attempt to 
set the marker bit if the rtp structure passed in is NULL.

This change to ast_rtp_new_source also allows the removal
of what is now a redundant pointer check from chan_skinny.

(closes issue #13247)
Reported by: pj


Modified:
    branches/1.4/channels/chan_skinny.c
    branches/1.4/main/rtp.c

Modified: branches/1.4/channels/chan_skinny.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_skinny.c?view=diff&rev=136062&r1=136061&r2=136062
==============================================================================
--- branches/1.4/channels/chan_skinny.c (original)
+++ branches/1.4/channels/chan_skinny.c Wed Aug  6 10:58:40 2008
@@ -2868,9 +2868,7 @@
 	case AST_CONTROL_PROCEEDING:
 		break;
 	case AST_CONTROL_SRCUPDATE:
-		if (sub->rtp) {
-			ast_rtp_new_source(sub->rtp);
-		}
+		ast_rtp_new_source(sub->rtp);
 		break;
 	default:
 		ast_log(LOG_WARNING, "Don't know how to indicate condition %d\n", ind);

Modified: branches/1.4/main/rtp.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/rtp.c?view=diff&rev=136062&r1=136061&r2=136062
==============================================================================
--- branches/1.4/main/rtp.c (original)
+++ branches/1.4/main/rtp.c Wed Aug  6 10:58:40 2008
@@ -2000,7 +2000,9 @@
 
 void ast_rtp_new_source(struct ast_rtp *rtp)
 {
-	rtp->set_marker_bit = 1;
+	if (rtp) {
+		rtp->set_marker_bit = 1;
+	}
 	return;
 }
 




More information about the svn-commits mailing list