From 450c0d518bda19479a4770ad0e28a55ee0a08cab Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sat, 16 Apr 2016 23:45:11 -0700 Subject: [PATCH] Improve the message for duplicate dissectors for a protocol. Report the names for the dissectors as well as the protocol and dissector table name. Change-Id: I901b396a1310f0d98b68c9499038fe2f38498ee1 Reviewed-on: https://code.wireshark.org/review/14948 Reviewed-by: Guy Harris --- epan/packet.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/epan/packet.c b/epan/packet.c index b26c46a18c..b44c37074d 100644 --- a/epan/packet.c +++ b/epan/packet.c @@ -1775,7 +1775,11 @@ dissector_add_for_decode_as(const char *name, dissector_handle_t handle) dup_handle = (dissector_handle_t)entry->data; if (dup_handle->protocol == handle->protocol) { - fprintf(stderr, "Duplicative protocol %s in %s\n", proto_get_protocol_short_name(handle->protocol), name); + fprintf(stderr, "Duplicate dissectors %s and %s for protocol %s in dissector table %s\n", + dissector_handle_get_dissector_name(handle), + dissector_handle_get_dissector_name(dup_handle), + proto_get_protocol_short_name(handle->protocol), + name); if (getenv("WIRESHARK_ABORT_ON_DISSECTOR_BUG") != NULL) abort(); }