diff options
author | Michael Mann <mmann78@netscape.net> | 2013-11-30 19:26:18 +0000 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2013-11-30 19:26:18 +0000 |
commit | e2d2d12098593bd7dd6bfbac360c53f68231dfa4 (patch) | |
tree | 5ba1c59e2c08a821cfcc355179d6dcb725d3f59e /epan/dissectors/packet-btrfcomm.c | |
parent | d1e4422a4abc3667351286b13a4224fda65ba26b (diff) |
Replace "btsdp" tap with function to query service_infos tree, since that's all dissectors were doing with it. Not used outside of dissectors and cuts down on a few redundant global variables.
svn path=/trunk/; revision=53677
Diffstat (limited to 'epan/dissectors/packet-btrfcomm.c')
-rw-r--r-- | epan/dissectors/packet-btrfcomm.c | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/epan/dissectors/packet-btrfcomm.c b/epan/dissectors/packet-btrfcomm.c index f5e3a7d2d1..ab82587ef4 100644 --- a/epan/dissectors/packet-btrfcomm.c +++ b/epan/dissectors/packet-btrfcomm.c @@ -121,8 +121,6 @@ static gint ett_btgnss = -1; static expert_field ei_btrfcomm_mcc_length_bad = EI_INIT; -static wmem_tree_t *sdp_service_infos = NULL; - static dissector_table_t rfcomm_service_dissector_table; static dissector_table_t rfcomm_channel_dissector_table; @@ -660,9 +658,8 @@ dissect_btrfcomm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data key[9].length = 0; key[9].key = NULL; - if (sdp_service_infos) { - service_info = (service_info_t *) wmem_tree_lookup32_array_le(sdp_service_infos, key); - } + service_info = btsdp_get_service_info(key); + if (service_info && service_info->interface_id == l2cap_data->interface_id && service_info->adapter_id == l2cap_data->adapter_id && service_info->sdp_psm == SDP_PSM_DEFAULT && @@ -1104,18 +1101,6 @@ proto_register_btrfcomm(void) register_decode_as(&btrfcomm_chan_da); } -static int -btrfcomm_sdp_tap_packet(void *arg _U_, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *arg2) -{ - const sdp_package_t *sdp_package = (const sdp_package_t *) arg2; - - if (sdp_service_infos == NULL) { - sdp_service_infos = sdp_package->service_infos; - } - - return 0; -} - void proto_reg_handoff_btrfcomm(void) { @@ -1126,11 +1111,6 @@ proto_reg_handoff_btrfcomm(void) dissector_add_handle("btl2cap.cid", btrfcomm_handle); data_handle = find_dissector("data"); - - /* tap into the btsdp dissector to look for rfcomm channel infomation that - helps us determine the type of rfcomm payload, i.e. which service is - using the channels so we know which sub-dissector to call */ - register_tap_listener("btsdp", NULL, NULL, TL_IS_DISSECTOR_HELPER, NULL, btrfcomm_sdp_tap_packet, NULL); } /* Bluetooth Dial-Up Networking (DUN) profile dissection */ |