diff options
author | Michal Labedzki <michal.labedzki@tieto.com> | 2015-02-26 14:38:57 +0100 |
---|---|---|
committer | Michal Labedzki <michal.labedzki@tieto.com> | 2015-03-02 18:28:17 +0000 |
commit | 768e37b792e5de46e03a396fc416d0a42b71243b (patch) | |
tree | 129ee0221476c392997dc6fd7343ac646db03e65 /epan/dissectors/packet-btl2cap.c | |
parent | 77d2dc589241a6ade357a133574126abe1b408ef (diff) |
Bluetooth: Fix tools/checkAPI issues
Change-Id: I8ffbd4a0da800594d9888f6a30612d4fc5273119
Reviewed-on: https://code.wireshark.org/review/7474
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Diffstat (limited to 'epan/dissectors/packet-btl2cap.c')
-rw-r--r-- | epan/dissectors/packet-btl2cap.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/epan/dissectors/packet-btl2cap.c b/epan/dissectors/packet-btl2cap.c index 2a10f62646..712bc2418c 100644 --- a/epan/dissectors/packet-btl2cap.c +++ b/epan/dissectors/packet-btl2cap.c @@ -1461,7 +1461,7 @@ dissect_b_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, { tvbuff_t *next_tvb; - next_tvb = tvb_new_subset(tvb, offset, tvb_length_remaining(tvb, offset), length); + next_tvb = tvb_new_subset(tvb, offset, tvb_captured_length_remaining(tvb, offset), length); col_append_str(pinfo->cinfo, COL_INFO, "Connection oriented channel"); @@ -1637,7 +1637,7 @@ dissect_i_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, } /*pass up to higher layer if we have a complete packet*/ if (segment == 0x00) { - next_tvb = tvb_new_subset(tvb, offset, tvb_length_remaining(tvb, offset) - 2, length); + next_tvb = tvb_new_subset(tvb, offset, tvb_captured_length_remaining(tvb, offset) - 2, length); } if (next_tvb) { if (psm) { @@ -1679,15 +1679,15 @@ dissect_i_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, /* not a known fixed PSM, try to find a registered service to a dynamic PSM */ if (!dissector_try_uint_new(l2cap_service_dissector_table, uuid, next_tvb, pinfo, tree, TRUE, l2cap_data)) { /* unknown protocol. declare as data */ - proto_tree_add_item(btl2cap_tree, hf_btl2cap_payload, next_tvb, 0, tvb_length(next_tvb), ENC_NA); + proto_tree_add_item(btl2cap_tree, hf_btl2cap_payload, next_tvb, 0, tvb_reported_length(next_tvb), ENC_NA); } } } else { - proto_tree_add_item(btl2cap_tree, hf_btl2cap_payload, next_tvb, 0, tvb_length(next_tvb), ENC_NA); + proto_tree_add_item(btl2cap_tree, hf_btl2cap_payload, next_tvb, 0, tvb_reported_length(next_tvb), ENC_NA); } } - offset += (tvb_length_remaining(tvb, offset) - 2); + offset += tvb_reported_length_remaining(tvb, offset) - 2; proto_tree_add_item(btl2cap_tree, hf_btl2cap_fcs, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset += 2; return offset; @@ -2002,7 +2002,7 @@ dissect_btl2cap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) proto_tree_add_item(btl2cap_tree, hf_btl2cap_psm, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset += 2; - next_tvb = tvb_new_subset(tvb, offset, tvb_length_remaining(tvb, offset), length); + next_tvb = tvb_new_subset(tvb, offset, tvb_captured_length_remaining(tvb, offset), length); /* call next dissector */ if (!dissector_try_uint_new(l2cap_psm_dissector_table, (guint32) psm, next_tvb, pinfo, tree, TRUE, l2cap_data)) { @@ -2049,13 +2049,13 @@ dissect_btl2cap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) proto_tree_add_item(ti_control_subtree, hf_btl2cap_control_txseq, tvb, offset, 2, ENC_LITTLE_ENDIAN); proto_tree_add_item(ti_control_subtree, hf_btl2cap_control_type, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset += 2; - proto_tree_add_item(btl2cap_tree, hf_btl2cap_fcs, tvb, tvb_length(tvb)-2, 2, ENC_LITTLE_ENDIAN); + proto_tree_add_item(btl2cap_tree, hf_btl2cap_fcs, tvb, tvb_reported_length(tvb) - 2, 2, ENC_LITTLE_ENDIAN); - next_tvb = tvb_new_subset(tvb, offset, tvb_length_remaining(tvb, offset)-2, length); + next_tvb = tvb_new_subset(tvb, offset, tvb_captured_length_remaining(tvb, offset)-2, length); } } else { - next_tvb = tvb_new_subset(tvb, offset, tvb_length_remaining(tvb, offset), length); + next_tvb = tvb_new_subset(tvb, offset, tvb_captured_length_remaining(tvb, offset), length); } /* call next dissector */ if (next_tvb && !dissector_try_uint_new(l2cap_cid_dissector_table, (guint32) cid, |