aboutsummaryrefslogtreecommitdiffstats
path: root/packet-giop.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2003-11-16 23:17:27 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2003-11-16 23:17:27 +0000
commite1d4ae571f1026d344d9364e16bd6628af6d4bb2 (patch)
tree564e732958fa7b21a0ce2aaf6f0123b674ea3a71 /packet-giop.c
parente28479bb2dbc17a6547812767e82c24bb6ec1ad2 (diff)
Export "protocol_t" as an opaque type.
Make "proto_is_protocol_enabled()" and "proto_get_protocol_short_name()" take a "protocol_t *" as an argument, so they don't have to look up the "protocol_t" - this will probably speed them up considerably, and they're called on almost every dissector handoff. Get rid of a number of "proto_is_protocol_enabled()" calls that aren't necessary (dissectors called through handles, including those called through dissector tables, or called as heuristic dissectors, aren't even called if their protocol isn't enabled). Change some direct dissector calls to go through handles. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@8979 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-giop.c')
-rw-r--r--packet-giop.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/packet-giop.c b/packet-giop.c
index 263968bed2..49de0bfdc4 100644
--- a/packet-giop.c
+++ b/packet-giop.c
@@ -9,7 +9,7 @@
* Frank Singleton <frank.singleton@ericsson.com>
* Trevor Shepherd <eustrsd@am1.ericsson.se>
*
- * $Id: packet-giop.c,v 1.72 2003/03/05 15:33:12 gerald Exp $
+ * $Id: packet-giop.c,v 1.73 2003/11/16 23:17:18 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -1073,7 +1073,7 @@ void register_giop_user_module(giop_sub_dissector_t *sub, gchar *name, gchar *mo
module_val->subh->sub_name = name; /* save dissector name */
module_val->subh->sub_fn = sub; /* save subdissector*/
- module_val->subh->sub_proto = sub_proto; /* save subdissector's proto_XXX value */
+ module_val->subh->sub_proto = find_protocol_by_id(sub_proto); /* save protocol_t for subdissector's protocol */
g_hash_table_insert(giop_module_hash, new_module_key, module_val);
@@ -1440,7 +1440,7 @@ void register_giop_user(giop_sub_dissector_t *sub, gchar *name, int sub_proto) {
subh->sub_name = name;
subh->sub_fn = sub;
- subh->sub_proto = sub_proto; /* proto_XXX from sub dissectors's proto_register_protocol() */
+ subh->sub_proto = find_protocol_by_id(sub_proto); /* protocol_t for sub dissectors's proto_register_protocol() */
giop_sub_list = g_slist_append (giop_sub_list, subh);