/* This helper uses call_dissector_only which will NOT call the default "data" dissector if the packet was rejected. Our caller is responsible to call the data dissector explicitly in case this function returns FALSE.  */
gboolean try_conversation_dissector(const address *addr_a, const address *addr_b, const port_type ptype, const guint32 port_a, const guint32 port_b, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
/* This helper uses call_dissector_only which will NOT call the default "data" dissector if the packet was rejected. Our caller is responsible to call the data dissector explicitly in case this function returns FALSE.  */
gboolean try_conversation_dissector(const address *addr_a, const address *addr_b, const port_type ptype, const guint32 port_a, const guint32 port_b, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
	conversation_t *conversation;
	conversation = find_conversation(pinfo->num, addr_a, addr_b, ptype, port_a,
	    port_b, 0);
	if (conversation != NULL) {
		int ret;
		dissector_handle_t handle = (dissector_handle_t)wmem_tree_lookup32_le(conversation->dissector_tree, pinfo->num);
		if (handle == NULL)
			return FALSE;
		ret=call_dissector_only(handle, tvb, pinfo, tree, data);
		if(!ret) {
			return FALSE;
		}
		return TRUE;
	}
	return FALSE;
}