diff options
author | Michal Labedzki <michal.labedzki@tieto.com> | 2017-03-20 16:00:51 +0100 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2017-04-04 11:29:36 +0000 |
commit | ae7ac4441e2a46b2d34e00e94fcc72e25152644c (patch) | |
tree | 56ae3b7f871a2e2083f96ec402539e4b833900df | |
parent | 4543d339e35173523e5d3a7b21248a0c335d7348 (diff) | |
download | wireshark-ae7ac4441e2a46b2d34e00e94fcc72e25152644c.tar.gz |
Bluetooth: HFP: Fix expert info for reserved field in +BRSFs
It seems to be issue introduced while implementing
features from new specification - add new bits in bitmask field
without correcting expert info condition.
Change-Id: I5a4fb4147971f565cfb5dd1abf4e5616ce9da4c5
Reviewed-on: https://code.wireshark.org/review/20895
Petri-Dish: Michal Labedzki <michal.labedzki@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
-rw-r--r-- | epan/dissectors/packet-bthfp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/epan/dissectors/packet-bthfp.c b/epan/dissectors/packet-bthfp.c index 726700d238..045ac3dcb8 100644 --- a/epan/dissectors/packet-bthfp.c +++ b/epan/dissectors/packet-bthfp.c @@ -725,7 +725,7 @@ dissect_brsf_parameter(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, }; pitem = proto_tree_add_bitmask_value_with_flags(tree, tvb, offset, hf_brsf_hs, ett_bthfp_brsf_hf, hs, value, BMT_NO_APPEND); - if (value >> 8) { + if (value >> 10) { expert_add_info(pinfo, pitem, &ei_brfs_hs_reserved_bits); } } else { @@ -748,7 +748,7 @@ dissect_brsf_parameter(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, pitem = proto_tree_add_bitmask_value_with_flags(tree, tvb, offset, hf_brsf_ag, ett_bthfp_brsf_ag, ag, value, BMT_NO_APPEND); - if (value >> 10) { + if (value >> 12) { expert_add_info(pinfo, pitem, &ei_brfs_ag_reserved_bits); } } @@ -2900,8 +2900,8 @@ proto_register_bthfp(void) { &ei_non_mandatory_command, { "bthfp.expert.non_mandatory_command", PI_PROTOCOL, PI_NOTE, "Non-mandatory command in HFP", EXPFILL }}, { &ei_invalid_usage, { "bthfp.expert.invalid_usage", PI_PROTOCOL, PI_WARN, "Non mandatory type or command in this role", EXPFILL }}, { &ei_unknown_parameter, { "bthfp.expert.unknown_parameter", PI_PROTOCOL, PI_WARN, "Unknown parameter", EXPFILL }}, - { &ei_brfs_hs_reserved_bits, { "bthfp.expert.brsf.hs.reserved_bits", PI_PROTOCOL, PI_WARN, "The reserved bits [8-31] shall be initialized to Zero", EXPFILL }}, - { &ei_brfs_ag_reserved_bits, { "bthfp.expert.brsf.ag.reserved_bits", PI_PROTOCOL, PI_WARN, "The reserved bits [10-31] shall be initialized to Zero", EXPFILL }}, + { &ei_brfs_hs_reserved_bits, { "bthfp.expert.brsf.hs.reserved_bits", PI_PROTOCOL, PI_WARN, "The reserved bits [10-31] shall be initialized to Zero", EXPFILL }}, + { &ei_brfs_ag_reserved_bits, { "bthfp.expert.brsf.ag.reserved_bits", PI_PROTOCOL, PI_WARN, "The reserved bits [12-31] shall be initialized to Zero", EXPFILL }}, { &ei_vgm_gain, { "bthfp.expert.vgm", PI_PROTOCOL, PI_WARN, "Gain of microphone exceeds range 0-15", EXPFILL }}, { &ei_vgs_gain, { "bthfp.expert.vgs", PI_PROTOCOL, PI_WARN, "Gain of speaker exceeds range 0-15", EXPFILL }}, { &ei_nrec, { "bthfp.expert.nrec", PI_PROTOCOL, PI_WARN, "Only 0 is valid", EXPFILL }}, |