bug 1659: WifiTest call Stop() before Run() (bug fix due to linlinjavaer@gmail.com)
authorDaniel Lertpratchya <nikkipui@gmail.com>
Tue, 30 Apr 2013 08:56:18 -0400
changeset 9733 7eca59a61873
parent 9732 9d57807f74c9
child 9734 5189884ac0fa
bug 1659: WifiTest call Stop() before Run() (bug fix due to linlinjavaer@gmail.com)
src/wifi/test/wifi-test.cc
--- a/src/wifi/test/wifi-test.cc	Mon Apr 29 15:23:15 2013 -0400
+++ b/src/wifi/test/wifi-test.cc	Tue Apr 30 08:56:18 2013 -0400
@@ -111,10 +111,10 @@
   CreateOne (Vector (5.0, 0.0, 0.0), channel);
   CreateOne (Vector (5.0, 0.0, 0.0), channel);
 
+  Simulator::Stop (Seconds (10.0));
+
   Simulator::Run ();
   Simulator::Destroy ();
-
-  Simulator::Stop (Seconds (10.0));
 }
 
 void
@@ -147,7 +147,6 @@
   m_propDelay.SetTypeId ("ns3::RandomPropagationDelayModel");
   m_mac.SetTypeId ("ns3::AdhocWifiMac");
   RunOne ();
-  Simulator::Destroy ();
 }
 
 //-----------------------------------------------------------------------------