[asterisk-commits] russell: trunk r53431 - in /trunk: ./ main/rtp.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Wed Feb 7 10:46:43 MST 2007
Author: russell
Date: Wed Feb 7 11:46:42 2007
New Revision: 53431
URL: http://svn.digium.com/view/asterisk?view=rev&rev=53431
Log:
Merged revisions 53429 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r53429 | russell | 2007-02-07 11:39:31 -0600 (Wed, 07 Feb 2007) | 7 lines
When parsing the NTP timestamp in a sender report message, you are supposed to
take the low 16 bits of the integer part, and the high 16 bits of the
fractional part. However, the code here was erroneously taking the low 16 bits
of the fractional part. It then shifted the result 16 bits down, so the result
was always zero. This fix makes it grab the appropriate high 16 bits, instead.
(issue #8991, pointed out by andre_abrantes)
........
Modified:
trunk/ (props changed)
trunk/main/rtp.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Modified: trunk/main/rtp.c
URL: http://svn.digium.com/view/asterisk/trunk/main/rtp.c?view=diff&rev=53431&r1=53430&r2=53431
==============================================================================
--- trunk/main/rtp.c (original)
+++ trunk/main/rtp.c Wed Feb 7 11:46:42 2007
@@ -966,7 +966,7 @@
gettimeofday(&rtp->rtcp->rxlsr,NULL); /* To be able to populate the dlsr */
rtp->rtcp->spc = ntohl(rtcpheader[i+3]);
rtp->rtcp->soc = ntohl(rtcpheader[i + 4]);
- rtp->rtcp->themrxlsr = ((ntohl(rtcpheader[i]) & 0x0000ffff) << 16) | ((ntohl(rtcpheader[i + 1]) & 0xffff) >> 16); /* Going to LSR in RR*/
+ rtp->rtcp->themrxlsr = ((ntohl(rtcpheader[i]) & 0x0000ffff) << 16) | ((ntohl(rtcpheader[i + 1]) & 0xffff0000) >> 16); /* Going to LSR in RR*/
if (rtcp_debug_test_addr(&sin)) {
ast_verbose("NTP timestamp: %lu.%010lu\n", (unsigned long) ntohl(rtcpheader[i]), (unsigned long) ntohl(rtcpheader[i + 1]) * 4096);
More information about the asterisk-commits
mailing list