aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com>2009-09-21 19:48:53 +0000
committerKovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com>2009-09-21 19:48:53 +0000
commitaa4af67e1b41ff78936de801ac8fda1aa0699996 (patch)
tree852d8004201dcce86771876183b9e683e60c377f
parentc3647b4e3bc58014ad8f3472b53be208e406815e (diff)
Only set cumulative bytes after passing the display filter test
svn path=/trunk/; revision=30053
-rw-r--r--file.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/file.c b/file.c
index e0f6aa55b5..67ab312aaf 100644
--- a/file.c
+++ b/file.c
@@ -1083,9 +1083,6 @@ add_packet_to_packet_list(frame_data *fdata, capture_file *cf,
cinfo = (tap_flags & TL_REQUIRES_COLUMNS) ? &cf->cinfo : NULL;
- /* just add some value here until we know if it is being displayed or not */
- fdata->cum_bytes = cum_bytes + fdata->pkt_len;
-
/* If we don't have the time stamp of the first packet in the
capture, it's because this is the first packet. Save the time
stamp of this packet as the time stamp of the first packet. */
@@ -1185,6 +1182,7 @@ add_packet_to_packet_list(frame_data *fdata, capture_file *cf,
} else {
/* increase cum_bytes with this packets length */
cum_bytes += fdata->pkt_len;
+ fdata->cum_bytes = cum_bytes;
}
/* If we haven't yet seen the first frame, this is it.