management: Making LocalControlHeader encoding independent of Interest/Data wire
Boost.Asio support multi-buffer send operation, which is enabled in this
commit for prepending (potentially different) LocalControlHeader's to
Interest/Data wire.
Change-Id: I39b979f89f196d3e47d6466fb71f6d440bce74d4
refs: #1265
diff --git a/src/data.hpp b/src/data.hpp
index 508c332..5130b03 100644
--- a/src/data.hpp
+++ b/src/data.hpp
@@ -280,7 +280,7 @@
EncodingEstimator estimator;
size_t estimatedSize = wireEncode(estimator);
- EncodingBuffer buffer(estimatedSize + nfd::ESTIMATED_LOCAL_HEADER_RESERVE, 0);
+ EncodingBuffer buffer(estimatedSize, 0);
wireEncode(buffer);
const_cast<Data*>(this)->wireDecode(buffer.block());
@@ -479,6 +479,7 @@
Data::setIncomingFaceId(uint64_t incomingFaceId)
{
getLocalControlHeader().setIncomingFaceId(incomingFaceId);
+ // ! do not reset Data's wire !
}
inline void