Skip to content
Snippets Groups Projects
Commit d6289628 authored by John Romein's avatar John Romein
Browse files

bug 225:

Keep valgrind silent.
parent 1d441a52
No related branches found
No related tags found
No related merge requests found
......@@ -24,6 +24,7 @@
#include <StreamMultiplexer.h>
#include <cstring>
namespace LOFAR {
......@@ -66,6 +67,11 @@ StreamMultiplexer::StreamMultiplexer(Stream &stream)
StreamMultiplexer::~StreamMultiplexer()
{
RequestMsg msg;
#if defined USE_VALGRIND
memset(&msg, 0, sizeof msg);
#endif
msg.type = RequestMsg::STOP_REQ;
itsSendMutex.lock();
......@@ -78,6 +84,10 @@ void StreamMultiplexer::registerChannel(MultiplexedStream *stream, unsigned chan
{
RequestMsg msg;
#if defined USE_VALGRIND
memset(&msg, 0, sizeof msg);
#endif
msg.type = RequestMsg::REGISTER;
msg.reqPtr = &stream->itsRequest;
msg.size = channel; // FIXME: abuse size field
......@@ -120,6 +130,10 @@ size_t StreamMultiplexer::tryRead(MultiplexedStream *stream, void *ptr, size_t s
Semaphore recvFinished;
RequestMsg msg;
#if defined USE_VALGRIND
memset(&msg, 0, sizeof msg);
#endif
msg.type = RequestMsg::RECV_REQ;
msg.size = size;
msg.reqPtr = stream->itsPeerRequestAddr;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment