aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-btavrcp.c
diff options
context:
space:
mode:
authorMichal Labedzki <michal.labedzki@tieto.com>2014-03-03 12:12:03 +0100
committerAnders Broman <a.broman58@gmail.com>2014-03-06 21:58:07 +0000
commitf4591ef55dfb6216394c0d60c149ece0ec70bbac (patch)
treedcc04902a3be5d26b1e48c8c67994394abaf67fb /epan/dissectors/packet-btavrcp.c
parent78ff87e655ee899a93c831581fcb005cb9ef955b (diff)
Bluetooth: Avoid using find_dissector()
Also remove SVN $Id$ lines. Change-Id: I4f2925e6ad8dcfe4a62d879a2cef44447f8ae916 Reviewed-on: https://code.wireshark.org/review/476 Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-btavrcp.c')
-rw-r--r--epan/dissectors/packet-btavrcp.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/epan/dissectors/packet-btavrcp.c b/epan/dissectors/packet-btavrcp.c
index 9c88a9cdd7..22fcdfbde3 100644
--- a/epan/dissectors/packet-btavrcp.c
+++ b/epan/dissectors/packet-btavrcp.c
@@ -212,6 +212,8 @@ static gint ett_btavrcp_path = -1;
static expert_field ei_btavrcp_item_length_bad = EI_INIT;
static expert_field ei_btavrcp_unexpected_data = EI_INIT;
+static dissector_handle_t btavrcp_handle;
+
#define OPCODE_VENDOR_DEPENDANT 0x00
#define OPCODE_UNIT 0x30
#define OPCODE_SUBUNIT 0x31
@@ -3147,7 +3149,7 @@ proto_register_btavrcp(void)
timing = wmem_tree_new_autoreset(wmem_epan_scope(), wmem_file_scope());
proto_btavrcp = proto_register_protocol("Bluetooth AVRCP Profile", "BT AVRCP", "btavrcp");
- new_register_dissector("btavrcp", dissect_btavrcp, proto_btavrcp);
+ btavrcp_handle = new_register_dissector("btavrcp", dissect_btavrcp, proto_btavrcp);
proto_register_field_array(proto_btavrcp, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
@@ -3163,10 +3165,6 @@ proto_register_btavrcp(void)
void
proto_reg_handoff_btavrcp(void)
{
- dissector_handle_t btavrcp_handle;
-
- btavrcp_handle = find_dissector("btavrcp");
-
dissector_add_uint("btavctp.service", BTSDP_AVRCP_TG_SERVICE_UUID, btavrcp_handle);
dissector_add_uint("btavctp.service", BTSDP_AVRCP_CT_SERVICE_UUID, btavrcp_handle);
dissector_add_uint("btavctp.service", BTSDP_AVRCP_SERVICE_UUID, btavrcp_handle);