Don't attempt to call the dissector for a conversation if the

conversation doesn't have a dissector.

svn path=/trunk/; revision=2655
This commit is contained in:
Guy Harris 2000-11-18 06:51:42 +00:00
parent abb6702fc2
commit 69ebb146e8
1 changed files with 16 additions and 3 deletions

View File

@ -1,7 +1,7 @@
/* conversation.c /* conversation.c
* Routines for building lists of packets that are part of a "conversation" * 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 * Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org> * By Gerald Combs <gerald@zing.org>
@ -765,13 +765,26 @@ try_conversation_dissector(address *src, address *dst, port_type ptype,
/* /*
* New dissector calling old dissector; use * New dissector calling old dissector; use
* "tvb_compat()" to remap. * "tvb_compat()" to remap.
*
* "is_old_dissector" won't be set unless
* "dissector.old_d" is set.
*/ */
tvb_compat(tvb, &pd, &offset); tvb_compat(tvb, &pd, &offset);
(*conversation->dissector.old_d)(pd, offset, pinfo->fd, (*conversation->dissector.old_d)(pd, offset, pinfo->fd,
tree); 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); (*conversation->dissector.new_d)(tvb, pinfo, tree);
return TRUE; return TRUE;
}
} }
return FALSE; return FALSE;
} }