lte: Fix EPC test crashes by removing an assert
That's bad, usually the test must be reworked to not fail the assert. However, there's no time in fixing a decade-old test, and also the code worked like this since... forever. My fault was to add the assert in the first instance, thinking that it would be a good service to the users. I was wrong.
This commit is contained in:
@@ -569,10 +569,17 @@ PointToPointEpcHelper::DoActivateEpsBearerForUe (const Ptr<NetDevice> &ueDevice,
|
||||
const EpsBearer &bearer) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
Ptr<LteUeNetDevice> ueLteDevice = ueDevice->GetObject<LteUeNetDevice> ();
|
||||
NS_ABORT_MSG_IF (ueLteDevice == nullptr , "Unable to find LteUeNetDevice while activating the EPS bearer");
|
||||
|
||||
Simulator::ScheduleNow (&EpcUeNas::ActivateEpsBearer, ueLteDevice->GetNas (), bearer, tft);
|
||||
Ptr<LteUeNetDevice> ueLteDevice = DynamicCast<LteUeNetDevice> (ueDevice);
|
||||
if (ueLteDevice == nullptr)
|
||||
{
|
||||
// You may wonder why this is not an assert. Well, take a look in epc-test-s1u-downlink
|
||||
// and -uplink: we are using CSMA to simulate UEs.
|
||||
NS_LOG_WARN ("Unable to find LteUeNetDevice while activating the EPS bearer");
|
||||
}
|
||||
else
|
||||
{
|
||||
Simulator::ScheduleNow (&EpcUeNas::ActivateEpsBearer, ueLteDevice->GetNas (), bearer, tft);
|
||||
}
|
||||
}
|
||||
|
||||
Ptr<Node>
|
||||
|
||||
Reference in New Issue
Block a user