diff options
author | Martin Mathieson <martin.mathieson@keysight.com> | 2020-08-06 22:46:38 +0100 |
---|---|---|
committer | Martin Mathieson <martin.r.mathieson@googlemail.com> | 2020-08-08 10:25:48 +0000 |
commit | c931f0d341d334973604a59ad8e426e4f0a183c6 (patch) | |
tree | de9593cea60970436a328de0a0c46c51b46b5588 /epan/dissectors/packet-ms-mms.c | |
parent | f5a8c08b1206bf4ddbbc07c3dc2e19ca6607dd15 (diff) |
Fix most remaining detected cases where item with wrong type is used.
Error: proto_tree_add_string(.., hf_ansi_a_lai_mcc, ...) called at epan/dissectors/packet-ansi_a.c:3656 with type FT_UINT8
(allowed types are {'FT_STRINGZPAD', 'FT_STRINGZ', 'FT_STRING'} )
Error: proto_tree_add_string(.., hf_ansi_a_lai_mnc, ...) called at epan/dissectors/packet-ansi_a.c:3666 with type FT_UINT8
(allowed types are {'FT_STRINGZPAD', 'FT_STRINGZ', 'FT_STRING'} )
Error: proto_tree_add_none_format(.., hf_bthci_evt_vendor_codecs_item, ...) called at epan/dissectors/packet-bthci_evt.c:4712 with type FT_UINT32
(allowed types are {'FT_NONE'} )
Error: proto_tree_add_string(.., hf_kademlia_tag_hash, ...) called at epan/dissectors/packet-edonkey.c:1100 with type FT_BYTES
(allowed types are {'FT_STRINGZPAD', 'FT_STRINGZ', 'FT_STRING'} )
Error: proto_tree_add_string(.., hf_msmms_data_timing_pair, ...) called at epan/dissectors/packet-ms-mms.c:680 with type FT_NONE
(allowed types are {'FT_STRINGZPAD', 'FT_STRINGZ', 'FT_STRING'} )
Error: proto_tree_add_float_format_value(.., hf_fp_tpc_po, ...) called at epan/dissectors/packet-umts_fp.c:2405 with type FT_UINT8
(allowed types are {'FT_FLOAT'} )
Change-Id: I1ed0276ad9c810ca6b1b01d581c3d73ae28fb9ad
Reviewed-on: https://code.wireshark.org/review/38081
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
Diffstat (limited to 'epan/dissectors/packet-ms-mms.c')
-rw-r--r-- | epan/dissectors/packet-ms-mms.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/epan/dissectors/packet-ms-mms.c b/epan/dissectors/packet-ms-mms.c index db1d2cc2fa..f4dbcd0ffb 100644 --- a/epan/dissectors/packet-ms-mms.c +++ b/epan/dissectors/packet-ms-mms.c @@ -596,7 +596,7 @@ static gint dissect_msmms_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr gint offset = 0; proto_item *ti; proto_tree *msmms_tree; - proto_tree *msmms_data_timing_pair = NULL; + proto_tree *msmms_data_timing_pair_tree = NULL; guint32 sequence_number; guint16 packet_length; guint16 packet_length_found; @@ -677,18 +677,19 @@ static gint dissect_msmms_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr /* Parse UDP Timing packet pair headers if present */ if (value == 0x01) { - ti = proto_tree_add_string(msmms_tree, hf_msmms_data_timing_pair, tvb, offset, 8, ""); - msmms_data_timing_pair = proto_item_add_subtree(ti, ett_msmms_data_timing_packet_pair); + /* Create subtree */ + ti = proto_tree_add_string_format(msmms_tree, hf_msmms_data_timing_pair, tvb, offset, 8, "", "Data timing pair"); + msmms_data_timing_pair_tree = proto_item_add_subtree(ti, ett_msmms_data_timing_packet_pair); - proto_tree_add_item(msmms_data_timing_pair, hf_msmms_data_timing_pair_seqno, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(msmms_data_timing_pair_tree, hf_msmms_data_timing_pair_seqno, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(msmms_data_timing_pair, hf_msmms_data_timing_pair_flags, tvb, offset, 3, ENC_LITTLE_ENDIAN); + proto_tree_add_item(msmms_data_timing_pair_tree, hf_msmms_data_timing_pair_flags, tvb, offset, 3, ENC_LITTLE_ENDIAN); offset += 3; - proto_tree_add_item(msmms_data_timing_pair, hf_msmms_data_timing_pair_id, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(msmms_data_timing_pair_tree, hf_msmms_data_timing_pair_id, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(msmms_data_timing_pair, hf_msmms_data_timing_pair_flag, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(msmms_data_timing_pair_tree, hf_msmms_data_timing_pair_flag, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(msmms_data_timing_pair, hf_msmms_data_timing_pair_packet_length, tvb, offset, 2, ENC_LITTLE_ENDIAN); + proto_tree_add_item(msmms_data_timing_pair_tree, hf_msmms_data_timing_pair_packet_length, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset += 2; } @@ -1765,7 +1766,7 @@ void proto_register_msmms(void) { "Data timing pair", "msmms.data.timing-pair", - FT_NONE, + FT_STRING, BASE_NONE, NULL, 0x0, @@ -1826,7 +1827,7 @@ void proto_register_msmms(void) "Packet length", "msmms.data.timing-pair.packet-length", FT_UINT16, - BASE_HEX, + BASE_DEC, NULL, 0x0, NULL, HFILL |