aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-btmcap.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-btmcap.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-btmcap.c')
-rw-r--r--epan/dissectors/packet-btmcap.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/epan/dissectors/packet-btmcap.c b/epan/dissectors/packet-btmcap.c
index d30a00b383..1ca6fecaef 100644
--- a/epan/dissectors/packet-btmcap.c
+++ b/epan/dissectors/packet-btmcap.c
@@ -49,7 +49,6 @@ static int hf_btmcap_bluetooth_clock_access_resolution = -1;
static int hf_btmcap_sync_lead_time = -1;
static int hf_btmcap_timestamp_native_resolution = -1;
static int hf_btmcap_timestamp_native_accuracy = -1;
-
static int hf_btmcap_data = -1;
static gint ett_btmcap = -1;
@@ -58,6 +57,8 @@ static expert_field ei_btmcap_mdl_id_ffff = EI_INIT;
static expert_field ei_btmcap_response_parameters_bad = EI_INIT;
static expert_field ei_btmcap_unexpected_data = EI_INIT;
+static dissector_handle_t btmcap_handle;
+
static const value_string op_code_vals[] = {
{ 0x00, "ERROR_RSP" },
{ 0x01, "MD_CREATE_MDL_REQ" },
@@ -418,7 +419,7 @@ proto_register_btmcap(void)
};
proto_btmcap = proto_register_protocol("Bluetooth MCAP Protocol", "BT MCAP", "btmcap");
- new_register_dissector("btmcap", dissect_btmcap, proto_btmcap);
+ btmcap_handle = new_register_dissector("btmcap", dissect_btmcap, proto_btmcap);
proto_register_field_array(proto_btmcap, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
@@ -435,10 +436,6 @@ proto_register_btmcap(void)
void
proto_reg_handoff_btmcap(void)
{
- dissector_handle_t btmcap_handle;
-
- btmcap_handle = find_dissector("btmcap");
-
dissector_add_uint("btl2cap.service", BTSDP_MCAP_CONTROL_CHANNEL_PROTOCOL_UUID, btmcap_handle);
dissector_add_uint("btl2cap.service", BTSDP_MCAP_DATA_CHANNEL_PROTOCOL_UUID, btmcap_handle);