1.1 --- a/src/core/log.h Wed May 07 11:33:40 2008 -0700
1.2 +++ b/src/core/log.h Wed May 07 14:24:45 2008 -0700
1.3 @@ -374,6 +374,9 @@
1.4 #define LogComponentDisableAll(level)
1.5 #define LogRegisterTimePrinter(printer)
1.6
1.7 +#define LogSetTimePrinter(printer)
1.8 +#define LogGetTimePrinter
1.9 +
1.10 #endif /* LOG_ENABLE */
1.11
1.12 #endif // __LOG_H__
2.1 --- a/src/node/ipv4-address-generator.cc Wed May 07 11:33:40 2008 -0700
2.2 +++ b/src/node/ipv4-address-generator.cc Wed May 07 14:24:45 2008 -0700
2.3 @@ -262,12 +262,10 @@
2.4
2.5 NS_ASSERT_MSG (addr, "Ipv4AddressGeneratorImpl::Add(): "
2.6 "Allocating the broadcast address is not a good idea");
2.7 +
2.8 + std::list<Entry>::iterator i;
2.9
2.10 - std::list<Entry>::iterator i, j;
2.11 -
2.12 - for (i = m_entries.begin (), j = m_entries.begin (), ++j;
2.13 - i != m_entries.end ();
2.14 - ++i, ++j)
2.15 + for (i = m_entries.begin (); i != m_entries.end (); ++i)
2.16 {
2.17 NS_LOG_LOGIC ("examine entry: " << Ipv4Address ((*i).addrLow) <<
2.18 " to " << Ipv4Address ((*i).addrHigh));
2.19 @@ -277,11 +275,12 @@
2.20 //
2.21 if (addr >= (*i).addrLow && addr <= (*i).addrHigh)
2.22 {
2.23 - NS_LOG_LOGIC ("Ipv4AddressGeneratorImpl::Add(): Address Collision: " << Ipv4Address (addr));
2.24 + NS_LOG_LOGIC ("Ipv4AddressGeneratorImpl::Add(): "
2.25 + "Address Collision: " << Ipv4Address (addr));
2.26 if (!m_test)
2.27 {
2.28 - NS_ASSERT_MSG (0,
2.29 - "Ipv4AddressGeneratorImpl::Add(): Address Collision: " << Ipv4Address (addr));
2.30 + NS_ASSERT_MSG (0, "Ipv4AddressGeneratorImpl::Add(): "
2.31 + "Address Collision: " << Ipv4Address (addr));
2.32 }
2.33 return false;
2.34 }
2.35 @@ -303,6 +302,9 @@
2.36 //
2.37 if (addr == (*i).addrHigh + 1)
2.38 {
2.39 + std::list<Entry>::iterator j = i;
2.40 + ++j;
2.41 +
2.42 if (j != m_entries.end ())
2.43 {
2.44 if (addr == (*j).addrLow)
3.1 --- a/src/simulator/simulator.cc Wed May 07 11:33:40 2008 -0700
3.2 +++ b/src/simulator/simulator.cc Wed May 07 14:24:45 2008 -0700
3.3 @@ -437,7 +437,9 @@
3.4 m_priv = CreateObject<SimulatorPrivate> ();
3.5 Ptr<Scheduler> scheduler = CreateObject<MapScheduler> ();
3.6 m_priv->SetScheduler (scheduler);
3.7 +#ifdef NS3_LOG_ENABLE
3.8 LogSetTimePrinter (&TimePrinter);
3.9 +#endif /* NS3_LOG_ENABLE */
3.10 }
3.11 TRACE_S ("priv " << m_priv);
3.12 return m_priv;
3.13 @@ -455,7 +457,9 @@
3.14 * Simulator::GetPriv will trigger again an infinite recursion until the stack
3.15 * explodes.
3.16 */
3.17 +#ifdef NS3_LOG_ENABLE
3.18 LogSetTimePrinter (0);
3.19 +#endif /* NS3_LOG_ENABLE */
3.20 m_priv->Destroy ();
3.21 m_priv = 0;
3.22 }