diff options
author | Guy Harris <guy@alum.mit.edu> | 2001-08-28 08:28:19 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2001-08-28 08:28:19 +0000 |
commit | aa4cd01b9bcd64fc3785668692f2be0f19f69bb8 (patch) | |
tree | 3a75d49278b2ef01f583e4346c84e22e30332616 /packet-dns.c | |
parent | d9019638eef40ef97c69e7a28277d1886aa800cc (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.
svn path=/trunk/; revision=3879
Diffstat (limited to 'packet-dns.c')
-rw-r--r-- | packet-dns.c | 8 |
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); |