diff options
author | Pascal Quantin <pascal.quantin@gmail.com> | 2015-07-15 14:47:39 +0200 |
---|---|---|
committer | Pascal Quantin <pascal.quantin@gmail.com> | 2015-07-15 18:30:57 +0000 |
commit | 79774329d7cc324b3d7c3a5a013abea85a20885e (patch) | |
tree | a2d17c007f62c070d39ca59aa06e96207128a293 /epan/packet.c | |
parent | 52e2908729c0d0d45df572ff3aaf3e41258c2d4e (diff) |
Simply code for export of PDUs coming from heuristic dissectors
Let's use the newly introduced find_heur_dissector_by_unique_short_name() function
Change-Id: I5781b9b2f1ab679da07e97755b71840b4b3a9361
Reviewed-on: https://code.wireshark.org/review/9645
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Diffstat (limited to 'epan/packet.c')
-rw-r--r-- | epan/packet.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/epan/packet.c b/epan/packet.c index 2a8cb0ede2..18e61d337f 100644 --- a/epan/packet.c +++ b/epan/packet.c @@ -1964,23 +1964,6 @@ has_heur_dissector_list(const gchar *name) { } -static int -find_matching_heur_dissector_by_short_name(gconstpointer a, gconstpointer b) { - const gchar *str_a = proto_get_protocol_short_name(((const heur_dtbl_entry_t *)a)->protocol); - const gchar *str_b = (const gchar*)b; - - return strcmp(str_a, str_b); -} - -heur_dtbl_entry_t* -find_heur_dissector_by_short_name(heur_dissector_list_t heur_list, const char *short_name) -{ - GSList *found_entry = g_slist_find_custom(heur_list->dissectors, - (gpointer) short_name, - find_matching_heur_dissector_by_short_name); - return found_entry ? (heur_dtbl_entry_t *)(found_entry->data) : NULL; -} - heur_dtbl_entry_t* find_heur_dissector_by_unique_short_name(const char *short_name) { return (heur_dtbl_entry_t*)g_hash_table_lookup(heuristic_short_names, (gpointer)short_name); |