aboutsummaryrefslogtreecommitdiffstats
path: root/main/rtp.c
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-08-06 15:58:40 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-08-06 15:58:40 +0000
commit5a4712d2891183d986d051735b568a3e4f9a416c (patch)
tree707ddddd07cbc47f00ce2e7a5da00ef6206a7001 /main/rtp.c
parent44ebcf17bcde54e7fa45f7528ccdabb3d389dd1d (diff)
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
Diffstat (limited to 'main/rtp.c')
-rw-r--r--main/rtp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/main/rtp.c b/main/rtp.c
index 14d8aafcd..bbdb9d649 100644
--- a/main/rtp.c
+++ b/main/rtp.c
@@ -2000,7 +2000,9 @@ int ast_rtp_settos(struct ast_rtp *rtp, int tos)
void ast_rtp_new_source(struct ast_rtp *rtp)
{
- rtp->set_marker_bit = 1;
+ if (rtp) {
+ rtp->set_marker_bit = 1;
+ }
return;
}