aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2003-09-08 21:08:43 +0000
committerRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2003-09-08 21:08:43 +0000
commit3185b945fbe1912d86f77aa9be84eb73dffb3d28 (patch)
tree6b014870fd0934ceb57d031c2fef69281a340046
parentc324caf6aa695508b0c830a414fa8a4e6793d5bc (diff)
Update to the culmulative byte column.
Only calculate culmulative bytes on those packets that are actually displayed in the packet pane. When a display filter is applied, culmulative bytes should only be calculated on thoise packets that are actually displayed. svn path=/trunk/; revision=8418
-rw-r--r--file.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/file.c b/file.c
index a6917602a4..3887f51ae0 100644
--- a/file.c
+++ b/file.c
@@ -1,7 +1,7 @@
/* file.c
* File I/O routines
*
- * $Id: file.c,v 1.307 2003/09/03 23:40:06 guy Exp $
+ * $Id: file.c,v 1.308 2003/09/08 21:08:43 sahlberg Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -686,6 +686,9 @@ add_packet_to_packet_list(frame_data *fdata, capture_file *cf,
gboolean create_proto_tree = FALSE;
epan_dissect_t *edt;
+ /* just add some value here until we know if it is being displayed or not */
+ fdata->cul_bytes = cul_bytes + fdata->pkt_len;
+
/* We don't yet have a color filter to apply. */
args.colorf = NULL;
@@ -779,6 +782,9 @@ add_packet_to_packet_list(frame_data *fdata, capture_file *cf,
if (fdata->flags.passed_dfilter) {
/* This frame passed the display filter, so add it to the clist. */
+ /* increase cul_bytes with this packets length */
+ cul_bytes += fdata->pkt_len;
+
epan_dissect_fill_in_columns(edt);
/* If we haven't yet seen the first frame, this is it.
@@ -840,8 +846,6 @@ read_packet(capture_file *cf, long offset)
fdata->prev = NULL;
fdata->pfd = NULL;
fdata->pkt_len = phdr->len;
- cul_bytes += phdr->len;
- fdata->cul_bytes = cul_bytes;
fdata->cap_len = phdr->caplen;
fdata->file_off = offset;
fdata->lnk_t = phdr->pkt_encap;