aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorMichal Labedzki <michal.labedzki@tieto.com>2014-07-28 13:53:11 +0200
committerEvan Huus <eapache@gmail.com>2014-07-29 01:26:25 +0000
commit75c7b154a2619292968cc52313c4aaf3ea21c5a3 (patch)
treec60b04e20b35ec059d5e47c5fc48b81dc243eb6a /epan
parent82efb212884ff8fdd269133b1b80682ef51eb590 (diff)
Bluetooth: Fix OBEX over L2CAP detection
There are two cases: 1. btl2cap -> btrfcomm -> btobex 2. btl2cap -> btobex Case 2 is rare, so according to its name and to avoid confusion I based on it. Bug:10316 Change-Id: Ibeabeaf2f8376425460c56bad8fb980b460dd940 Reviewed-on: https://code.wireshark.org/review/3225 Reviewed-by: Evan Huus <eapache@gmail.com>
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-btl2cap.c3
-rw-r--r--epan/dissectors/packet-btl2cap.h2
-rw-r--r--epan/dissectors/packet-btobex.c2
-rw-r--r--epan/dissectors/packet-btrfcomm.c2
-rw-r--r--epan/dissectors/packet-btrfcomm.h2
5 files changed, 6 insertions, 5 deletions
diff --git a/epan/dissectors/packet-btl2cap.c b/epan/dissectors/packet-btl2cap.c
index d0266b01d2..2baa5d11b6 100644
--- a/epan/dissectors/packet-btl2cap.c
+++ b/epan/dissectors/packet-btl2cap.c
@@ -40,7 +40,8 @@
#include "packet-btl2cap.h"
/* Initialize the protocol and registered fields */
-static int proto_btl2cap = -1;
+int proto_btl2cap = -1;
+
static int hf_btl2cap_length = -1;
static int hf_btl2cap_cid = -1;
static int hf_btl2cap_payload = -1;
diff --git a/epan/dissectors/packet-btl2cap.h b/epan/dissectors/packet-btl2cap.h
index c67daf9ee3..f3f7446dfa 100644
--- a/epan/dissectors/packet-btl2cap.h
+++ b/epan/dissectors/packet-btl2cap.h
@@ -68,6 +68,8 @@ typedef struct _btl2cap_data_t {
guint32 remote_bd_addr_id;
} btl2cap_data_t;
+extern int proto_btl2cap;
+
#endif
/*
diff --git a/epan/dissectors/packet-btobex.c b/epan/dissectors/packet-btobex.c
index 94660af5e8..2dac7740f4 100644
--- a/epan/dissectors/packet-btobex.c
+++ b/epan/dissectors/packet-btobex.c
@@ -1419,7 +1419,7 @@ dissect_btobex(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
save_fragmented = pinfo->fragmented;
- is_obex_over_l2cap = (proto_btrfcomm == (gint) GPOINTER_TO_UINT(wmem_list_frame_data(
+ is_obex_over_l2cap = (proto_btl2cap == (gint) GPOINTER_TO_UINT(wmem_list_frame_data(
wmem_list_frame_prev(wmem_list_tail(pinfo->layers)))));
if (is_obex_over_l2cap) {
diff --git a/epan/dissectors/packet-btrfcomm.c b/epan/dissectors/packet-btrfcomm.c
index c9c5670f01..f32f3c2c2e 100644
--- a/epan/dissectors/packet-btrfcomm.c
+++ b/epan/dissectors/packet-btrfcomm.c
@@ -98,7 +98,7 @@ static int hf_address = -1;
static int hf_control = -1;
/* Initialize the protocol and registered fields */
-int proto_btrfcomm = -1;
+static int proto_btrfcomm = -1;
static int proto_btdun = -1;
static int proto_btspp = -1;
static int proto_btgnss = -1;
diff --git a/epan/dissectors/packet-btrfcomm.h b/epan/dissectors/packet-btrfcomm.h
index 92598bbfae..bb02307389 100644
--- a/epan/dissectors/packet-btrfcomm.h
+++ b/epan/dissectors/packet-btrfcomm.h
@@ -22,8 +22,6 @@
#ifndef __PACKET_BTRFCOMM_H__
#define __PACKET_BTRFCOMM_H__
-extern int proto_btrfcomm;
-
typedef struct _btrfcomm_data_t {
guint32 interface_id;
guint32 adapter_id;