diff options
author | Bill Meier <wmeier@newsguy.com> | 2008-10-27 20:43:47 +0000 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2008-10-27 20:43:47 +0000 |
commit | 45e798a4307f2a3095db405f9e0a80d2ef4717c3 (patch) | |
tree | 3d4beb9f94f12ff347704cbe29f3cdca9d2845c5 /epan/dissectors/packet-jxta.c | |
parent | 2ec94c8f7c0003ed31c282912397bcb93d2da879 (diff) |
Minor rework related to proto_reg_handoff
svn path=/trunk/; revision=26588
Diffstat (limited to 'epan/dissectors/packet-jxta.c')
-rw-r--r-- | epan/dissectors/packet-jxta.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/epan/dissectors/packet-jxta.c b/epan/dissectors/packet-jxta.c index 7afef1fa42..8b988fd95d 100644 --- a/epan/dissectors/packet-jxta.c +++ b/epan/dissectors/packet-jxta.c @@ -82,7 +82,6 @@ static dissector_table_t media_type_dissector_table = NULL; static dissector_handle_t media_handle = NULL; static dissector_handle_t data_handle = NULL; static dissector_handle_t stream_jxta_handle = NULL; -static dissector_handle_t message_jxta_handle; static int hf_uri_addr = -1; static int hf_uri_src = -1; @@ -2326,7 +2325,8 @@ void proto_register_jxta(void) proto_message_jxta = proto_register_protocol("JXTA Message", "JXTA Message", "jxta.message"); - message_jxta_handle = new_create_dissector_handle(dissect_jxta_message, proto_message_jxta); + new_register_dissector("jxta.udp", dissect_jxta_udp, proto_jxta); + new_register_dissector("jxta.stream", dissect_jxta_stream, proto_jxta); /* Register header fields */ proto_register_field_array(proto_jxta, hf, array_length(hf)); @@ -2365,25 +2365,22 @@ void proto_register_jxta(void) void proto_reg_handoff_jxta(void) { static gboolean init_done = FALSE; + static dissector_handle_t message_jxta_handle; static gboolean msg_media_register_done = FALSE; - static gboolean udp_register_done = FALSE; static gboolean tcp_register_done = FALSE; static gboolean sctp_register_done = FALSE; if(!init_done) { + message_jxta_handle = new_create_dissector_handle(dissect_jxta_message, proto_message_jxta); + stream_jxta_handle = find_dissector("jxta.stream"); + media_type_dissector_table = find_dissector_table("media_type"); data_handle = find_dissector("data"); - media_handle = find_dissector("media"); - new_register_dissector("jxta.udp", dissect_jxta_udp, proto_jxta); - - new_register_dissector("jxta.stream", dissect_jxta_stream, proto_jxta); - stream_jxta_handle = find_dissector("jxta.stream"); - init_done = TRUE; } |