move m_rxTrace to trace enet header
authorCraig Dowell <craigdo@ee.washington.edu>
Fri, 10 Aug 2007 10:45:59 -0700
changeset 1275 9582776e3a68
parent 1274 e4b40ea14d12
child 1276 e0b88ec7a6be
move m_rxTrace to trace enet header
src/devices/csma/csma-net-device.cc
src/devices/point-to-point/point-to-point-net-device.cc
--- a/src/devices/csma/csma-net-device.cc	Fri Aug 10 10:44:02 2007 -0700
+++ b/src/devices/csma/csma-net-device.cc	Fri Aug 10 10:45:59 2007 -0700
@@ -528,6 +528,8 @@
       m_dropTrace (p);
       return;
     }
+
+  m_rxTrace (p);
 //
 // protocol must be initialized to avoid a compiler warning in the RAW
 // case that breaks the optimized build.
@@ -550,7 +552,6 @@
       break;
     }
   
-  m_rxTrace (p);
   ForwardUp (p, protocol, header.GetSource ());
   return;
 }
--- a/src/devices/point-to-point/point-to-point-net-device.cc	Fri Aug 10 10:44:02 2007 -0700
+++ b/src/devices/point-to-point/point-to-point-net-device.cc	Fri Aug 10 10:45:59 2007 -0700
@@ -237,8 +237,8 @@
   uint16_t protocol = 0;
   Packet packet = p;
 
+  m_rxTrace (packet);
   ProcessHeader(packet, protocol);
-  m_rxTrace (packet);
   ForwardUp (packet, protocol, GetBroadcast ());
 }