From 283ce59938ad2be252a6232e40a958e177a40e1a Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Wed, 31 May 2000 05:09:07 +0000 Subject: Add routines for adding items to a protocol tree that take arguments of a particular type, rather than taking a varargs list, along the lines of the "proto_tree_add_XXX_format()" routines. Replace most calls to "proto_tree_add_item()" and "proto_tree_add_item_hidden()" with calls to those routines. Rename "proto_tree_add_item()" and "proto_tree_add_item_hidden()" to "proto_tree_add_item_old()" and "proto_tree_add_item_hidden_old()", and add new "proto_tree_add_item()" and "proto_tree_add_item_hidden()" routines that don't take the item to be added as an argument - instead, they fetch the argument from the packet whose tvbuff was handed to them, from the offset handed to them. svn path=/trunk/; revision=2031 --- packet-imap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'packet-imap.c') diff --git a/packet-imap.c b/packet-imap.c index b4957237d0..b1809a9bdc 100644 --- a/packet-imap.c +++ b/packet-imap.c @@ -2,7 +2,7 @@ * Routines for imap packet dissection * Copyright 1999, Richard Sharpe * - * $Id: packet-imap.c,v 1.6 2000/05/11 08:15:11 gram Exp $ + * $Id: packet-imap.c,v 1.7 2000/05/31 05:07:07 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs @@ -91,12 +91,12 @@ dissect_imap(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) if (tree) { - ti = proto_tree_add_item(tree, proto_imap, NullTVB, offset, END_OF_FRAME, NULL); + ti = proto_tree_add_item(tree, proto_imap, NullTVB, offset, END_OF_FRAME, FALSE); imap_tree = proto_item_add_subtree(ti, ett_imap); if (pi.match_port == pi.destport) { /* Request */ - proto_tree_add_item_hidden(imap_tree, hf_imap_request, NullTVB, offset, i1, TRUE); + proto_tree_add_boolean_hidden(imap_tree, hf_imap_request, NullTVB, offset, i1, TRUE); proto_tree_add_text(imap_tree, NullTVB, offset, i1, "Request Tag: %s", rr); proto_tree_add_text(imap_tree, NullTVB, offset + i1 + 1, END_OF_FRAME, "Request: %s", rd); @@ -104,7 +104,7 @@ dissect_imap(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) } else { - proto_tree_add_item_hidden(imap_tree, hf_imap_response, NullTVB, offset, i1, TRUE); + proto_tree_add_boolean_hidden(imap_tree, hf_imap_response, NullTVB, offset, i1, TRUE); proto_tree_add_text(imap_tree, NullTVB, offset, i1, "Response Tag: %s", rr); proto_tree_add_text(imap_tree, NullTVB, offset + i1 + 1, END_OF_FRAME, "Response: %s", rd); -- cgit v1.2.3