From 5b8358b4d5917491093a04bddc867559b63bf52f Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Thu, 10 Jan 2008 15:22:55 +0000 Subject: [PATCH] I forgot to commit PeerConnection.h 2008-01-10 Tatsuhiro Tsujikawa Fixed the bug that EX_TOO_LONG_PAYLOAD exception is thrown if just payload length(4bytes) are received. This happens because lenbufLength is not updated in this particular case and successive call of receiveMessage() overwrites payload length with bytes recieved which are payload body. * src/PeerConnection.{h, cc} * src/message.h --- ChangeLog | 2 +- src/PeerConnection.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 50b506ce..3f99f190 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,7 +5,7 @@ is not updated in this particular case and successive call of receiveMessage() overwrites payload length with bytes recieved which are payload body. - * src/PeerConnection.cc + * src/PeerConnection.{h, cc} * src/message.h 2008-01-10 Tatsuhiro Tsujikawa diff --git a/src/PeerConnection.h b/src/PeerConnection.h index 6cf5dbf2..d64b6f9e 100644 --- a/src/PeerConnection.h +++ b/src/PeerConnection.h @@ -54,7 +54,7 @@ private: char resbuf[MAX_PAYLOAD_LEN]; int32_t resbufLength; int32_t currentPayloadLength; - unsigned char lenbuf[4]; + char lenbuf[4]; int32_t lenbufLength; public: