aboutsummaryrefslogtreecommitdiffstats
path: root/epan
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 /epan
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 'epan')
-rw-r--r--epan/frame_data.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/epan/frame_data.c b/epan/frame_data.c
index 0ecc8b91a8..29480b6d4b 100644
--- a/epan/frame_data.c
+++ b/epan/frame_data.c
@@ -228,6 +228,19 @@ frame_data_init(frame_data *fdata, guint32 num,
*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){
+ *first_ts = fdata->abs_ts;
+ }
+
+ /* If we don't have the time stamp of the previous displayed packet,
+ it's because this is the first packet that's being displayed. Save the time
+ stamp of this packet as the time stamp of the previous displayed
+ packet. */
+ if (nstime_is_unset(prev_dis_ts))
+ *prev_dis_ts = fdata->abs_ts;
+
/* If we don't have the time stamp of the previous captured packet,
it's because this is the first packet. Save the time
stamp of this packet as the time stamp of the previous captured
@@ -247,13 +260,6 @@ frame_data_init(frame_data *fdata, guint32 num,
*elapsed_time = fdata->rel_ts;
}
- /* If we don't have the time stamp of the previous displayed packet,
- it's because this is the first packet that's being displayed. Save the time
- stamp of this packet as the time stamp of the previous displayed
- packet. */
- if (nstime_is_unset(prev_dis_ts))
- *prev_dis_ts = fdata->abs_ts;
-
/* Get the time elapsed between the previous displayed packet and
this packet. */
nstime_delta(&fdata->del_dis_ts, &fdata->abs_ts, prev_dis_ts);