src/wifi/examples/wifi-phy-test.cc
changeset 9785 97052ab05772
parent 7385 10beb0e53130
child 9802 5dea58a3b261
--- a/src/wifi/examples/wifi-phy-test.cc	Wed May 15 15:47:58 2013 -0400
+++ b/src/wifi/examples/wifi-phy-test.cc	Wed May 15 16:26:46 2013 -0400
@@ -187,14 +187,16 @@
 CollisionExperiment::Receive (Ptr<Packet> p, double snr, WifiMode mode, enum WifiPreamble preamble)
 {
   FlowIdTag tag;
-  p->FindFirstMatchingByteTag (tag);
-  if (tag.GetFlowId () == m_flowIdA)
+  if (p->FindFirstMatchingByteTag (tag))
     {
-      m_output.receivedA++;
-    }
-  else if (tag.GetFlowId () == m_flowIdB)
-    {
-      m_output.receivedB++;
+      if (tag.GetFlowId () == m_flowIdA)
+        {
+          m_output.receivedA++;
+        }
+      else if (tag.GetFlowId () == m_flowIdB)
+        {
+          m_output.receivedB++;
+        }
     }
 }