traffic-control: Fix the size of the RootQueueDiscList attribute
This commit is contained in:
@@ -130,6 +130,9 @@ main (int argc, char *argv[])
|
||||
|
||||
Ptr<QueueDisc> q = qdiscs.Get (1);
|
||||
q->TraceConnectWithoutContext ("PacketsInQueue", MakeCallback (&TcPacketsInQueueTrace));
|
||||
// Alternatively:
|
||||
// Config::ConnectWithoutContext ("/NodeList/1/$ns3::TrafficControlLayer/RootQueueDiscList/0/PacketsInQueue",
|
||||
// MakeCallback (&TcPacketsInQueueTrace));
|
||||
|
||||
Ptr<NetDevice> nd = devices.Get (1);
|
||||
Ptr<PointToPointNetDevice> ptpnd = DynamicCast<PointToPointNetDevice> (nd);
|
||||
|
||||
@@ -185,8 +185,6 @@ TrafficControlLayer::GetRootQueueDiscOnDevice (Ptr<NetDevice> device) const
|
||||
|
||||
if (ndi == m_netDevices.end ())
|
||||
{
|
||||
NS_LOG_WARN ("GetRootQueueDiscOnDevice should not be called before the "
|
||||
<< "device is setup or a queue disc is installed on the device.");
|
||||
return 0;
|
||||
}
|
||||
return ndi->second.rootQueueDisc;
|
||||
@@ -241,7 +239,7 @@ TrafficControlLayer::NotifyNewAggregate ()
|
||||
uint32_t
|
||||
TrafficControlLayer::GetNDevices (void) const
|
||||
{
|
||||
return m_netDevices.size();
|
||||
return m_node->GetNDevices ();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user