aboutsummaryrefslogtreecommitdiffstats
path: root/epan/frame_data.c
diff options
context:
space:
mode:
authorkrj <krj@f5534014-38df-0310-8fa8-9805f1628bb7>2009-09-21 20:17:59 +0000
committerkrj <krj@f5534014-38df-0310-8fa8-9805f1628bb7>2009-09-21 20:17:59 +0000
commit16861445f8f81b4d03baab87d461ac0e2995ef5a (patch)
tree7f4916b1f06143021e411f820a017fe206cf60db /epan/frame_data.c
parent47ceedefd726be1aeec1042493c3a68d52e01c54 (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
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@30055 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/frame_data.c')
-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);