From 69ebb146e892e8ecce825dac0ee45b65d858f4d9 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sat, 18 Nov 2000 06:51:42 +0000 Subject: [PATCH] Don't attempt to call the dissector for a conversation if the conversation doesn't have a dissector. svn path=/trunk/; revision=2655 --- epan/conversation.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/epan/conversation.c b/epan/conversation.c index a1e43d153f..9757653e50 100644 --- a/epan/conversation.c +++ b/epan/conversation.c @@ -1,7 +1,7 @@ /* conversation.c * Routines for building lists of packets that are part of a "conversation" * - * $Id: conversation.c,v 1.3 2000/10/21 09:54:12 guy Exp $ + * $Id: conversation.c,v 1.4 2000/11/18 06:51:42 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs @@ -765,13 +765,26 @@ try_conversation_dissector(address *src, address *dst, port_type ptype, /* * New dissector calling old dissector; use * "tvb_compat()" to remap. + * + * "is_old_dissector" won't be set unless + * "dissector.old_d" is set. */ tvb_compat(tvb, &pd, &offset); (*conversation->dissector.old_d)(pd, offset, pinfo->fd, tree); - } else + } else { + /* + * Do we have a conversation dissector? + */ + if (conversation->dissector.new_d == NULL) { + /* + * No, so we can't call it. + */ + return FALSE; + } (*conversation->dissector.new_d)(tvb, pinfo, tree); - return TRUE; + return TRUE; + } } return FALSE; }