aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-itdm.c
diff options
context:
space:
mode:
authorwmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7>2009-01-15 14:32:20 +0000
committerwmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7>2009-01-15 14:32:20 +0000
commit64ac2d53b8bc5649918931819b6022654c220a61 (patch)
tree7260d8b9172fb889c76f91829efa35b0f321fd0e /epan/dissectors/packet-itdm.c
parent6829cce97d5c19cf6dc51c281ff6f6c377b7a066 (diff)
Add prefs callback so a pref change works...
Also: minor changes related to reg_handoff git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@27238 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-itdm.c')
-rw-r--r--epan/dissectors/packet-itdm.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/epan/dissectors/packet-itdm.c b/epan/dissectors/packet-itdm.c
index c90493fd31..63866963d8 100644
--- a/epan/dissectors/packet-itdm.c
+++ b/epan/dissectors/packet-itdm.c
@@ -57,7 +57,6 @@ static gint ett_itdm = -1;
/* ZZZZ some magic number.. */
static guint gbl_ItdmMPLSLabel = 0x99887;
-static dissector_handle_t itdm_handle;
static dissector_handle_t data_handle;
#define ITDM_CMD_NEW_CHAN 1
@@ -224,6 +223,8 @@ dissect_itdm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
dissect_itdm_125usec(tvb, pinfo, tree);
}
+void proto_reg_handoff_itdm(void);
+
void
proto_register_itdm(void)
{
@@ -273,7 +274,7 @@ proto_register_itdm(void)
proto_register_field_array(proto_itdm, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
- itdm_module = prefs_register_protocol(proto_itdm, NULL);
+ itdm_module = prefs_register_protocol(proto_itdm, proto_reg_handoff_itdm);
prefs_register_uint_preference(itdm_module, "mpls_label",
"ITDM MPLS label (Flow Bundle ID)",
"The MPLS label (aka Flow Bundle ID) used by ITDM traffic.",
@@ -284,10 +285,11 @@ void
proto_reg_handoff_itdm(void)
{
static gboolean Initialized=FALSE;
+ static dissector_handle_t itdm_handle;
static guint ItdmMPLSLabel;
if (!Initialized) {
- itdm_handle = create_dissector_handle(dissect_itdm, proto_itdm);
+ itdm_handle = find_dissector("itdm");;
data_handle = find_dissector("data");
Initialized=TRUE;
} else {