linphone-developers
[Top][All Lists]
Advanced

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

Re: [Linphone-developers] oRTP bug + patch: endian problem for RTCP's cu


From: Simon Morlat
Subject: Re: [Linphone-developers] oRTP bug + patch: endian problem for RTCP's cum_num_packet_lost
Date: Mon, 25 Jul 2005 18:18:13 +0200
User-agent: KMail/1.7.2

Hello,

I've just merged your patch but with the hton24 and noth24 macros as you 
suggested.
Thanks a lot,

Simon

Le Mercredi 13 Juillet 2005 23:08, Nicola Baldo a écrit :
> Hi all,
>
> I've found a bug in oRTP: both at transmission and reception of RTCP
> packets, the value of the field cum_num_packet_lost is messed up by the
> use of htonl() and ntohl() macros. The problem is that these macros are
> for 32 bit values, while the cum_num_packet_lost is only 24 bits. The
> bug is subtle, you can only notice it by having linphone running on a
> lossy link and noting that cum_num_packet_lost remains zero even if
> there are losses reported within the fraction_lost field.
>
> I've attached a patch to the current cvs version. It fixes the problem,
> however to be honest it is definitely bad style code (i.e. some
> hand-made conversions in rtcp.c and rtcpparse.c within a "#ifdef
> WORDS_BIGENDIAN" statement).
> It would be nicer to have some hton24() and ntoh24() macro defined
> somewhere else. Anyway, I hope this helps...
>
> Regards,
>
> Nicola




reply via email to

[Prev in Thread] Current Thread [Next in Thread]