diff options
author | Guy Harris <guy@alum.mit.edu> | 2005-07-29 07:28:07 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2005-07-29 07:28:07 +0000 |
commit | 66a2801dfa3de3690462c3799fb4bc927f8a30cf (patch) | |
tree | 8ba38070fb724c626fce0e0a7aa714a8a2e53012 | |
parent | 0c5af0dde6744082ebbdfa9bd8b80f28b4e16cc3 (diff) |
Use "PROTO_ITEM_SET_GENERATED()" to mark generated items as such; it
takes care of the square brackets, etc..
svn path=/trunk/; revision=15140
-rw-r--r-- | epan/dissectors/packet-radius.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/epan/dissectors/packet-radius.c b/epan/dissectors/packet-radius.c index e61273cc0f..d6c76f31d5 100644 --- a/epan/dissectors/packet-radius.c +++ b/epan/dissectors/packet-radius.c @@ -346,6 +346,7 @@ void radius_ifid(radius_attr_info_t* a, proto_tree* tree, packet_info *pinfo _U_ static void dissect_attribute_value_pairs(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, int offset, guint length) { + proto_item* item; gboolean last_eap = FALSE; guint8* eap_buffer = NULL; guint eap_seg_num = 0; @@ -374,8 +375,9 @@ static void dissect_attribute_value_pairs(proto_tree *tree, packet_info *pinfo, proto_tree* avp_tree; if (length < 2) { - proto_tree_add_text(tree, tvb, offset, 0, - "[Not enough room in packet for AVP header]"); + item = proto_tree_add_text(tree, tvb, offset, 0, + "Not enough room in packet for AVP header"); + PROTO_ITEM_SET_GENERATED(item); return; } avp_type = tvb_get_guint8(tvb,offset); @@ -388,8 +390,9 @@ static void dissect_attribute_value_pairs(proto_tree *tree, packet_info *pinfo, } if (length < avp_length) { - proto_tree_add_text(tree, tvb, offset, 0, - "[Not enough room in packet for AVP]"); + item = proto_tree_add_text(tree, tvb, offset, 0, + "Not enough room in packet for AVP"); + PROTO_ITEM_SET_GENERATED(item); return; } |