fixed valgrind error in EpcEnbApplication

This commit is contained in:
Nicola Baldo
2012-11-09 12:23:27 +01:00
parent 38c7bd4375
commit ba16796cd8
4 changed files with 21 additions and 1 deletions

View File

@@ -129,6 +129,7 @@ EpcHelper::GetTypeId (void)
void
EpcHelper::DoDispose ()
{
NS_LOG_FUNCTION (this);
m_tunDevice->SetSendCallback (MakeNullCallback<bool, Ptr<Packet>, const Address&, const Address&, uint16_t> ());
m_tunDevice = 0;
m_sgwPgwApp = 0;

View File

@@ -44,6 +44,16 @@ EpcEnbApplication::GetTypeId (void)
return tid;
}
void
EpcEnbApplication::DoDispose (void)
{
NS_LOG_FUNCTION (this);
m_lteSocket = 0;
m_s1uSocket = 0;
delete m_s1SapProvider;
}
EpcEnbApplication::EpcEnbApplication (Ptr<Socket> lteSocket, Ptr<Socket> s1uSocket, Ipv4Address sgwAddress)
: m_lteSocket (lteSocket),
m_s1uSocket (s1uSocket),

View File

@@ -50,10 +50,16 @@ class EpcEnbApplication : public Application
friend class MemberEpcEnbS1SapProvider<EpcEnbApplication>;
public:
// inherited from Object
public:
static TypeId GetTypeId (void);
protected:
void DoDispose (void);
public:
/**

View File

@@ -10,6 +10,9 @@
# See test.py for more information.
cpp_examples = [
("lena-cqi-threshold", "True", "True"),
("lena-dual-stripe", "True", "True"),
("lena-dual-stripe --simTime=0.0 --nApartmentsX=1 --homeEnbDeploymentRatio=0.5 --nMacroEnbSites=0 --macroUeDensity=0 --nBlocks=1", "True", "True"),
("lena-dual-stripe --epc=1 --simTime=0.0 --nApartmentsX=1 --homeEnbDeploymentRatio=0.5 --nMacroEnbSites=0 --macroUeDensity=0 --nBlocks=1", "True", "True"),
("lena-dual-stripe --simTime=0.01", "True", "True"),
("lena-dual-stripe --epc=1 --simTime=0.01", "True", "True"),
("lena-dual-stripe --epc=1 --useUdp=0 --simTime=0.01", "True", "True"),