summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2002-05-30 02:04:43 +0000
committerGuy Harris <guy@alum.mit.edu>2002-05-30 02:04:43 +0000
commit8ec09e1441fc74bb72b69449c4c6704ea0784da8 (patch)
tree577b24c92acf03848b64ab3a4a622b309c493943
parent4401f1433f8b2db82cf199274f96258662d02aeb (diff)
downloadwireshark-8ec09e1441fc74bb72b69449c4c6704ea0784da8.tar.gz
Don't pass "tvb_reported_length_remaining(tvb, offset)" as the fourth
argument to "tvb_new_subset()" - just use -1 if the subset tvbuff is to run to the end of the parent tvbuff. svn path=/trunk/; revision=5598
-rw-r--r--packet-bacnet.c5
-rw-r--r--packet-gmrp.c32
2 files changed, 27 insertions, 10 deletions
diff --git a/packet-bacnet.c b/packet-bacnet.c
index 8b09002e23..692e8db36d 100644
--- a/packet-bacnet.c
+++ b/packet-bacnet.c
@@ -2,7 +2,7 @@
* Routines for BACnet (NPDU) dissection
* Copyright 2001, Hartmut Mueller <hartmut@abmlinux.org>, FH Dortmund
*
- * $Id: packet-bacnet.c,v 1.10 2002/01/21 07:36:32 guy Exp $
+ * $Id: packet-bacnet.c,v 1.11 2002/05/30 02:04:43 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -354,7 +354,8 @@ dissect_bacnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
tvb, offset, 2, FALSE);
offset += 2;
/* attention: doesnt work here because of if(tree) */
- call_dissector(data_handle,tvb_new_subset(tvb, offset,-1,tvb_reported_length_remaining(tvb,offset)), pinfo, tree);
+ call_dissector(data_handle,
+ tvb_new_subset(tvb, offset, -1, -1), pinfo, tree);
}
/* Performance Index (in I-Could-Be-Router-To-Network) */
if (bacnet_mesgtyp == BAC_NET_ICB_R) {
diff --git a/packet-gmrp.c b/packet-gmrp.c
index 07478d1c6b..3df5921d49 100644
--- a/packet-gmrp.c
+++ b/packet-gmrp.c
@@ -159,7 +159,9 @@ dissect_gmrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
proto_tree_add_text(gmrp_tree, tvb, GARP_PROTOCOL_ID, sizeof(guint16),
" (Warning: this version of Ethereal only knows about protocol id = 1)");
- call_dissector(data_handle,tvb_new_subset(tvb, GARP_PROTOCOL_ID + sizeof(guint16), -1,tvb_reported_length_remaining(tvb,GARP_PROTOCOL_ID + sizeof(guint16))),pinfo, tree);
+ call_dissector(data_handle,
+ tvb_new_subset(tvb, GARP_PROTOCOL_ID + sizeof(guint16), -1, -1),
+ pinfo, tree);
return;
}
@@ -189,7 +191,9 @@ dissect_gmrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
else
{
- call_dissector(data_handle,tvb_new_subset(tvb, offset,-1,tvb_reported_length_remaining(tvb,offset)), pinfo, tree);
+ call_dissector(data_handle,
+ tvb_new_subset(tvb, offset, -1, -1),
+ pinfo, tree);
return;
}
}
@@ -206,7 +210,9 @@ dissect_gmrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* GMRP supports Group Membership and Service Requirement as attribute types */
if ( (octet != GMRP_ATTRIBUTE_TYPE_GROUP_MEMBERSHIP) && (octet != GMRP_ATTRIBUTE_TYPE_SERVICE_REQUIREMENT) )
{
- call_dissector(data_handle,tvb_new_subset(tvb, offset,-1,tvb_reported_length_remaining(tvb,offset)), pinfo, tree);
+ call_dissector(data_handle,
+ tvb_new_subset(tvb, offset, -1, -1), pinfo,
+ tree);
return;
}
@@ -239,7 +245,9 @@ dissect_gmrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
else
{
- call_dissector(data_handle,tvb_new_subset(tvb, offset,-1,tvb_reported_length_remaining(tvb,offset)), pinfo, tree);
+ call_dissector(data_handle,
+ tvb_new_subset(tvb, offset, -1, -1),
+ pinfo, tree);
return;
}
}
@@ -270,7 +278,9 @@ dissect_gmrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
case GMRP_EVENT_LEAVEALL:
if (octet != GMRP_LENGTH_LEAVEALL)
{
- call_dissector(data_handle,tvb_new_subset(tvb, offset,-1,tvb_reported_length_remaining(tvb,offset)), pinfo, tree);
+ call_dissector(data_handle,
+ tvb_new_subset(tvb, offset, -1, -1),
+ pinfo, tree);
return;
}
break;
@@ -282,7 +292,9 @@ dissect_gmrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
case GMRP_EVENT_EMPTY:
if ( (octet != GMRP_GROUP_MEMBERSHIP_NON_LEAVEALL) && (octet != GMRP_SERVICE_REQUIREMENT_NON_LEAVEALL) )
{
- call_dissector(data_handle,tvb_new_subset(tvb, offset, -1,tvb_reported_length_remaining(tvb,offset)),pinfo, tree);
+ call_dissector(data_handle,
+ tvb_new_subset(tvb, offset, -1, -1),
+ pinfo, tree);
return;
}
@@ -309,14 +321,18 @@ dissect_gmrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
else
{
- call_dissector(data_handle,tvb_new_subset(tvb, offset,-1,tvb_reported_length_remaining(tvb,offset)), pinfo, tree);
+ call_dissector(data_handle,
+ tvb_new_subset(tvb, offset, -1, -1),
+ pinfo, tree);
return;
}
break;
default:
- call_dissector(data_handle,tvb_new_subset(tvb, offset,-1,tvb_reported_length_remaining(tvb,offset)), pinfo, tree);
+ call_dissector(data_handle,
+ tvb_new_subset(tvb, offset, -1, -1),
+ pinfo, tree);
return;
}
}