aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-hpteam.c
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2009-06-24 00:29:54 +0000
committerBill Meier <wmeier@newsguy.com>2009-06-24 00:29:54 +0000
commitc98c466139b904fb759189bcdc488c9ccf81d4fa (patch)
treebfeaf73b2ebec925b6807a5f206816320fa7c1a5 /epan/dissectors/packet-hpteam.c
parent0621ecb3a844666fee9617e1204bc9aec57b6b82 (diff)
if (!initialized) ... not req'd + other addt'l minor revisions;
Also: add packet-hpteam.c to Makefile.common so it gets built as part oif Wireshark. svn path=/trunk/; revision=28824
Diffstat (limited to 'epan/dissectors/packet-hpteam.c')
-rw-r--r--epan/dissectors/packet-hpteam.c27
1 files changed, 11 insertions, 16 deletions
diff --git a/epan/dissectors/packet-hpteam.c b/epan/dissectors/packet-hpteam.c
index 3ad74e3dcf..d92c5e6979 100644
--- a/epan/dissectors/packet-hpteam.c
+++ b/epan/dissectors/packet-hpteam.c
@@ -37,11 +37,9 @@
static int proto_hpteam = -1;
-static dissector_handle_t data_handle;
-/* These are the handles of our subdissectors */
-static dissector_handle_t data_handle=NULL;
-static dissector_handle_t hpteam_handle=NULL;
+/* Handle of our "data" subdissector */
+static dissector_handle_t data_handle;
/* Known HP NIC teaming PID values */
static const value_string hpteam_pid_vals[] = {
@@ -58,9 +56,9 @@ static gint ett_hpteam = -1;
static void
dissect_hpteam(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- proto_item *hpteam_item = NULL;
- proto_tree *hpteam_tree = NULL;
- proto_tree *hpteam_header_tree = NULL;
+ proto_item *hpteam_item;
+ proto_tree *hpteam_tree;
+ proto_tree *hpteam_header_tree;
guint32 offset = 0;
const char *strPtr, *HP_Mac;
const guint8 *mac_addr;
@@ -87,7 +85,6 @@ dissect_hpteam(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
}
else {
- data_handle = find_dissector("data");
call_dissector(data_handle, tvb, pinfo, tree);
}
}
@@ -121,12 +118,10 @@ void proto_register_hpteam(void)
void proto_reg_handoff_hpteam(void)
{
- static gboolean initialized = FALSE;
- if (!initialized) {
- data_handle = find_dissector("data");
- hpteam_handle = create_dissector_handle(dissect_hpteam, proto_hpteam);
- /* Register dissector to key off of known PID / OUI combination */
- dissector_add("llc.hpteam_pid", 0x0002, hpteam_handle);
- initialized = TRUE;
- }
+ dissector_handle_t hpteam_handle;
+
+ data_handle = find_dissector("data");
+ hpteam_handle = find_dissector("hpteam");
+ /* Register dissector to key off of known PID / OUI combination */
+ dissector_add("llc.hpteam_pid", 0x0002, hpteam_handle);
}