the mask to filter out the low bit is 0xfe, not 0xfd
authorMathieu Lacage <mathieu.lacage@sophia.inria.fr>
Tue, 05 Jun 2007 18:28:37 +0200
changeset 843 b6670a38f2e8
parent 842 ab2dd4d7951d
child 844 d17e2aca5a17
the mask to filter out the low bit is 0xfe, not 0xfd
src/common/packet-history.cc
--- a/src/common/packet-history.cc	Tue Jun 05 17:35:22 2007 +0200
+++ b/src/common/packet-history.cc	Tue Jun 05 18:28:37 2007 +0200
@@ -773,7 +773,7 @@
   const uint8_t *buffer = &m_data->m_data[m_head];
   ReadSmall (&item, &buffer);
   NS_ASSERT (buffer <= &m_data->m_data[m_data->m_size]);
-  if ((item.typeUid & 0xfffffffd) != uid ||
+  if ((item.typeUid & 0xfffffffe) != uid ||
       item.size != size)
     {
       NS_FATAL_ERROR ("Removing unexpected header.");
@@ -820,7 +820,7 @@
   const uint8_t *buffer = &m_data->m_data[m_tail];
   ReadSmall (&item, &buffer);
   NS_ASSERT (buffer <= &m_data->m_data[m_data->m_size]);
-  if ((item.typeUid & 0xfffffffd) != uid ||
+  if ((item.typeUid & 0xfffffffe) != uid ||
       item.size != size)
     {
       NS_FATAL_ERROR ("Removing unexpected trailer.");
@@ -875,7 +875,7 @@
   uint8_t *buffer = &m_data->m_data[m_head];
   bool ok = ReadSmall (&item, &buffer);
   NS_ASSERT (ok);
-  if ((item.typeUid & 0xfffffffd) != uid ||
+  if ((item.typeUid & 0xfffffffe) != uid ||
       item.size != size)
     {
       NS_FATAL_ERROR ("Removing unexpected header.");
@@ -936,7 +936,7 @@
 {
   ReadSmall (item, &buffer);
   bool isExtra = (item->typeUid & 0x1) == 0x1;
-  uint32_t uid = item->typeUid & 0xfffffffd;
+  uint32_t uid = item->typeUid & 0xfffffffe;
   uint32_t fragmentStart, fragmentEnd;
   uint32_t packetUid;
   if (isExtra)