Bug in rtcp.c ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

there seems to be a bug in "rtcp.c". The rtt-time was faulty at some point and 
a few times, when enabling the trace in rtcp.c, I got "Internal RTCP NTP clock skew detected"-failures (time now < time of lsr). 

In my understanding the problem is in pjmedia_rtcp_get_ntp_time:

??? /* Calculate seconds fractions */
??? ts.u64 %= sess->ts_freq.u64;
??? pj_assert(ts.u64 < sess->ts_freq.u64);
??? ts.u64 = (ts.u64 << 32) / sess->ts_freq.u64;

When calculating ntp->hi, this is done hooked on its base (ts.u64 - sess->ts_base.u64).
I think this should also be done when calculating the fractions.

??? /* Calculate seconds fractions */
??? ts.u64 = (ts.u64 - sess->ts_base.u64) % sess->ts_freq.u64;
??? pj_assert(ts.u64 < sess->ts_freq.u64);
??? ts.u64 = (ts.u64 << 32) / sess->ts_freq.u64;

Worked fine for me. No more clock skews and noticeable rtt-time failures.

Cheers
Guido


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20081215/5628a5bb/attachment.html>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux