diff options
author | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2003-09-08 21:08:43 +0000 |
---|---|---|
committer | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2003-09-08 21:08:43 +0000 |
commit | 3185b945fbe1912d86f77aa9be84eb73dffb3d28 (patch) | |
tree | 6b014870fd0934ceb57d031c2fef69281a340046 | |
parent | c324caf6aa695508b0c830a414fa8a4e6793d5bc (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.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -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; |