aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authorKovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com>2009-09-21 20:17:59 +0000
committerKovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com>2009-09-21 20:17:59 +0000
commit1989aa700da04dd0ddb78da051313c81916f7a36 (patch)
tree7f4916b1f06143021e411f820a017fe206cf60db /file.c
parent8af452f83da126b0cb6c840c2a0956bccfd105a3 (diff)
Bring frame_data_init() and add_packet_to_packet_list() more in sync by adding 'ref_time' handling to frame_data_init(). For tshark/rawshark this is unused because they only do a single pass through the capture file
svn path=/trunk/; revision=30055
Diffstat (limited to 'file.c')
-rw-r--r--file.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/file.c b/file.c
index 67ab312aaf..48576f3633 100644
--- a/file.c
+++ b/file.c
@@ -1089,6 +1089,7 @@ add_packet_to_packet_list(frame_data *fdata, capture_file *cf,
if (nstime_is_unset(&first_ts)) {
first_ts = fdata->abs_ts;
}
+
/* if this frames is marked as a reference time frame, reset
firstsec and firstusec to this frame */
if(fdata->flags.ref_time){
@@ -1170,7 +1171,7 @@ add_packet_to_packet_list(frame_data *fdata, capture_file *cf,
row = new_packet_list_append(cinfo, fdata, &edt.pi);
}
- if( (fdata->flags.passed_dfilter) || (fdata->flags.ref_time) )
+ if(fdata->flags.passed_dfilter || fdata->flags.ref_time)
{
/* This frame either passed the display filter list or is marked as
a time reference frame. All time reference frames are displayed
@@ -1185,6 +1186,10 @@ add_packet_to_packet_list(frame_data *fdata, capture_file *cf,
fdata->cum_bytes = cum_bytes;
}
+ /* Set the time of the previous displayed frame to the time of this
+ frame. */
+ prev_dis_ts = fdata->abs_ts;
+
/* If we haven't yet seen the first frame, this is it.
XXX - we must do this before we add the row to the display,
@@ -1204,10 +1209,6 @@ add_packet_to_packet_list(frame_data *fdata, capture_file *cf,
/* This is the last frame we've seen so far. */
cf->last_displayed = fdata;
- /* Set the time of the previous displayed frame to the time of this
- frame. */
- prev_dis_ts = fdata->abs_ts;
-
cf->displayed_count++;
}