summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
authorpjain <pjain@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1996-11-26 02:44:14 +0000
committerpjain <pjain@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1996-11-26 02:44:14 +0000
commitacb16e99ab2d28eaac4b1a3ba43c546779721138 (patch)
tree47a67dd5159ab4877cb877fe4e6a6bd1cd37e75a /java
parent89cf769c19052201d29880d8804e7d9c487919f5 (diff)
downloadATCD-acb16e99ab2d28eaac4b1a3ba43c546779721138.tar.gz
Fixed a small bug (please see ChangeLog).
Diffstat (limited to 'java')
-rw-r--r--java/src/MessageQueue.java54
1 files changed, 33 insertions, 21 deletions
diff --git a/java/src/MessageQueue.java b/java/src/MessageQueue.java
index b13b4fdbf8d..76c60a8d933 100644
--- a/java/src/MessageQueue.java
+++ b/java/src/MessageQueue.java
@@ -462,11 +462,14 @@ public class MessageQueue
this.tail_ = newItem;
}
- // Make sure to count *all* the bytes in a composite message!!!
- for (MessageBlock temp = newItem;
- temp != null;
- temp = temp.cont ())
- this.currentBytes_ += temp.size ();
+ if (item.msgType() != MessageType.MB_OBJECT)
+ {
+ // Make sure to count *all* the bytes in a composite message!!!
+ for (MessageBlock temp = newItem;
+ temp != null;
+ temp = temp.cont ())
+ this.currentBytes_ += temp.size ();
+ }
this.currentCount_++;
return this.currentCount_;
@@ -487,11 +490,14 @@ public class MessageQueue
this.head_ = newItem;
- // Make sure to count *all* the bytes in a composite message!!!
- for (MessageBlock temp = newItem;
- temp != null;
- temp = temp.cont ())
- this.currentBytes_ += temp.size ();
+ if (item.msgType() != MessageType.MB_OBJECT)
+ {
+ // Make sure to count *all* the bytes in a composite message!!!
+ for (MessageBlock temp = newItem;
+ temp != null;
+ temp = temp.cont ())
+ this.currentBytes_ += temp.size ();
+ }
this.currentCount_++;
@@ -544,11 +550,14 @@ public class MessageQueue
}
}
- // Make sure to count *all* the bytes in a composite message!!!
- for (MessageBlock temp = newItem;
- temp != null;
- temp = temp.cont ())
- this.currentBytes_ += temp.size ();
+ if (item.msgType() != MessageType.MB_OBJECT)
+ {
+ // Make sure to count *all* the bytes in a composite message!!!
+ for (MessageBlock temp = newItem;
+ temp != null;
+ temp = temp.cont ())
+ this.currentBytes_ += temp.size ();
+ }
this.currentCount_++;
return this.currentCount_;
@@ -562,12 +571,15 @@ public class MessageQueue
if (this.head_ == null)
this.tail_ = null;
- // Make sure to subtract off all of the bytes associated with this
- // message.
- for (MessageBlock temp = firstItem;
- temp != null;
- temp = temp.cont ())
- this.currentBytes_ -= temp.size ();
+ if (item.msgType() != MessageType.MB_OBJECT)
+ {
+ // Make sure to subtract off all of the bytes associated with this
+ // message.
+ for (MessageBlock temp = firstItem;
+ temp != null;
+ temp = temp.cont ())
+ this.currentBytes_ -= temp.size ();
+ }
this.currentCount_--;
return firstItem;