From cf707fa447742be93cc079c891be37a8055ff42e Mon Sep 17 00:00:00 2001
From: Mikael Djurfeldt <mikael@djurfeldt.com>
Date: Mon, 29 Feb 2016 17:18:05 +0100
Subject: [PATCH] Clear message buffer directly when sending

---
 src/connector.cc    | 2 --
 src/subconnector.cc | 2 +-
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/connector.cc b/src/connector.cc
index ac6af7e..7743adc 100644
--- a/src/connector.cc
+++ b/src/connector.cc
@@ -813,8 +813,6 @@ error( "LOCAL Indices are not supported with MUSIC_ANYSOURCE");
   void
   MessageOutputConnector::postCommunication ()
   {
-    //   if (synch.communicate ())
-    buffer.clear ();
   }
 
   
diff --git a/src/subconnector.cc b/src/subconnector.cc
index 3b28c0b..c134088 100644
--- a/src/subconnector.cc
+++ b/src/subconnector.cc
@@ -596,7 +596,7 @@ namespace MUSIC {
   {
     void* data;
     int size;
-    buffer_->nextBlockNoClear (data, size);
+    buffer_->nextBlock (data, size);
     // NOTE: marshalling
     char* buffer = static_cast <char*> (data);
     while (size >= MESSAGE_BUFFER_MAX)
-- 
GitLab