diff options
author | Guy Harris <guy@alum.mit.edu> | 2018-07-01 20:32:52 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2018-07-02 03:33:31 +0000 |
commit | a7961382833ba83c614aa435060ebc50280f359d (patch) | |
tree | ffaf2049549b7be622224f9b532e22a5ec41afb0 /epan/dissectors/packet-srvloc.c | |
parent | e9dc611e4fbbd4c4f86dc546c11c096fd0870af0 (diff) |
Use proto_tree_add_item() for a number of time values.
Change-Id: I862a7870d335f8b0b57d13e2981a8bb1a02b2726
Reviewed-on: https://code.wireshark.org/review/28563
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/dissectors/packet-srvloc.c')
-rw-r--r-- | epan/dissectors/packet-srvloc.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/epan/dissectors/packet-srvloc.c b/epan/dissectors/packet-srvloc.c index 629ca78607..3aea0fdb57 100644 --- a/epan/dissectors/packet-srvloc.c +++ b/epan/dissectors/packet-srvloc.c @@ -370,13 +370,10 @@ static int dissect_authblk_v2(tvbuff_t *tvb, int offset, proto_tree *tree) { guint16 length; - nstime_t ts; proto_tree_add_item(tree, hf_srvloc_authblkv2_bsd, tvb, offset, 2, ENC_BIG_ENDIAN); proto_tree_add_item(tree, hf_srvloc_authblkv2_len, tvb, offset+2, 2, ENC_BIG_ENDIAN); - ts.nsecs = 0; - ts.secs = tvb_get_ntohl(tvb, offset + 4); - proto_tree_add_time(tree, hf_srvloc_authblkv2_timestamp, tvb, offset+4, 4, &ts); + proto_tree_add_item(tree, hf_srvloc_authblkv2_timestamp, tvb, offset+4, 4, ENC_TIME_SECS|ENC_BIG_ENDIAN); length = tvb_get_ntohs(tvb, offset + 8); proto_tree_add_uint(tree, hf_srvloc_authblkv2_slpspilen, tvb, offset + 8, 2, length); offset += 10; @@ -793,7 +790,6 @@ dissect_srvloc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _ guint32 count; guint32 next_ext_off; /* three bytes, v2 only */ guint16 lang_tag_len; - nstime_t ts; proto_item *expert_item; guint16 expert_status; @@ -1229,10 +1225,8 @@ dissect_srvloc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _ expert_add_info_format(pinfo, expert_item, &ei_srvloc_error_v2, "Error: %s", val_to_str(expert_status, srvloc_errs_v2, "Unknown SRVLOC Error (0x%02x)")); } offset += 2; - ts.nsecs = 0; - ts.secs = tvb_get_ntohl(tvb, offset); - proto_tree_add_time(srvloc_tree, hf_srvloc_daadvert_timestamp, tvb, offset, 4, - &ts); + proto_tree_add_item(srvloc_tree, hf_srvloc_daadvert_timestamp, tvb, offset, 4, + ENC_TIME_SECS|ENC_BIG_ENDIAN); offset += 4; length = tvb_get_ntohs(tvb, offset); proto_tree_add_uint(srvloc_tree, hf_srvloc_daadvert_urllen, tvb, offset, 2, length); |