diff options
author | Bill Meier <wmeier@newsguy.com> | 2008-11-04 21:50:33 +0000 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2008-11-04 21:50:33 +0000 |
commit | 92a9b695a49890ba962794753669551a2871ac3f (patch) | |
tree | 8300b5e7ec5ade7f74db92e73cbd0db4df84d1ef | |
parent | 5e4758e5e0fb59f50c48ee064946096b1013e597 (diff) | |
download | wireshark-92a9b695a49890ba962794753669551a2871ac3f.tar.gz |
Move find_dissector (2x) to fcn called by proto_reg_hand_off in other dissectors
svn path=/trunk/; revision=26696
-rw-r--r-- | asn1/rtse/packet-rtse-template.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/asn1/rtse/packet-rtse-template.c b/asn1/rtse/packet-rtse-template.c index 4ab3ea1e00..c90a8a6901 100644 --- a/asn1/rtse/packet-rtse-template.c +++ b/asn1/rtse/packet-rtse-template.c @@ -57,9 +57,6 @@ static guint32 app_proto=0; static proto_tree *top_tree=NULL; -static dissector_handle_t rtse_handle = NULL; -static dissector_handle_t ros_handle = NULL; - /* Preferences */ static gboolean rtse_reassemble = TRUE; @@ -108,8 +105,17 @@ static const fragment_items rtse_frag_items = { }; void -register_rtse_oid_dissector_handle(const char *oid, dissector_handle_t dissector, int proto _U_, const char *name, gboolean uses_ros) +register_rtse_oid_dissector_handle(const char *oid, dissector_handle_t dissector, int proto, const char *name, gboolean uses_ros) { +/* XXX: Note that this fcn is called from proto_reg_handoff in *other* dissectors ... */ + + static dissector_handle_t rtse_handle = NULL; + static dissector_handle_t ros_handle = NULL; + + if (rtse_handle == NULL) + rtse_handle = find_dissector("rtse"); + if (ros_handle == NULL) + ros_handle = find_dissector("ros"); /* save the name - but not used */ g_hash_table_insert(oid_table, (gpointer)oid, (gpointer)name); @@ -364,8 +370,6 @@ void proto_register_rtse(void) { rtse_oid_dissector_table = register_dissector_table("rtse.oid", "RTSE OID Dissectors", FT_STRING, BASE_NONE); oid_table=g_hash_table_new(g_str_hash, g_str_equal); - rtse_handle = find_dissector("rtse"); - ros_handle = find_dissector("ros"); } |