]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
(closes issue #13835)
authorJeff Peeler <jpeeler@digium.com>
Thu, 4 Dec 2008 18:30:41 +0000 (18:30 +0000)
committerJeff Peeler <jpeeler@digium.com>
Thu, 4 Dec 2008 18:30:41 +0000 (18:30 +0000)
Reported by: matt_b
Tested by: jpeeler

This mirrors a check that was present in ast_rtp_read to also be in ast_rtp_raw_write to not schedule sending the receiver report if the remote RTCP endpoint address isn't present in the RTCP structure.

Closes AST-142.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@161013 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/rtp.c

index 31562e0d89a07f599a785b79bd13b13741c4f639..fa9da999a29454ca96c43531ca73b08fa802286e 100644 (file)
@@ -2694,8 +2694,10 @@ static int ast_rtp_raw_write(struct ast_rtp *rtp, struct ast_frame *f, int codec
                        rtp->txcount++;
                        rtp->txoctetcount +=(res - hdrlen);
                        
-                       if (rtp->rtcp && rtp->rtcp->schedid < 1) 
+                       /* Do not schedule RR if RTCP isn't run */
+                       if (rtp->rtcp && rtp->rtcp->them.sin_addr.s_addr && rtp->rtcp->schedid < 1) {
                            rtp->rtcp->schedid = ast_sched_add(rtp->sched, ast_rtcp_calc_interval(rtp), ast_rtcp_write, rtp);
+                       }
                }
                                
                if (rtp_debug_test_addr(&rtp->them))