Fix serialization of txPacket (need to properly calculate the length before serializa...
authorRon Dreslinski <rdreslin@umich.edu>
Wed, 19 Jan 2005 21:26:19 +0000 (16:26 -0500)
committerRon Dreslinski <rdreslin@umich.edu>
Wed, 19 Jan 2005 21:26:19 +0000 (16:26 -0500)
--HG--
extra : convert_revision : e93321495d19afb86949daf2c14102ffb6bcef41

dev/ns_gige.cc

index aa47436f79330fdbdc77b478fee15ca47f24c7bb..e799c10d21035fbb0118ad12050b61152d81b47b 100644 (file)
@@ -2352,6 +2352,7 @@ NSGigE::serialize(ostream &os)
     bool txPacketExists = txPacket;
     SERIALIZE_SCALAR(txPacketExists);
     if (txPacketExists) {
+        txPacket->length = txPacketBufPtr - txPacket->data;
         txPacket->serialize("txPacket", os);
         uint32_t txPktBufPtr = (uint32_t) (txPacketBufPtr - txPacket->data);
         SERIALIZE_SCALAR(txPktBufPtr);