aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-nwmtp.c
diff options
context:
space:
mode:
authorJakub Zawadzki <darkjames-ws@darkjames.pl>2013-08-05 19:09:44 +0000
committerJakub Zawadzki <darkjames-ws@darkjames.pl>2013-08-05 19:09:44 +0000
commitf4bcbeb9f26874ab763e78056638541a5b371cde (patch)
tree0cfd0c6f58226d6d85bdc0613cdcbfc97432e228 /epan/dissectors/packet-nwmtp.c
parentd3af98bb91b83d58b03a6264423b658af111d44b (diff)
Keep result of [new_]register_dissector in some dissectors. [2 of x]
(don't create new dissector handle if we can use already existing one) svn path=/trunk/; revision=51159
Diffstat (limited to 'epan/dissectors/packet-nwmtp.c')
-rw-r--r--epan/dissectors/packet-nwmtp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/epan/dissectors/packet-nwmtp.c b/epan/dissectors/packet-nwmtp.c
index d0b6e59c3b..5e231d0ece 100644
--- a/epan/dissectors/packet-nwmtp.c
+++ b/epan/dissectors/packet-nwmtp.c
@@ -43,6 +43,8 @@ static int hf_nwmtp_data_length = -1;
/* subtree pointer */
static gint ett_mwmtp = -1;
+static dissector_handle_t nwmtp_handle;
+
static const value_string nwmtp_transport_type_vals[] = {
{ 2, "UDP" },
{ 3, "TCP" },
@@ -155,14 +157,12 @@ void proto_register_mwmtp(void)
proto_register_field_array(proto_nwmtp, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
- register_dissector("nw_mtp", dissect_nwmtp, proto_nwmtp);
+
+ nwmtp_handle = register_dissector("nw_mtp", dissect_nwmtp, proto_nwmtp);
}
void proto_reg_handoff_nwmtp(void)
{
- dissector_handle_t nwmtp_handle;
-
- nwmtp_handle = create_dissector_handle(dissect_nwmtp, proto_nwmtp);
/* For decode as */
dissector_add_handle("udp.port", nwmtp_handle);
mtp_handle = find_dissector("mtp3");