aboutsummaryrefslogtreecommitdiffstats
path: root/packet-dns.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2001-08-28 08:28:19 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2001-08-28 08:28:19 +0000
commita0d1164eeff18f4021c92fb5f6975d240d01dc90 (patch)
tree3a75d49278b2ef01f583e4346c84e22e30332616 /packet-dns.c
parentd84e9bd78e309d410058ff225d6eca6927a07caf (diff)
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
Diffstat (limited to 'packet-dns.c')
-rw-r--r--packet-dns.c8
1 files changed, 5 insertions, 3 deletions
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 <gerald@ethereal.com>
@@ -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);