face: Fixing a silly bug with m_inputBufferSize being uninitialized in StreamFace
Change-Id: Ie607b11e217f6c31e8f1b6214c7a5020470bee49
diff --git a/daemon/face/stream-face.hpp b/daemon/face/stream-face.hpp
index 65ca82e..a659373 100644
--- a/daemon/face/stream-face.hpp
+++ b/daemon/face/stream-face.hpp
@@ -53,10 +53,6 @@
private:
uint8_t m_inputBuffer[MAX_NDN_PACKET_SIZE];
std::size_t m_inputBufferSize;
-
-#ifdef _DEBUG
- typename protocol::endpoint m_localEndpoint;
-#endif
NFD_LOG_INCLASS_DECLARE();
};
@@ -68,6 +64,7 @@
inline
StreamFace<T>::StreamFace(const shared_ptr<typename StreamFace::protocol::socket>& socket)
: m_socket(socket)
+ , m_inputBufferSize(0)
{
m_socket->async_receive(boost::asio::buffer(m_inputBuffer, MAX_NDN_PACKET_SIZE), 0,
bind(&StreamFace<T>::handleReceive, this, _1, _2));