aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-bacapp.c
diff options
context:
space:
mode:
authorAndersBroman <a.broman@bredband.net>2015-04-15 17:20:35 +0200
committerAnders Broman <a.broman58@gmail.com>2015-04-15 15:22:42 +0000
commit05c0152370cbe084193ad2946e6fc96a1017c08e (patch)
tree3214e835a86507969b9cf0a93391fcaa51e56c3a /epan/dissectors/packet-bacapp.c
parentd2e880eab134e4414b143b6e03767bf6424b749c (diff)
Replcae deprecated API tvb_length with tvb_reported_length or tvb_captured
length. Change-Id: Id42f3409a32e202528d350f7afde7376e411fc51 Reviewed-on: https://code.wireshark.org/review/8076 Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-bacapp.c')
-rw-r--r--epan/dissectors/packet-bacapp.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/epan/dissectors/packet-bacapp.c b/epan/dissectors/packet-bacapp.c
index 1058edf70b..7104d635f1 100644
--- a/epan/dissectors/packet-bacapp.c
+++ b/epan/dissectors/packet-bacapp.c
@@ -39,8 +39,8 @@ static int bacapp_tap = -1;
/* formerly bacapp.h contains definitions and forward declarations */
#ifndef FAULT
-#define FAULT proto_tree_add_text(subtree, tvb, offset, tvb_length(tvb) - offset, "something is going wrong here !!"); \
- offset = tvb_length(tvb);
+#define FAULT proto_tree_add_text(subtree, tvb, offset, tvb_reported_length(tvb) - offset, "something is going wrong here !!"); \
+ offset = tvb_reported_length(tvb);
#endif
/* BACnet PDU Types */
@@ -5399,10 +5399,10 @@ fTagHeaderTree(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
tvb, lvt_offset, lvt_len, *lvt);
} /* if (tree) */
- if (*lvt > tvb_length(tvb)) {
+ if (*lvt > tvb_reported_length(tvb)) {
expert_add_info_format(pinfo, ti, &ei_bacapp_bad_length,
"LVT length too long: %d > %d", *lvt,
- tvb_length(tvb));
+ tvb_reported_length(tvb));
*lvt = 1;
}
@@ -7039,14 +7039,14 @@ fPropertyValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset
offset += fTagHeaderTree(tvb, pinfo, tree, offset,
&tag_no, &tag_info, &lvt);
offset = fAbstractSyntaxNType(tvb, pinfo, tree, offset);
- if (tvb_length_remaining(tvb, offset) > 0) {
+ if (tvb_reported_length_remaining(tvb, offset) > 0) {
offset += fTagHeaderTree(tvb, pinfo, tree, offset,
&tag_no, &tag_info, &lvt);
}
} else {
- proto_tree_add_text(tree, tvb, offset, tvb_length(tvb) - offset,
+ proto_tree_add_text(tree, tvb, offset, tvb_reported_length(tvb) - offset,
"expected Opening Tag!");
- offset = tvb_length(tvb);
+ offset = tvb_reported_length(tvb);
}
return offset;
@@ -7402,7 +7402,7 @@ fConfirmedPrivateTransferRequest(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
if (dissector_try_uint(bacapp_dissector_table,
vendor_identifier, next_tvb, pinfo, tree)) {
/* we parsed it so skip over length and we are done */
- offset += tvb_length(next_tvb);
+ offset += tvb_reported_length(next_tvb);
return offset;
}