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-nntp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'packet-nntp.c') diff --git a/packet-nntp.c b/packet-nntp.c index 54b04196a0..eab360e222 100644 --- a/packet-nntp.c +++ b/packet-nntp.c @@ -2,7 +2,7 @@ * Routines for nntp packet dissection * Copyright 1999, Richard Sharpe * - * $Id: packet-nntp.c,v 1.9 2000/05/11 08:15:30 gram Exp $ + * $Id: packet-nntp.c,v 1.10 2000/05/31 05:07:26 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs @@ -84,13 +84,13 @@ dissect_nntp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) if (tree) { - ti = proto_tree_add_item(tree, proto_nntp, NullTVB, offset, END_OF_FRAME, NULL); + ti = proto_tree_add_item(tree, proto_nntp, NullTVB, offset, END_OF_FRAME, FALSE); nntp_tree = proto_item_add_subtree(ti, ett_nntp); if (pi.match_port == pi.destport) { - proto_tree_add_item_hidden(nntp_tree, hf_nntp_request, NullTVB, 0, 0, TRUE); + proto_tree_add_boolean_hidden(nntp_tree, hf_nntp_request, NullTVB, 0, 0, TRUE); } else { - proto_tree_add_item_hidden(nntp_tree, hf_nntp_response, NullTVB, 0, 0, TRUE); + proto_tree_add_boolean_hidden(nntp_tree, hf_nntp_response, NullTVB, 0, 0, TRUE); } /* -- cgit v1.2.3