[asterisk-commits] mmichelson: trunk r136063 - in /trunk: ./ channels/chan_skinny.c main/rtp.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Aug 6 10:59:29 CDT 2008


Author: mmichelson
Date: Wed Aug  6 10:59:29 2008
New Revision: 136063

URL: http://svn.digium.com/view/asterisk?view=rev&rev=136063
Log:
Merged revisions 136062 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r136062 | mmichelson | 2008-08-06 10:58:40 -0500 (Wed, 06 Aug 2008) | 16 lines

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:
    trunk/   (props changed)
    trunk/channels/chan_skinny.c
    trunk/main/rtp.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/channels/chan_skinny.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_skinny.c?view=diff&rev=136063&r1=136062&r2=136063
==============================================================================
--- trunk/channels/chan_skinny.c (original)
+++ trunk/channels/chan_skinny.c Wed Aug  6 10:59:29 2008
@@ -3909,9 +3909,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: trunk/main/rtp.c
URL: http://svn.digium.com/view/asterisk/trunk/main/rtp.c?view=diff&rev=136063&r1=136062&r2=136063
==============================================================================
--- trunk/main/rtp.c (original)
+++ trunk/main/rtp.c Wed Aug  6 10:59:29 2008
@@ -2537,7 +2537,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 asterisk-commits mailing list