Don't pass a Closure to the NDN constructor
diff --git a/ndn-cpp/NDN.cpp b/ndn-cpp/NDN.cpp
index 5a3d829..20609fe 100644
--- a/ndn-cpp/NDN.cpp
+++ b/ndn-cpp/NDN.cpp
@@ -18,6 +18,9 @@
vector<unsigned char> encoding;
interest.encode(encoding);
+ // TODO: This should go in the PIT.
+ tempClosure_ = closure;
+
transport_->connect(*this);
transport_->send(&encoding[0], encoding.size());
}
diff --git a/ndn-cpp/NDN.hpp b/ndn-cpp/NDN.hpp
index 4b8e961..8f6f7bb 100644
--- a/ndn-cpp/NDN.hpp
+++ b/ndn-cpp/NDN.hpp
@@ -17,8 +17,8 @@
class NDN : public ElementListener {
public:
- NDN(const ptr_lib::shared_ptr<Transport> &transport, const char *host, unsigned short port, const ptr_lib::shared_ptr<Closure> &tempClosure)
- : transport_(transport), host_(host), port_(port), tempClosure_(tempClosure)
+ NDN(const ptr_lib::shared_ptr<Transport> &transport, const char *host, unsigned short port)
+ : transport_(transport), host_(host), port_(port)
{
}