From f039ccfe3424252817254f584f0de9dd727523ac Mon Sep 17 00:00:00 2001 From: Stefano Avallone Date: Fri, 24 May 2019 23:39:06 +0200 Subject: [PATCH] Improve fix for optimized mode build --- examples/traffic-control/cobalt-vs-codel.cc | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/examples/traffic-control/cobalt-vs-codel.cc b/examples/traffic-control/cobalt-vs-codel.cc index 9f55cd61a..d5b72c4c1 100644 --- a/examples/traffic-control/cobalt-vs-codel.cc +++ b/examples/traffic-control/cobalt-vs-codel.cc @@ -28,7 +28,6 @@ #include "ns3/ipv6-static-routing-helper.h" #include "ns3/ipv6-routing-table-entry.h" #include "ns3/internet-module.h" -#include "ns3/flow-monitor-module.h" #include "ns3/tcp-header.h" #include "ns3/traffic-control-module.h" #include @@ -230,16 +229,13 @@ void experiment (std::string queue_disc_type) Ptr queue = queueDiscs.Get (0); Simulator::ScheduleNow (&CheckQueueSize, queue,queue_disc_type); - int n; std::string dirToSave = "mkdir -p " + dir + queue_disc_type; - n = system (dirToSave.c_str ()); - n = system ((dirToSave + "/cwndTraces/").c_str ()); - n = system ((dirToSave + "/queueTraces/").c_str ()); - - if (n == -1) + if (system ((dirToSave + "/cwndTraces/").c_str ()) == -1 + || system ((dirToSave + "/queueTraces/").c_str ()) == -1) { exit (1); } + Simulator::Schedule (Seconds (0.1), &TraceCwnd,queue_disc_type); Simulator::Stop (Seconds (stopTime));