diff options
author | Gerald Combs <gerald@wireshark.org> | 2010-05-26 23:29:56 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2010-05-26 23:29:56 +0000 |
commit | e2c8894947026f2b84d9bf21d53ff7514e7889f2 (patch) | |
tree | 552bd73f7b39b745e0ca3875d676d22ac266a329 /file.c | |
parent | 9992de5a4aac3096d1226cdc9d3b711edf269ab5 (diff) | |
download | wireshark-e2c8894947026f2b84d9bf21d53ff7514e7889f2.tar.gz |
Another attempt at bug 4669: Properly set the previous-displayed-packet
timestamp when we're recalculating reference times.
Remove an unused variable. Add whitespace & comment fixups.
svn path=/trunk/; revision=32985
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -2354,13 +2354,16 @@ ref_time_packets(capture_file *cf) nstime_set_unset(&first_ts); nstime_set_unset(&prev_dis_ts); - nstime_set_unset(&prev_cap_ts); cum_bytes = 0; for (fdata = cf->plist_start; fdata != NULL; fdata = fdata->next) { /* just add some value here until we know if it is being displayed or not */ fdata->cum_bytes = cum_bytes + fdata->pkt_len; + /* + *Timestamps + */ + /* If we don't have the time stamp of the first packet in the capture, it's because this is the first packet. Save the time stamp of this packet as the time stamp of the first packet. */ @@ -2370,7 +2373,7 @@ ref_time_packets(capture_file *cf) /* 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; + first_ts = fdata->abs_ts; } /* If we don't have the time stamp of the previous displayed packet, @@ -2396,12 +2399,17 @@ ref_time_packets(capture_file *cf) this packet. */ nstime_delta(&fdata->del_dis_ts, &fdata->abs_ts, &prev_dis_ts); + prev_dis_ts = fdata->abs_ts; + + /* + * Byte counts + */ 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 even if they dont pass the display filter */ if(fdata->flags.ref_time){ - /* if this was a TIME REF frame we should reset the cul bytes field */ + /* if this was a TIME REF frame we should reset the cum_bytes field */ cum_bytes = fdata->pkt_len; fdata->cum_bytes = cum_bytes; } else { |