diff options
author | Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> | 2009-09-21 20:17:59 +0000 |
---|---|---|
committer | Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> | 2009-09-21 20:17:59 +0000 |
commit | 1989aa700da04dd0ddb78da051313c81916f7a36 (patch) | |
tree | 7f4916b1f06143021e411f820a017fe206cf60db /file.c | |
parent | 8af452f83da126b0cb6c840c2a0956bccfd105a3 (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.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -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++; } |