[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Ccrtp-devel] Bugreport: switched members in RTCPSenderInfo
From: |
Mattias Seeman |
Subject: |
[Ccrtp-devel] Bugreport: switched members in RTCPSenderInfo |
Date: |
Tue, 13 Nov 2007 01:11:28 +0100 |
User-agent: |
RoundCube Webmail/0.1-rc1 |
Hi all,
I found a bug in ccrtp-1.5.2 in the class RTCPSenderInfo:
The fields packetCount and octetCount are switched in the access methods. I
haven't actually used them for anything but a packetCount much higher than
the octetCount must clearly be wrong.
--- ccrtp-1.5.2/src/ccrtp/rtcppkt.h 2007-09-26 15:54:30.000000000 +0200
+++ ccrtp-1.5.2-patched/src/ccrtp/rtcppkt.h 2007-11-13 00:59:45.000000000
+0100
@@ -483,11 +488,11 @@
**/
inline uint32
getPacketCount() const
- { return ntohl(senderInfo.octetCount); }
+ { return ntohl(senderInfo.packetCount); }
inline uint32
getOctetCount() const
- { return ntohl(senderInfo.packetCount); }
+ { return ntohl(senderInfo.octetCount); }
private:
RTCPCompoundHandler::SenderInfo senderInfo;
Also, without going into detail, the constructor RTCPSenderInfo(void* si)
messes up the SenderInfo struct for me. Using the following patch solves
the problem for me.
--- ccrtp-1.5.2/src/ccrtp/rtcppkt.h 2007-09-26 15:54:30.000000000 +0200
+++ ccrtp-1.5.2-patched/src/ccrtp/rtcppkt.h 2007-11-13 00:59:45.000000000
+0100
@@ -454,7 +454,12 @@
RTCPSenderInfo(void* si)
{ memcpy(&senderInfo,&si,
sizeof(RTCPCompoundHandler::SenderInfo));}
-
+
+ RTCPSenderInfo(RTCPCompoundHandler::SenderInfo& si)
+ : senderInfo( si )
+ {
+ }
+
~RTCPSenderInfo()
{ }
kr,
\Mattias Seeman
- [Ccrtp-devel] Bugreport: switched members in RTCPSenderInfo,
Mattias Seeman <=