aboutsummaryrefslogtreecommitdiffstats
path: root/epan/packet.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2013-11-02 15:52:25 +0000
committerMichael Mann <mmann78@netscape.net>2013-11-02 15:52:25 +0000
commit02a83915359f7fadf149df0fe0dea8e971bb32f4 (patch)
tree33b0da2fee3eed9a07417a0aa7e4c2356638cd33 /epan/packet.c
parent925cba4e91ea0f44970462d30b62533c8a100e24 (diff)
Require dissector_try_string to pass a data parameter to its subdissectors. There weren't that many calls, so might as well modify the function than create a need for dissector_try_string_new.
svn path=/trunk/; revision=53049
Diffstat (limited to 'epan/packet.c')
-rw-r--r--epan/packet.c57
1 files changed, 0 insertions, 57 deletions
diff --git a/epan/packet.c b/epan/packet.c
index 60cfb69613..e84bd1f24c 100644
--- a/epan/packet.c
+++ b/epan/packet.c
@@ -1265,63 +1265,6 @@ dissector_reset_string(const char *name, const gchar *pattern)
return FALSE. */
gboolean
dissector_try_string(dissector_table_t sub_dissectors, const gchar *string,
- tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
-{
- dtbl_entry_t *dtbl_entry;
- struct dissector_handle *handle;
- int ret;
- const gchar *saved_match_string;
-
- /* XXX ASSERT instead ? */
- if (!string) return FALSE;
- dtbl_entry = find_string_dtbl_entry(sub_dissectors, string);
- if (dtbl_entry != NULL) {
- /*
- * Is there currently a dissector handle for this entry?
- */
- handle = dtbl_entry->current;
- if (handle == NULL) {
- /*
- * No - pretend this dissector didn't exist,
- * so that other dissectors might have a chance
- * to dissect this packet.
- */
- return FALSE;
- }
-
- /*
- * Save the current value of "pinfo->match_string",
- * set it to the string that matched, call the
- * dissector, and restore "pinfo->match_string".
- */
- saved_match_string = pinfo->match_string;
- pinfo->match_string = string;
- ret = call_dissector_work(handle, tvb, pinfo, tree, TRUE, NULL);
- pinfo->match_string = saved_match_string;
-
- /*
- * If a new-style dissector returned 0, it means that
- * it didn't think this tvbuff represented a packet for
- * its protocol, and didn't dissect anything.
- *
- * Old-style dissectors can't reject the packet.
- *
- * 0 is also returned if the protocol wasn't enabled.
- *
- * If the packet was rejected, we return FALSE, so that
- * other dissectors might have a chance to dissect this
- * packet, otherwise we return TRUE.
- */
- return ret != 0;
- }
- return FALSE;
-}
-
-/* Look for a given string in a given dissector table and, if found, call
- the dissector with the arguments supplied, and return TRUE, otherwise
- return FALSE. */
-gboolean
-dissector_try_string_new(dissector_table_t sub_dissectors, const gchar *string,
tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
dtbl_entry_t *dtbl_entry;