aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-btl2cap.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2013-11-30 19:26:18 +0000
committerMichael Mann <mmann78@netscape.net>2013-11-30 19:26:18 +0000
commite2d2d12098593bd7dd6bfbac360c53f68231dfa4 (patch)
tree5ba1c59e2c08a821cfcc355179d6dcb725d3f59e /epan/dissectors/packet-btl2cap.c
parentd1e4422a4abc3667351286b13a4224fda65ba26b (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-btl2cap.c')
-rw-r--r--epan/dissectors/packet-btl2cap.c24
1 files changed, 2 insertions, 22 deletions
diff --git a/epan/dissectors/packet-btl2cap.c b/epan/dissectors/packet-btl2cap.c
index c5304f78e2..a22fade5d2 100644
--- a/epan/dissectors/packet-btl2cap.c
+++ b/epan/dissectors/packet-btl2cap.c
@@ -150,7 +150,6 @@ static dissector_table_t l2cap_service_dissector_table;
* For received CIDs we 'or' the cid with 0x80000000 in this table
*/
static wmem_tree_t *cid_to_psm_table = NULL;
-static wmem_tree_t *sdp_service_infos = NULL;
typedef struct _config_data_t {
guint8 mode;
@@ -473,10 +472,8 @@ get_service_uuid(packet_info *pinfo, btl2cap_data_t *l2cap_data, guint16 psm, gb
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);
- else
- service_info = NULL;
+ service_info = btsdp_get_service_info(key);
+
if (service_info && service_info->interface_id == interface_id &&
service_info->adapter_id == adapter_id &&
service_info->sdp_psm == SDP_PSM_DEFAULT &&
@@ -1935,19 +1932,6 @@ dissect_btl2cap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
}
-static int
-btl2cap_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;
-}
-
-
/* Register the protocol with Wireshark */
void
proto_register_btl2cap(void)
@@ -2436,10 +2420,6 @@ proto_register_btl2cap(void)
void
proto_reg_handoff_btl2cap(void)
{
- /* tap into the btsdp dissector to look for l2cap PSM infomation that
- helps us determine the type of l2cap payload, i.e. which service is
- using the PSM channel so we know which sub-dissector to call */
- register_tap_listener("btsdp", NULL, NULL, TL_IS_DISSECTOR_HELPER, NULL, btl2cap_sdp_tap_packet, NULL);
}
/*