aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-btrfcomm.c
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2013-03-19 13:51:52 +0000
committerPascal Quantin <pascal.quantin@gmail.com>2013-03-19 13:51:52 +0000
commitd31620a7bf42c2bb561188f0611af3097e0e8173 (patch)
tree3391bc5742ede5e33903a77c4b1e5585c5a396d5 /epan/dissectors/packet-btrfcomm.c
parent26ddabf0d787402f3413b945e3a68190d6c68f61 (diff)
From Michal Labedzki via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 :
Remove C++ incompatibilities from Bluetooth dissectors and switch to wmem API svn path=/trunk/; revision=48414
Diffstat (limited to 'epan/dissectors/packet-btrfcomm.c')
-rw-r--r--epan/dissectors/packet-btrfcomm.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/epan/dissectors/packet-btrfcomm.c b/epan/dissectors/packet-btrfcomm.c
index 4ab31921f7..0275675209 100644
--- a/epan/dissectors/packet-btrfcomm.c
+++ b/epan/dissectors/packet-btrfcomm.c
@@ -37,6 +37,7 @@
#include <epan/expert.h>
#include <epan/tap.h>
#include <epan/uat.h>
+#include <epan/wmem/wmem.h>
#include "packet-btsdp.h"
#include "packet-btl2cap.h"
@@ -235,6 +236,13 @@ static const value_string vs_cr[] = {
{0, NULL}
};
+void proto_register_btrfcomm(void);
+void proto_reg_handoff_btrfcomm(void);
+void proto_register_btdun(void);
+void proto_reg_handoff_btdun(void);
+void proto_register_btspp(void);
+void proto_reg_handoff_btspp(void);
+
static dissector_handle_t
find_proto_by_channel(guint channel) {
guint i_channel;
@@ -337,7 +345,7 @@ dissect_ctrl_pn(packet_info *pinfo, proto_tree *t, tvbuff_t *tvb, int offset, in
dlci_state = (dlci_state_t *)se_tree_lookup32(dlci_table, token);
if (!dlci_state) {
- dlci_state = se_new0(dlci_state_t);
+ dlci_state = wmem_new0(wmem_file_scope(), dlci_state_t);
se_tree_insert32(dlci_table, token, dlci_state);
}
@@ -608,7 +616,7 @@ dissect_btrfcomm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
dlci_state = (dlci_state_t *)se_tree_lookup32(dlci_table, token);
if (!dlci_state) {
- dlci_state = se_new0(dlci_state_t);
+ dlci_state = wmem_new0(wmem_file_scope(), dlci_state_t);
se_tree_insert32(dlci_table, token, dlci_state);
}
}
@@ -977,7 +985,7 @@ proto_register_btrfcomm(void)
static int
btrfcomm_sdp_tap_packet(void *arg _U_, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *arg2)
{
- btsdp_data_t *sdp_data = (btsdp_data_t *) arg2;
+ const btsdp_data_t *sdp_data = (const btsdp_data_t *) arg2;
if (sdp_data->protocol == BTSDP_RFCOMM_PROTOCOL_UUID) {
guint32 token;
@@ -988,7 +996,7 @@ btrfcomm_sdp_tap_packet(void *arg _U_, packet_info *pinfo _U_, epan_dissect_t *e
dlci_state = (dlci_state_t *)se_tree_lookup32(dlci_table, token);
if (!dlci_state) {
- dlci_state = se_new0(dlci_state_t);
+ dlci_state = wmem_new0(wmem_file_scope(), dlci_state_t);
se_tree_insert32(dlci_table, token, dlci_state);
}
dlci_state->service = sdp_data->service;