aboutsummaryrefslogtreecommitdiffstats
path: root/print.c
diff options
context:
space:
mode:
authorSake Blok <sake@euronet.nl>2008-01-22 00:56:55 +0000
committerSake Blok <sake@euronet.nl>2008-01-22 00:56:55 +0000
commit531879ad82dd0aa7c8e87440a05716311fa42c2d (patch)
tree59a9647eb6e6bcf82a03309bcbe6323ebb607ea5 /print.c
parent0ba5581dd871eb07d210823bd37d77ee54fcfabf (diff)
When using -T fields, print a "1" instead of nothing when a field of type FT_NONE is
present. This way, scripts can check for the presence of this type of fields. (fixes bug 2210) svn path=/trunk/; revision=24158
Diffstat (limited to 'print.c')
-rw-r--r--print.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/print.c b/print.c
index 926e05801a..1eaa4ce8a6 100644
--- a/print.c
+++ b/print.c
@@ -1452,7 +1452,9 @@ static const gchar* get_node_field_value(field_info* fi, epan_dissect_t* edt)
return fi->hfinfo->abbrev;;
}
case FT_NONE:
- return NULL;
+ /* Return "1" so that the presence of a field of type
+ * FT_NONE can be checked when using -T fields */
+ return "1";
default:
/* XXX - this is a hack until we can just call
* fvalue_to_string_repr() for *all* FT_* types. */