From 5a4712d2891183d986d051735b568a3e4f9a416c Mon Sep 17 00:00:00 2001 From: mmichelson Date: Wed, 6 Aug 2008 15:58:40 +0000 Subject: 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 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@136062 f38db490-d61c-443f-a65b-d21fe96a405b --- channels/chan_skinny.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'channels') diff --git a/channels/chan_skinny.c b/channels/chan_skinny.c index 80ce09201..51b1839d5 100644 --- a/channels/chan_skinny.c +++ b/channels/chan_skinny.c @@ -2868,9 +2868,7 @@ static int skinny_indicate(struct ast_channel *ast, int ind, const void *data, s 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); -- cgit v1.2.3