diff options
author | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2001-12-17 22:45:18 +0000 |
---|---|---|
committer | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2001-12-17 22:45:18 +0000 |
commit | df6e69e8cb16bab6b45ce37038d3c1ca0bcd7dff (patch) | |
tree | 4a89d47bc782e2bc43683f642554a74e13ab72c6 /packet-giop.c | |
parent | dde239333a7454141aaf0c42d6b961a3c962735c (diff) |
Save the current protocol string, and set the current protocol string to
the string for the subdissector's protocol, before calling a GIOP
subdissector, and restore it before returning.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4416 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-giop.c')
-rw-r--r-- | packet-giop.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/packet-giop.c b/packet-giop.c index ac5f35e4f8..904c9bba6c 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.51 2001/12/15 20:40:18 guy Exp $ + * $Id: packet-giop.c,v 1.52 2001/12/17 22:45:18 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -1740,23 +1740,29 @@ static gboolean try_heuristic_giop_dissector(tvbuff_t *tvb, packet_info *pinfo, int i,len; gboolean res = FALSE; /* result of calling a heuristic sub dissector */ giop_sub_handle_t *subh = NULL; + const char *saved_proto; len = g_slist_length(giop_sub_list); /* find length */ if (len == 0) return FALSE; + saved_proto = pinfo->current_proto; for (i=0; i<len; i++) { subh = (giop_sub_handle_t *) g_slist_nth_data(giop_sub_list,i); /* grab dissector handle */ if (proto_is_protocol_enabled(subh->sub_proto)) { + pinfo->current_proto = + proto_get_protocol_short_name(subh->sub_proto); res = (subh->sub_fn)(tvb,pinfo,tree,offset,header,operation,NULL); /* callit TODO - replace NULL */ if (res) { + pinfo->current_proto = saved_proto; return TRUE; /* found one, lets return */ } } /* protocol_is_enabled */ } /* loop */ + pinfo->current_proto = saved_proto; return res; /* result */ } @@ -1782,6 +1788,7 @@ static gboolean try_explicit_giop_dissector(tvbuff_t *tvb, packet_info *pinfo, p gchar *modname = NULL; struct giop_module_key module_key; struct giop_module_val *module_val = NULL; + const char *saved_proto; /* @@ -1823,7 +1830,11 @@ static gboolean try_explicit_giop_dissector(tvbuff_t *tvb, packet_info *pinfo, p if (proto_is_protocol_enabled(subdiss->sub_proto)) { + saved_proto = pinfo->current_proto; + pinfo->current_proto = + proto_get_protocol_short_name(subdiss->sub_proto); res = (subdiss->sub_fn)(tvb,pinfo,tree,offset,header,operation, modname); /* callit, TODO replace NULL with idlname */ + pinfo->current_proto = saved_proto; } /* protocol_is_enabled */ } /* offset exists */ |