author | mickeyl <mickeyl> | 2004-05-03 13:21:26 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-05-03 13:21:26 (UTC) |
commit | 9efa98c49988a41de7613f56818f2e31bb24e22b (patch) (unidiff) | |
tree | 62e5f95df7302eeef9a03681b708ae80c3d78d55 | |
parent | 0490226f4ed54fdeef5578255594830659a8d3bd (diff) | |
download | opie-9efa98c49988a41de7613f56818f2e31bb24e22b.zip opie-9efa98c49988a41de7613f56818f2e31bb24e22b.tar.gz opie-9efa98c49988a41de7613f56818f2e31bb24e22b.tar.bz2 |
honor limited buffer size, if set
-rw-r--r-- | noncore/net/wellenreiter/gui/packetview.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/noncore/net/wellenreiter/gui/packetview.cpp b/noncore/net/wellenreiter/gui/packetview.cpp index f0f16ff..69438fa 100644 --- a/noncore/net/wellenreiter/gui/packetview.cpp +++ b/noncore/net/wellenreiter/gui/packetview.cpp | |||
@@ -77,9 +77,11 @@ void PacketView::add( const OPacket* p, int size ) | |||
77 | _packets.append( p ); | 77 | _packets.append( p ); |
78 | } | 78 | } |
79 | else | 79 | else |
80 | // limited buffer, limit = size | 80 | { // limited buffer, limit = size |
81 | if ( _packets.count() < size ) | 81 | while ( _packets.count() >= size ) |
82 | { | 82 | { |
83 | _packets.removeFirst(); | ||
84 | } | ||
83 | _packets.append( p ); | 85 | _packets.append( p ); |
84 | } | 86 | } |
85 | 87 | ||