summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGilbert Ramirez <gram@alumni.rice.edu>2006-10-31 22:00:41 +0000
committerGilbert Ramirez <gram@alumni.rice.edu>2006-10-31 22:00:41 +0000
commit63ec12f392c8cc6b8d0a25e479e0b72bff3eb571 (patch)
tree337e044170ee62c28110f52ca4fb57e96c820330
parentb905fcf740527500672eac316b5ff128a7b67197 (diff)
downloadwireshark-63ec12f392c8cc6b8d0a25e479e0b72bff3eb571.tar.gz
When processing '-G fields', ignore the "proto_tree_add_text"
pseudo-field by looking at the ID for hf_text_only. Apparently some fields really don't have 'name' fields, but we still want their info to be dumped out. svn path=/trunk/; revision=19763
-rw-r--r--epan/proto.c23
1 files changed, 4 insertions, 19 deletions
diff --git a/epan/proto.c b/epan/proto.c
index d18d780e86..3f014abba8 100644
--- a/epan/proto.c
+++ b/epan/proto.c
@@ -4893,25 +4893,10 @@ proto_registrar_dump_fields(int format)
PROTO_REGISTRAR_GET_NTH(i, hfinfo);
/*
- * Skip fields with zero-length names or abbreviations;
- * the pseudo-field for "proto_tree_add_text()" is such
- * a field, and we don't want it in the list of filterable
- * fields.
- *
- * XXX - perhaps the name and abbrev field should be null
- * pointers rather than null strings for that pseudo-field,
- * but we'd have to add checks for null pointers in some
- * places if we did that.
- *
- * Or perhaps protocol tree items added with
- * "proto_tree_add_text()" should have -1 as the field index,
- * with no pseudo-field being used, but that might also
- * require special checks for -1 to be added.
- */
- /* XXX - we could just skip the special text
- * pseudo-field by testing: if (hfinfo->id == hf_text_only)
- * */
- if (hfinfo->name[0] == 0 || hfinfo->abbrev[0] == 0)
+ * Skip the pseudo-field for "proto_tree_add_text()" since
+ * we don't want it in the list of filterable fields.
+ */
+ if (hfinfo->id == hf_text_only)
continue;
/* format for protocols */