diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2008-02-22 12:28:41 +0000 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2008-02-22 12:28:41 +0000 |
commit | 20ed60cf1f3b9ade81462190a4504a59ac0fda43 (patch) | |
tree | 4cd3a314083b61b6a4ac4ceb5eef98722d0e69d0 /epan | |
parent | 33524cdd4814bfcf45a52b0d8dd8295226d86d72 (diff) |
Added FT_ABSOLUTE_TIME and FT_RELATIVE_TIME to custom columns.
svn path=/trunk/; revision=24419
Diffstat (limited to 'epan')
-rw-r--r-- | epan/proto.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/epan/proto.c b/epan/proto.c index 651c2e1aad..fb1cd632ab 100644 --- a/epan/proto.c +++ b/epan/proto.c @@ -1561,7 +1561,16 @@ proto_tree_add_time_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint st static void proto_tree_set_time(field_info *fi, nstime_t *value_ptr) { + header_field_info *hfinfo; + DISSECTOR_ASSERT(value_ptr != NULL); + hfinfo = fi->hfinfo; + + if (hfinfo->type == FT_ABSOLUTE_TIME) { + col_custom_set_fstr(hfinfo->abbrev, "%s", abs_time_to_str(value_ptr)); + } else if (hfinfo->type == FT_RELATIVE_TIME) { + col_custom_set_fstr(hfinfo->abbrev, "%s", rel_time_to_secs_str(value_ptr)); + } fvalue_set(&fi->value, value_ptr, FALSE); } |