fix optimized build
authorTom Henderson <tomh@tomh.org>
Sun, 28 Apr 2013 23:22:34 -0700
changeset 9726 e894607cb6e4
parent 9725 8e5c78e820f2
child 9727 cb763839fc18
fix optimized build
src/dsr/model/dsr-options.cc
src/dsr/model/dsr-routing.cc
--- a/src/dsr/model/dsr-options.cc	Fri Apr 26 14:06:06 2013 -0700
+++ b/src/dsr/model/dsr-options.cc	Sun Apr 28 23:22:34 2013 -0700
@@ -1230,7 +1230,7 @@
       if (destAddress != destination)
         {
           NS_LOG_DEBUG ("Process the promiscuously received packet");
-          bool findPassive;
+          bool findPassive = false;
           int32_t nNodes = NodeList::GetNNodes ();
           for (int32_t i = 0; i < nNodes; ++i)
             {
--- a/src/dsr/model/dsr-routing.cc	Fri Apr 26 14:06:06 2013 -0700
+++ b/src/dsr/model/dsr-routing.cc	Sun Apr 28 23:22:34 2013 -0700
@@ -1249,13 +1249,12 @@
           if (optionType == 96)        // This is the source route option
             {
               Ipv4Address promiscSource = GetIPfromMAC (Mac48Address::ConvertFrom (from));
-              Ipv4Address promiscDestination = GetIPfromMAC (Mac48Address::ConvertFrom (to));
               dsrOption = GetOption (optionType);       // Get the relative DSR option and demux to the process function
               NS_LOG_DEBUG (Simulator::Now ().GetSeconds () << 
                             " DSR node " << m_mainAddress <<
                             " overhearing packet PID: " << p->GetUid () <<
                             " from " << promiscSource <<
-                            " to " << promiscDestination <<
+                            " to " << GetIPfromMAC (Mac48Address::ConvertFrom (to)) <<
                             " with source IP " << ipv4Header.GetSource () <<
                             " and destination IP " << ipv4Header.GetDestination () <<
                             " and packet : " << *dsrPacket);