Actually the Message3 implementation was broken. It still is, because we lose one (but an important) byte somewhere when resizing the flat buffer. But at least the design flaws should be corrected with this commit. You can go ahead and review it Ingo.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13917 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Lotz
2005-08-09 05:49:13 +00:00
parent 3019039f4f
commit 90dc946130
5 changed files with 92 additions and 79 deletions
+3 -2
View File
@@ -12,7 +12,6 @@
#define _MESSAGE_BODY_H_
#include <List.h>
#include "MessageField3.h"
enum {
B_FLATTENABLE_TYPE = 'FLAT'
@@ -20,6 +19,8 @@ enum {
namespace BPrivate {
class BMessageField;
class BMessageBody {
public:
BMessageBody();
@@ -68,7 +69,7 @@ public:
void PrintToStream() const;
// flat buffer management
uint8 *FlatBuffer() const { return (uint8 *)fFlatBuffer.Buffer(); };
inline uint8 *FlatBuffer() const { return (uint8 *)fFlatBuffer.Buffer(); };
uint8 *FlatInsert(int32 offset, ssize_t oldLength,
ssize_t newLength);