aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-xot.c
diff options
context:
space:
mode:
authorJakub Zawadzki <darkjames-ws@darkjames.pl>2013-08-05 18:09:43 +0000
committerJakub Zawadzki <darkjames-ws@darkjames.pl>2013-08-05 18:09:43 +0000
commit5fa2a99087bc56ea57ff31a7abf1d17f6bf8a2ca (patch)
treed7066597386b650b9f4b82cf5ea9c8e22c36a980 /epan/dissectors/packet-xot.c
parent9999016855a210f7b0417592c7543c19abf76d41 (diff)
Keep result of [new_]register_dissector in some dissectors.
svn path=/trunk/; revision=51156
Diffstat (limited to 'epan/dissectors/packet-xot.c')
-rw-r--r--epan/dissectors/packet-xot.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/epan/dissectors/packet-xot.c b/epan/dissectors/packet-xot.c
index 5dcd134539..3a79e4e30e 100644
--- a/epan/dissectors/packet-xot.c
+++ b/epan/dissectors/packet-xot.c
@@ -73,8 +73,6 @@ static const value_string xot_pvc_status_vals[] = {
{ 0, NULL}
};
-static dissector_handle_t x25_handle;
-
static gint proto_xot = -1;
static gint ett_xot = -1;
static gint hf_xot_version = -1;
@@ -97,6 +95,10 @@ static gint hf_xot_pvc_send_out_pkt_size = -1;
static gint hf_xot_pvc_init_itf_name = -1;
static gint hf_xot_pvc_resp_itf_name = -1;
+static dissector_handle_t xot_handle;
+
+static dissector_handle_t x25_handle;
+
/* desegmentation of X.25 over multiple TCP */
static gboolean xot_desegment = TRUE;
/* desegmentation of X.25 packet sequences */
@@ -422,7 +424,7 @@ proto_register_xot(void)
proto_xot = proto_register_protocol("X.25 over TCP", "XOT", "xot");
proto_register_field_array(proto_xot, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
- new_register_dissector("xot", dissect_xot_tcp_heur, proto_xot);
+ xot_handle = new_register_dissector("xot", dissect_xot_tcp_heur, proto_xot);
xot_module = prefs_register_protocol(proto_xot, NULL);
prefs_register_bool_preference(xot_module, "desegment",
@@ -442,9 +444,6 @@ proto_register_xot(void)
void
proto_reg_handoff_xot(void)
{
- dissector_handle_t xot_handle;
-
- xot_handle = find_dissector("xot");
dissector_add_uint("tcp.port", TCP_PORT_XOT, xot_handle);
x25_handle = find_dissector("x.25");