From eb2d6593dca282de10e8dc13a5e2cde4523b800a Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Thu, 24 Jan 2002 09:20:54 +0000 Subject: Replace a bunch of "tvb_length()" and "tvb_length_remaining()" calls in arguments to "proto_tree_add_text()", and to "proto_tree_add_XXX()" calls that add FT_NONE or FT_PROTO items to the protocol tree, with -1. Replace some calls to "tvb_length()" or "tvb_length_remaining()" with calls to "tvb_reported_length()" and "tvb_reported_length_remaining()", as those give the actual length of the data in the packet, not just the data that happened to be captured. svn path=/trunk/; revision=4605 --- packet-quake.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'packet-quake.c') diff --git a/packet-quake.c b/packet-quake.c index 59f2a9dd3d..a7ff116f50 100644 --- a/packet-quake.c +++ b/packet-quake.c @@ -4,7 +4,7 @@ * Uwe Girlich * http://www.idsoftware.com/q1source/q1source.zip * - * $Id: packet-quake.c,v 1.24 2002/01/21 07:36:40 guy Exp $ + * $Id: packet-quake.c,v 1.25 2002/01/24 09:20:50 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs @@ -453,7 +453,7 @@ dissect_quake_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (tree) { control_item = proto_tree_add_text(tree, tvb, - 0, tvb_length(tvb), "Control %s: %s", + 0, -1, "Control %s: %s", val_to_str(direction, names_control_direction, "%u"), val_to_str(command, names_control_command, "%u")); if (control_item) @@ -531,7 +531,7 @@ dissect_quake(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (tree) { quake_item = proto_tree_add_item(tree, proto_quake, - tvb, 0, tvb_length(tvb), FALSE); + tvb, 0, -1, FALSE); if (quake_item) quake_tree = proto_item_add_subtree(quake_item, ett_quake); } @@ -744,4 +744,3 @@ proto_register_quake(void) "Set the UDP port for the Quake Server", 10, &gbl_quakeServerPort); } - -- cgit v1.2.3