summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-asap.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2016-12-15 13:01:27 -0500
committerMichael Mann <mmann78@netscape.net>2016-12-16 03:04:11 +0000
commit232cb9a2dd87ea9cc9c88d4c32bfb7b452705130 (patch)
treeff1b2039727322c1f8e332f2040f0ba5d83c4f43 /epan/dissectors/packet-asap.c
parent8efb7fece1ffefd26dacd79f5ec8722c4e01e827 (diff)
downloadwireshark-232cb9a2dd87ea9cc9c88d4c32bfb7b452705130.tar.gz
Remove proto_item_append_text calls in favor of BASE_UNIT_STRING.
Many proto_item_append_text calls were just adding a unit string to a field. There's a better way to do that now. Change-Id: Id18d5ac1ea4d8ecdc4cbe7ebaec07fbd2eab6e78 Reviewed-on: https://code.wireshark.org/review/19289 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-asap.c')
-rw-r--r--epan/dissectors/packet-asap.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/epan/dissectors/packet-asap.c b/epan/dissectors/packet-asap.c
index 4079ef5d2b..ee294fdf58 100644
--- a/epan/dissectors/packet-asap.c
+++ b/epan/dissectors/packet-asap.c
@@ -507,12 +507,10 @@ static void
dissect_pool_element_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree)
{
tvbuff_t* parameters_tvb;
- proto_item* pi;
proto_tree_add_item(parameter_tree, hf_pe_pe_identifier, parameter_tvb, PE_PE_IDENTIFIER_OFFSET, PE_PE_IDENTIFIER_LENGTH, ENC_BIG_ENDIAN);
proto_tree_add_item(parameter_tree, hf_home_enrp_id, parameter_tvb, HOME_ENRP_INDENTIFIER_OFFSET, HOME_ENRP_INDENTIFIER_LENGTH, ENC_BIG_ENDIAN);
- pi = proto_tree_add_item(parameter_tree, hf_reg_life, parameter_tvb, REGISTRATION_LIFE_OFFSET, REGISTRATION_LIFE_LENGTH, ENC_BIG_ENDIAN);
- proto_item_append_text(pi, "ms");
+ proto_tree_add_item(parameter_tree, hf_reg_life, parameter_tvb, REGISTRATION_LIFE_OFFSET, REGISTRATION_LIFE_LENGTH, ENC_BIG_ENDIAN);
parameters_tvb = tvb_new_subset_remaining(parameter_tvb, USER_TRANSPORT_PARAMETER_OFFSET);
dissect_parameters(parameters_tvb, parameter_tree);
@@ -889,7 +887,7 @@ proto_register_asap(void)
{ &hf_pool_handle, { "Pool Handle", "asap.pool_handle_pool_handle", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_pe_pe_identifier, { "PE Identifier", "asap.pool_element_pe_identifier", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_home_enrp_id, { "Home ENRP Server Identifier", "asap.pool_element_home_enrp_server_identifier", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL } },
- { &hf_reg_life, { "Registration Life", "asap.pool_element_registration_life", FT_INT32, BASE_DEC, NULL, 0x0, NULL, HFILL } },
+ { &hf_reg_life, { "Registration Life", "asap.pool_element_registration_life", FT_INT32, BASE_DEC|BASE_UNIT_STRING, &units_milliseconds, 0x0, NULL, HFILL } },
{ &hf_cookie, { "Cookie", "asap.cookie", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_pe_identifier, { "PE Identifier", "asap.pe_identifier", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_pe_checksum, { "PE Checksum", "asap.pe_checksum", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },