--- a/src/contrib/average.h Wed Oct 28 15:41:21 2009 +0300
+++ b/src/contrib/average.h Wed Oct 28 18:29:51 2009 +0300
@@ -18,8 +18,8 @@
* Authors: Pavel Boyko <boyko@iitp.ru>
*/
-#ifndef STATS_H_
-#define STATS_H_
+#ifndef AVERAGE_H
+#define AVERAGE_H
#include <cmath>
#include <iostream>
#include <limits>
@@ -79,4 +79,4 @@
return os;
}
-#endif /* STATS_H_ */
+#endif /* AVERAGE_H */
--- a/src/routing/manet/aodv/aodv-neighbor.cc Wed Oct 28 15:41:21 2009 +0300
+++ b/src/routing/manet/aodv/aodv-neighbor.cc Wed Oct 28 18:29:51 2009 +0300
@@ -50,8 +50,10 @@
Purge ();
for (std::vector<Neighbor>::const_iterator i = m_nb.begin ();
i != m_nb.end (); ++i)
- if (i->m_neighborAddress == addr)
- return true;
+ {
+ if (i->m_neighborAddress == addr)
+ return true;
+ }
return false;
}
@@ -61,8 +63,10 @@
Purge ();
for (std::vector<Neighbor>::const_iterator i = m_nb.begin (); i
!= m_nb.end (); ++i)
- if (i->m_neighborAddress == addr)
- return (i->m_expireTime - Simulator::Now ());
+ {
+ if (i->m_neighborAddress == addr)
+ return (i->m_expireTime - Simulator::Now ());
+ }
return Seconds (0);
}
@@ -100,14 +104,14 @@
return;
CloseNeighbor pred;
- if (!m_handleLinleFailure.IsNull ())
+ if (!m_handleLinkFailure.IsNull ())
{
for (std::vector<Neighbor>::iterator j = m_nb.begin (); j != m_nb.end (); ++j)
{
if (pred (*j))
{
NS_LOG_LOGIC ("Close link to " << j->m_neighborAddress);
- m_handleLinleFailure (j->m_neighborAddress);
+ m_handleLinkFailure (j->m_neighborAddress);
}
}
}
@@ -158,8 +162,10 @@
Mac48Address addr = hdr.GetAddr1 ();
for (std::vector<Neighbor>::iterator i = m_nb.begin (); i != m_nb.end (); ++i)
- if (i->m_hardwareAddress == addr)
- i->close = true;
+ {
+ if (i->m_hardwareAddress == addr)
+ i->close = true;
+ }
Purge ();
}
}
--- a/src/routing/manet/aodv/aodv-neighbor.h Wed Oct 28 15:41:21 2009 +0300
+++ b/src/routing/manet/aodv/aodv-neighbor.h Wed Oct 28 18:29:51 2009 +0300
@@ -87,12 +87,12 @@
///\name Handle link failure callback
//\{
- void SetCallback (Callback<void, Ipv4Address> cb) { m_handleLinleFailure = cb;}
- Callback<void, Ipv4Address> GetCallback () const { return m_handleLinleFailure; }
+ void SetCallback (Callback<void, Ipv4Address> cb) { m_handleLinkFailure = cb;}
+ Callback<void, Ipv4Address> GetCallback () const { return m_handleLinkFailure; }
//\}
private:
/// link failure callback
- Callback<void, Ipv4Address> m_handleLinleFailure;
+ Callback<void, Ipv4Address> m_handleLinkFailure;
/// TX error callback
Callback<void, WifiMacHeader const &> m_txErrorCallback;
/// Timer for neighbor's list. Schedule Purge().