summaryrefslogtreecommitdiff
path: root/epan/frame_data.c
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2010-06-23 11:57:16 +0000
committerStig Bjørlykke <stig@bjorlykke.org>2010-06-23 11:57:16 +0000
commit3ba2260b8bd71805bce20fef13c66393b6cb52a0 (patch)
treeea75feea143de3f6399b86027deea7fd78df5abd /epan/frame_data.c
parent1fce0a0ac2e8ad30e70ebd4cf2d108fbbd665bd3 (diff)
downloadwireshark-3ba2260b8bd71805bce20fef13c66393b6cb52a0.tar.gz
Ensure the "Delta time displayed" is always zero for the first displayed
packet, and not the delta from the first captured package. svn path=/trunk/; revision=33301
Diffstat (limited to 'epan/frame_data.c')
-rw-r--r--epan/frame_data.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/epan/frame_data.c b/epan/frame_data.c
index e0c631a1c9..18b71e52df 100644
--- a/epan/frame_data.c
+++ b/epan/frame_data.c
@@ -233,13 +233,6 @@ frame_data_set_before_dissect(frame_data *fdata,
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
@@ -260,7 +253,13 @@ frame_data_set_before_dissect(frame_data *fdata,
/* Get the time elapsed between the previous displayed packet and
this packet. */
- nstime_delta(&fdata->del_dis_ts, &fdata->abs_ts, prev_dis_ts);
+ if (nstime_is_unset(prev_dis_ts))
+ /* If we don't have the time stamp of the previous displayed packet,
+ it's because we have no displayed packets prior to this.
+ Set the delta time to zero. */
+ nstime_set_zero(&fdata->del_dis_ts);
+ else
+ nstime_delta(&fdata->del_dis_ts, &fdata->abs_ts, prev_dis_ts);
/* Get the time elapsed between the previous captured packet and
this packet. */