aboutsummaryrefslogtreecommitdiffstats
path: root/proto.c
diff options
context:
space:
mode:
authorGilbert Ramirez <gram@alumni.rice.edu>1999-09-15 06:13:21 +0000
committerGilbert Ramirez <gram@alumni.rice.edu>1999-09-15 06:13:21 +0000
commitbcf4001ef0ce01d625cf530414e25e0534397b90 (patch)
tree100cc9ce71c7075023b15772cac93f4bf570584d /proto.c
parentb1f5853f414131cae6c3eaabfde3d9f843265c09 (diff)
Changed (again) the way that the FT_BOOLEAN field type works internally.
Dissector code can add FT_BOOLEAN fields to the proto_tree and pass TRUE or FALSE values (non-zero and zero values). The display filter language, however, treats the checking for the existence of a FT_BOOLEAN field as the checking for its truth. Before this change, packet-tr.c was the only dissector using FT_BOOLEAN fields, and it only added the field to the proto_tree if the TRUE; the dissector was determining the difference between the check for existence and the check for truth. I made this change because packet-ppp.c added some FT_BOOLEAN fields and added them to the tree regardless of truth value, It's more natural just to do it this way and let the display filter code worry about whether to check for existence or truth. So that's how it works now. svn path=/trunk/; revision=679
Diffstat (limited to 'proto.c')
-rw-r--r--proto.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/proto.c b/proto.c
index ddb68a09b9..d1a98341a9 100644
--- a/proto.c
+++ b/proto.c
@@ -1,7 +1,7 @@
/* proto.c
* Routines for protocol tree
*
- * $Id: proto.c,v 1.26 1999/09/14 08:06:22 guy Exp $
+ * $Id: proto.c,v 1.27 1999/09/15 06:13:20 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -398,7 +398,7 @@ NOTES
break;
case FT_BOOLEAN:
- fi->value.boolean = va_arg(ap, unsigned int) ? TRUE : FALSE;
+ fi->value.numeric = va_arg(ap, unsigned int) ? TRUE : FALSE;
break;
case FT_UINT8:
@@ -551,7 +551,7 @@ proto_item_fill_label(field_info *fi, gchar *label_str)
case FT_BOOLEAN:
snprintf(label_str, ITEM_LABEL_LENGTH,
"%s: %s", fi->hfinfo->name,
- fi->value.boolean == TRUE ? "True" : "False");
+ fi->value.numeric == TRUE ? "True" : "False");
break;
case FT_UINT8: