fix segfault
This commit is contained in:
@@ -26,11 +26,6 @@
|
||||
|
||||
namespace ns3{
|
||||
|
||||
ApplicationList::ApplicationList()
|
||||
: Capability(0)
|
||||
{
|
||||
}
|
||||
|
||||
ApplicationList::ApplicationList(Node* n)
|
||||
: Capability(n)
|
||||
{
|
||||
@@ -42,8 +37,7 @@ ApplicationList::~ApplicationList()
|
||||
|
||||
ApplicationList* ApplicationList::Copy(Node * n) const
|
||||
{ // Copy this app list
|
||||
ApplicationList* r = new ApplicationList();
|
||||
r->SetNode(n);
|
||||
ApplicationList* r = new ApplicationList(n);
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,6 @@ namespace ns3 {
|
||||
|
||||
class ApplicationList : public Capability {
|
||||
public:
|
||||
ApplicationList();
|
||||
ApplicationList(Node*);
|
||||
// Copy constructor not needed, default one is correct
|
||||
~ApplicationList();
|
||||
|
||||
@@ -25,11 +25,6 @@
|
||||
#include "node.h"
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
Capability::Capability()
|
||||
: m_node(0)
|
||||
{ // Nothing else needed
|
||||
}
|
||||
|
||||
Capability::Capability(Node* n)
|
||||
: m_node (n)
|
||||
|
||||
@@ -37,7 +37,6 @@ class NodeReference;
|
||||
class Capability
|
||||
{
|
||||
public:
|
||||
Capability();
|
||||
Capability(Node* n);
|
||||
Capability(const Capability&); // Copy constructor
|
||||
virtual Capability& operator=(const Capability&); // Assignment operator
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace ns3 {
|
||||
InternetNode::InternetNode()
|
||||
{
|
||||
// Instantiate the capabilities
|
||||
m_applicationList = new ApplicationList();
|
||||
m_applicationList = new ApplicationList(this);
|
||||
m_l3Demux = new L3Demux(this);
|
||||
m_ipv4L4Demux = new Ipv4L4Demux(this);
|
||||
m_l3Demux->Insert (Ipv4 (this));
|
||||
|
||||
Reference in New Issue
Block a user