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-bthsp.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-bthsp.c')
-rw-r--r-- | epan/dissectors/packet-bthsp.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/epan/dissectors/packet-bthsp.c b/epan/dissectors/packet-bthsp.c index 0cbbe73f19..089a57845f 100644 --- a/epan/dissectors/packet-bthsp.c +++ b/epan/dissectors/packet-bthsp.c @@ -71,7 +71,6 @@ static gint ett_bthsp_parameters = -1; static dissector_handle_t bthsp_handle; static wmem_tree_t *fragments = NULL; -static wmem_tree_t *sdp_service_infos = NULL; #define ROLE_UNKNOWN 0 #define ROLE_AG 1 @@ -741,7 +740,7 @@ dissect_bthsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) key[9].length = 0; key[9].key = NULL; - 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 == rfcomm_data->interface_id && service_info->adapter_id == rfcomm_data->adapter_id && service_info->sdp_psm == SDP_PSM_DEFAULT && @@ -1028,18 +1027,6 @@ dissect_bthsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) return offset; } -static int -bthsp_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_register_bthsp(void) { @@ -1177,8 +1164,6 @@ proto_reg_handoff_bthsp(void) dissector_add_uint("btrfcomm.service", BTSDP_HSP_HS_SERVICE_UUID, bthsp_handle); dissector_add_uint("btrfcomm.service", BTSDP_HSP_GW_SERVICE_UUID, bthsp_handle); dissector_add_handle("btrfcomm.channel", bthsp_handle); - - register_tap_listener("btsdp", NULL, NULL, TL_IS_DISSECTOR_HELPER, NULL, bthsp_sdp_tap_packet, NULL); } /* |