From 40f6318eeab6ca57ee5d747a37613237e431f5c4 Mon Sep 17 00:00:00 2001 From: Tom Henderson Date: Sun, 28 Apr 2013 23:22:34 -0700 Subject: [PATCH] fix optimized build --- src/dsr/model/dsr-options.cc | 2 +- src/dsr/model/dsr-routing.cc | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/dsr/model/dsr-options.cc b/src/dsr/model/dsr-options.cc index 42f270424..df667c88a 100644 --- a/src/dsr/model/dsr-options.cc +++ b/src/dsr/model/dsr-options.cc @@ -1230,7 +1230,7 @@ uint8_t DsrOptionSR::Process (Ptr packet, Ptr dsrP, Ipv4Address 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) { diff --git a/src/dsr/model/dsr-routing.cc b/src/dsr/model/dsr-routing.cc index b8b8d6dcc..3b2834009 100644 --- a/src/dsr/model/dsr-routing.cc +++ b/src/dsr/model/dsr-routing.cc @@ -1249,13 +1249,12 @@ bool DsrRouting::PromiscReceive (Ptr device, Ptr packet 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);