diff options
author | Jakub Zawadzki <darkjames-ws@darkjames.pl> | 2013-08-05 19:09:44 +0000 |
---|---|---|
committer | Jakub Zawadzki <darkjames-ws@darkjames.pl> | 2013-08-05 19:09:44 +0000 |
commit | f4bcbeb9f26874ab763e78056638541a5b371cde (patch) | |
tree | 0cfd0c6f58226d6d85bdc0613cdcbfc97432e228 /epan/dissectors/packet-tzsp.c | |
parent | d3af98bb91b83d58b03a6264423b658af111d44b (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-tzsp.c')
-rw-r--r-- | epan/dissectors/packet-tzsp.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/epan/dissectors/packet-tzsp.c b/epan/dissectors/packet-tzsp.c index 050721822d..e377c99330 100644 --- a/epan/dissectors/packet-tzsp.c +++ b/epan/dissectors/packet-tzsp.c @@ -47,6 +47,8 @@ static int hf_tzsp_version = -1; static int hf_tzsp_type = -1; static int hf_tzsp_encap = -1; +static dissector_handle_t tzsp_handle; + /* * Packet types. */ @@ -532,16 +534,13 @@ proto_register_tzsp(void) "tzsp"); proto_register_field_array(proto_tzsp, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); - register_dissector("tzsp", dissect_tzsp, proto_tzsp); + tzsp_handle = register_dissector("tzsp", dissect_tzsp, proto_tzsp); } void proto_reg_handoff_tzsp(void) { - dissector_handle_t tzsp_handle; - - tzsp_handle = create_dissector_handle(dissect_tzsp, proto_tzsp); dissector_add_uint("udp.port", UDP_PORT_TZSP, tzsp_handle); /* Get the data dissector for handling unknown encapsulation types. */ |