From 25c3ac74fb1b8089f67bb52cf87cb248f839d798 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sun, 1 Dec 2002 20:19:44 +0000 Subject: [PATCH] The previous change caused the delta time to be the delta between a frame and the previous frame in the capture - a frame that might not be displayed, so you don't know what it was - rather than the previous frame in the display, as is intended. Fix that. svn path=/trunk/; revision=6708 --- file.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/file.c b/file.c index e566a4b6b9..5ffcf654f6 100644 --- a/file.c +++ b/file.c @@ -1,7 +1,7 @@ /* file.c * File I/O routines * - * $Id: file.c,v 1.295 2002/11/29 11:02:13 sahlberg Exp $ + * $Id: file.c,v 1.296 2002/12/01 20:19:44 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs @@ -656,6 +656,7 @@ add_packet_to_packet_list(frame_data *fdata, capture_file *cf, firstsec = fdata->abs_secs; firstusec = fdata->abs_usecs; } + /* If we don't have the time stamp of the previous displayed packet, it's because this is the first displayed packet. Save the time stamp of this packet as the time stamp of the previous displayed @@ -682,9 +683,6 @@ add_packet_to_packet_list(frame_data *fdata, capture_file *cf, this packet. */ compute_timestamp_diff(&fdata->del_secs, &fdata->del_usecs, fdata->abs_secs, fdata->abs_usecs, prevsec, prevusec); - prevsec = fdata->abs_secs; - prevusec = fdata->abs_usecs; - /* If either @@ -770,6 +768,11 @@ add_packet_to_packet_list(frame_data *fdata, capture_file *cf, packet_list_set_colors(row, &args.colorf->fg_color, &args.colorf->bg_color); } + + /* Set the time of the previous displayed frame to the time of this + frame. */ + prevsec = fdata->abs_secs; + prevusec = fdata->abs_usecs; } else { /* This frame didn't pass the display filter, so it's not being added to the clist, and thus has no row. */