aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-afp.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2012-08-10 20:33:01 +0000
committerGerald Combs <gerald@wireshark.org>2012-08-10 20:33:01 +0000
commitcd3cca7edca2c52fea2afce5f248370f5fdcbd4f (patch)
tree2def04abc1c80331776942f588ecae42cfe85291 /epan/dissectors/packet-afp.c
parentf464eb4b5839cc1a9a222c6a5e3f701af4cb1305 (diff)
Make the corresponding packet_info available to each tree item. This
lets us pass a NULL pinfo to expert_add_info_format() and expert_add_undecoded_item(), which makes it possible to use those routines deep in the bowels of many dissectors. As a proof of concept remove the recent pinfo additions to packet-afp.c. This should also make it easier to fix bug 3884. svn path=/trunk/; revision=44435
Diffstat (limited to 'epan/dissectors/packet-afp.c')
-rw-r--r--epan/dissectors/packet-afp.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/epan/dissectors/packet-afp.c b/epan/dissectors/packet-afp.c
index 53b7dfb146..8f55ba40cc 100644
--- a/epan/dissectors/packet-afp.c
+++ b/epan/dissectors/packet-afp.c
@@ -4666,7 +4666,7 @@ decode_kauth_ace(tvbuff_t *tvb, proto_tree *tree, gint offset)
#define AFP_MAX_ACL_ENTRIES 500 /* Arbitrary. */
static gint
-decode_kauth_acl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint offset)
+decode_kauth_acl(tvbuff_t *tvb, proto_tree *tree, gint offset)
{
int entries;
int i;
@@ -4681,11 +4681,11 @@ decode_kauth_acl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint offse
sub_tree = proto_item_add_subtree(item, ett_afp_ace_entries);
offset += 4;
- item = proto_tree_add_item(tree, hf_afp_acl_flags, tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_afp_acl_flags, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
if (entries > AFP_MAX_ACL_ENTRIES) {
- expert_add_info_format(pinfo, item, PI_UNDECODED, PI_WARN, "Too many ACL entries (%u). Stopping dissection.", entries);
+ expert_add_info_format(NULL, item, PI_UNDECODED, PI_WARN, "Too many ACL entries (%u). Stopping dissection.", entries);
THROW(ReportedBoundsError);
}
@@ -4700,7 +4700,7 @@ decode_kauth_acl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint offse
}
static gint
-decode_uuid_acl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint offset, guint16 bitmap)
+decode_uuid_acl(tvbuff_t *tvb, proto_tree *tree, gint offset, guint16 bitmap)
{
if ((offset & 1))
PAD(1);
@@ -4716,7 +4716,7 @@ decode_uuid_acl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint offset
}
if ((bitmap & kFileSec_ACL)) {
- offset = decode_kauth_acl(tvb, pinfo, tree, offset);
+ offset = decode_kauth_acl(tvb, tree, offset);
}
return offset;
@@ -4736,7 +4736,7 @@ dissect_query_afp_set_acl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, g
offset = decode_name(tree, pinfo, tvb, offset);
- offset = decode_uuid_acl(tvb, pinfo, tree, offset, bitmap);
+ offset = decode_uuid_acl(tvb, tree, offset, bitmap);
return offset;
}
@@ -4768,7 +4768,7 @@ dissect_reply_afp_get_acl(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tre
bitmap = decode_acl_list_bitmap(tvb, tree, offset);
offset += 2;
- offset = decode_uuid_acl(tvb, pinfo, tree, offset, bitmap);
+ offset = decode_uuid_acl(tvb, tree, offset, bitmap);
return offset;
}
@@ -6550,7 +6550,7 @@ proto_register_afp(void)
{ &hf_afp_acl_entrycount,
{ "ACEs count", "afp.acl_entrycount",
- FT_UINT32, BASE_DEC, NULL, 0,
+ FT_UINT32, BASE_HEX, NULL, 0,
"Number of ACL entries", HFILL }},
{ &hf_afp_acl_flags,