From a0d1164eeff18f4021c92fb5f6975d240d01dc90 Mon Sep 17 00:00:00 2001 From: guy Date: Tue, 28 Aug 2001 08:28:19 +0000 Subject: Get rid of "proto_tree_add_notext()" - if you create a subtree using it, but, before you set the text, you throw an exception while putting stuff under the subtree, you end up with an absolutely blank protocol tree item, which is really gross. Instead of calling "proto_tree_add_notext()", call "proto_tree_add_text()" with at least a minimal label - yes, it does mean you do some work that will probably be unnecessary, but, absent a scheme to arrange to do that work if it *is* necessary (e.g., catching exceptions), the alternative is an ugly protocol tree display. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3879 f5534014-38df-0310-8fa8-9805f1628bb7 --- packet-dns.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'packet-dns.c') diff --git a/packet-dns.c b/packet-dns.c index 80202d622d..fd41a86065 100644 --- a/packet-dns.c +++ b/packet-dns.c @@ -1,7 +1,7 @@ /* packet-dns.c * Routines for DNS packet disassembly * - * $Id: packet-dns.c,v 1.70 2001/07/02 07:29:03 guy Exp $ + * $Id: packet-dns.c,v 1.71 2001/08/28 08:28:14 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs @@ -793,8 +793,10 @@ dissect_dns_answer(tvbuff_t *tvb, int offset, int dns_data_offset, if (fd != NULL) col_append_fstr(fd, COL_INFO, " %s", type_name); if (dns_tree != NULL) { - trr = proto_tree_add_notext(dns_tree, tvb, offset, - (data_offset - data_start) + data_len); + trr = proto_tree_add_text(dns_tree, tvb, offset, + (data_offset - data_start) + data_len, + "%s: type %s, class %s", + name, type_name, class_name); if (type != T_OPT) { rr_tree = add_rr_to_tree(trr, ett_dns_rr, tvb, offset, name, name_len, long_type_name, class_name, ttl, data_len); -- cgit v1.2.3