aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/m2m/packet-m2m.c
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2008-10-25 20:24:31 +0000
committerBill Meier <wmeier@newsguy.com>2008-10-25 20:24:31 +0000
commit05c1929f1d51ef94a5827147aee61d2320434783 (patch)
tree3e6cc68f2dc569fe027498b7deb3d0574cd99c09 /plugins/m2m/packet-m2m.c
parent94c73a47c9e361b6eeeecf53e9b600f9cf1b77a9 (diff)
proto_register/proto_reg_handoff; Various small cleanup and bug-fixing
remove unnecessary #include prefs.f and emem.h in a few cases... svn path=/trunk/; revision=26554
Diffstat (limited to 'plugins/m2m/packet-m2m.c')
-rw-r--r--plugins/m2m/packet-m2m.c33
1 files changed, 12 insertions, 21 deletions
diff --git a/plugins/m2m/packet-m2m.c b/plugins/m2m/packet-m2m.c
index 77061ea8f5..99a4776be5 100644
--- a/plugins/m2m/packet-m2m.c
+++ b/plugins/m2m/packet-m2m.c
@@ -37,7 +37,6 @@
#include <string.h>
#include <glib.h>
#include <epan/packet.h>
-#include <epan/prefs.h>
#include <epan/reassemble.h>
#include <epan/etypes.h>
#include <plugins/wimax/wimax_tlv.h>
@@ -60,7 +59,6 @@ guint g_frame_number = 0;
/* Local Variables */
static gint proto_m2m = -1;
-static dissector_handle_t m2m_handle = NULL;
static dissector_handle_t wimax_fch_burst_handle = NULL;
static dissector_handle_t wimax_cdma_code_burst_handle = NULL;
static dissector_handle_t wimax_pdu_burst_handle = NULL;
@@ -369,31 +367,24 @@ m2m_defragment_init(void)
/* Register Wimax Mac to Mac Protocol handler */
void proto_reg_handoff_m2m(void)
{
- static int Initialized = FALSE;
+ dissector_handle_t m2m_handle;
- if (!Initialized)
- {
- m2m_handle = create_dissector_handle(dissect_m2m, proto_m2m);
- dissector_add("ethertype", ETHERTYPE_WMX_M2M, m2m_handle);
- }
+ m2m_handle = create_dissector_handle(dissect_m2m, proto_m2m);
+ dissector_add("ethertype", ETHERTYPE_WMX_M2M, m2m_handle);
}
/* Register Wimax Mac to Mac Protocol */
void proto_register_m2m(void)
{
- if (proto_m2m == -1)
- {
- proto_m2m = proto_register_protocol (
- "WiMax Mac to Mac Packet", /* name */
- "M2M (m2m)", /* short name */
- "m2m" /* abbrev */
- );
-
- proto_register_field_array(proto_m2m, hf, array_length(hf));
- proto_register_field_array(proto_m2m, hf_tlv, array_length(hf_tlv));
- proto_register_subtree_array(ett, array_length(ett));
- }
- prefs_register_protocol(proto_m2m, proto_reg_handoff_m2m);
+ proto_m2m = proto_register_protocol (
+ "WiMax Mac to Mac Packet", /* name */
+ "M2M (m2m)", /* short name */
+ "m2m" /* abbrev */
+ );
+
+ proto_register_field_array(proto_m2m, hf, array_length(hf));
+ proto_register_field_array(proto_m2m, hf_tlv, array_length(hf_tlv));
+ proto_register_subtree_array(ett, array_length(ett));
/* init the PDU fragment table */
fragment_table_init(&pdu_frag_table);