From aecd4254c6fbecf225934c938525b14118c77853 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stig=20Bj=C3=B8rlykke?= Date: Wed, 26 Mar 2008 16:56:45 +0000 Subject: [PATCH] Do not add packet length twice to cum_bytes when having a TIME REF frame. This fixes bug 2387. svn path=/trunk/; revision=24730 --- file.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/file.c b/file.c index 699729fb8c..aec25b39be 100644 --- a/file.c +++ b/file.c @@ -982,15 +982,15 @@ add_packet_to_packet_list(frame_data *fdata, capture_file *cf, /* This frame either passed the display filter list or is marked as a time reference frame. All time reference frames are displayed even if they dont pass the display filter */ - /* if this was a TIME REF frame we should reset the cul bytes field */ if(edt->pi.fd->flags.ref_time){ + /* if this was a TIME REF frame we should reset the cul bytes field */ cum_bytes = fdata->pkt_len; - fdata->cum_bytes = cum_bytes; + fdata->cum_bytes = cum_bytes; + } else { + /* increase cum_bytes with this packets length */ + cum_bytes += fdata->pkt_len; } - /* increase cum_bytes with this packets length */ - cum_bytes += fdata->pkt_len; - epan_dissect_fill_in_columns(edt); /* If we haven't yet seen the first frame, this is it.