diff options
author | Jakub Zawadzki <darkjames-ws@darkjames.pl> | 2013-08-05 18:09:43 +0000 |
---|---|---|
committer | Jakub Zawadzki <darkjames-ws@darkjames.pl> | 2013-08-05 18:09:43 +0000 |
commit | 5fa2a99087bc56ea57ff31a7abf1d17f6bf8a2ca (patch) | |
tree | d7066597386b650b9f4b82cf5ea9c8e22c36a980 /epan/dissectors/packet-hdfs.c | |
parent | 9999016855a210f7b0417592c7543c19abf76d41 (diff) |
Keep result of [new_]register_dissector in some dissectors.
svn path=/trunk/; revision=51156
Diffstat (limited to 'epan/dissectors/packet-hdfs.c')
-rw-r--r-- | epan/dissectors/packet-hdfs.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/epan/dissectors/packet-hdfs.c b/epan/dissectors/packet-hdfs.c index da8b3addd8..64e9f72008 100644 --- a/epan/dissectors/packet-hdfs.c +++ b/epan/dissectors/packet-hdfs.c @@ -114,10 +114,10 @@ static int hf_hdfs_password = -1; static int hf_hdfs_kind = -1; static int hf_hdfs_service = -1; - - static gint ett_hdfs = -1; +static dissector_handle_t hdfs_handle; + void proto_reg_handoff_hdfs(void); /* Parses the parameters of a function. @@ -1059,7 +1059,7 @@ proto_register_hdfs(void) 10, &tcp_port); - register_dissector("hdfs", dissect_hdfs, proto_hdfs); + hdfs_handle = register_dissector("hdfs", dissect_hdfs, proto_hdfs); } /* registers handoff */ @@ -1067,11 +1067,9 @@ void proto_reg_handoff_hdfs(void) { static gboolean initialized = FALSE; - static dissector_handle_t hdfs_handle; static guint saved_tcp_port; if (!initialized) { - hdfs_handle = create_dissector_handle(dissect_hdfs, proto_hdfs); dissector_add_handle("tcp.port", hdfs_handle); /* for "decode as" */ initialized = TRUE; } else if (saved_tcp_port != 0) { |