model+ndn.cxx+apps: New application template (CallbackBasedApp) that can be used to prototype NS-3 applications in python
The current code allows simulating in python using ApiFace (passed basic tests)
Refs #1005 (http://redmine.named-data.net/)
diff --git a/model/ndn-content-object.cc b/model/ndn-content-object.cc
index 582ebc9..81d92f0 100644
--- a/model/ndn-content-object.cc
+++ b/model/ndn-content-object.cc
@@ -35,6 +35,10 @@
, m_payload (payload)
, m_wire (0)
{
+ if (m_payload == 0) // just in case
+ {
+ m_payload = Create<Packet> ();
+ }
}
ContentObject::ContentObject (const ContentObject &other)