aboutsummaryrefslogtreecommitdiffstats
path: root/proto_hier_stats.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2014-05-23 15:35:32 -0700
committerGuy Harris <guy@alum.mit.edu>2014-05-23 22:36:01 +0000
commitdc0ff56d753355049e1bd2e7058f6d8691817584 (patch)
treee06a6deb39b36a5e96a2b29553e989a053aea23d /proto_hier_stats.c
parentf635efb6a63e10c03713cfae75490dda7cd1092e (diff)
More checks for the presence of a time stamp.
Change-Id: If8dd4c37bcb1b35dd9f988184ad53118172ae9db Reviewed-on: https://code.wireshark.org/review/1764 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'proto_hier_stats.c')
-rw-r--r--proto_hier_stats.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/proto_hier_stats.c b/proto_hier_stats.c
index 68eaaa1eac..42ef942220 100644
--- a/proto_hier_stats.c
+++ b/proto_hier_stats.c
@@ -159,13 +159,15 @@ process_frame(frame_data *frame, column_info *cinfo, ph_stats_t* ps)
/* Get stats from this protocol tree */
process_tree(edt.tree, ps, frame->pkt_len);
- /* Update times */
- cur_time = nstime_to_sec(&frame->abs_ts);
- if (cur_time < ps->first_time) {
- ps->first_time = cur_time;
- }
- if (cur_time > ps->last_time){
- ps->last_time = cur_time;
+ if (frame->flags.has_ts) {
+ /* Update times */
+ cur_time = nstime_to_sec(&frame->abs_ts);
+ if (cur_time < ps->first_time) {
+ ps->first_time = cur_time;
+ }
+ if (cur_time > ps->last_time){
+ ps->last_time = cur_time;
+ }
}
/* Free our memory. */
@@ -266,10 +268,12 @@ ph_stats_new(void)
look only at those packets. */
if (frame->flags.passed_dfilter) {
- if (tot_packets == 0) {
- double cur_time = nstime_to_sec(&frame->abs_ts);
- ps->first_time = cur_time;
- ps->last_time = cur_time;
+ if (frame->flags.has_ts) {
+ if (tot_packets == 0) {
+ double cur_time = nstime_to_sec(&frame->abs_ts);
+ ps->first_time = cur_time;
+ ps->last_time = cur_time;
+ }
}
/* we don't care about colinfo */