* I think I finally caught that bug where the test environment crashed
so frequently when unflattening R5 messages (each mouse event arrives as an R5 message in the test environment): unflatten_r5_message() retrieved the pointer to the message header, but afterwards cleared the message... resulting in the header pointer to be invalid. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19412 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
489caaef82
commit
ab12785c61
@ -6,11 +6,12 @@
|
||||
* Michael Lotz <mmlr@mlotz.ch>
|
||||
*/
|
||||
|
||||
#include "r5_message.h"
|
||||
|
||||
#include <DataIO.h>
|
||||
#include <MessagePrivate.h>
|
||||
#include <MessageUtils.h>
|
||||
#include <TokenSpace.h>
|
||||
#include "r5_message.h"
|
||||
|
||||
#define R5_MESSAGE_FLAG_VALID 0x01
|
||||
#define R5_MESSAGE_FLAG_INCLUDE_TARGET 0x02
|
||||
@ -298,9 +299,6 @@ unflatten_r5_message(uint32 format, BMessage *message, BDataIO *stream)
|
||||
reader(((uint8 *)&r5header) + sizeof(uint32),
|
||||
sizeof(r5header) - sizeof(uint32));
|
||||
|
||||
messagePrivate.Clear();
|
||||
messagePrivate.InitHeader();
|
||||
|
||||
header->what = message->what = r5header.what;
|
||||
if (r5header.flags & R5_MESSAGE_FLAG_INCLUDE_TARGET)
|
||||
reader(header->target);
|
||||
|
@ -9,7 +9,7 @@
|
||||
#define _R5_MESSAGE_H_
|
||||
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <SupportDefs.h>
|
||||
|
||||
class BMessage;
|
||||
class BDataIO;
|
||||
|
Loading…
Reference in New Issue
Block a user