diff options
Diffstat (limited to 'epan/dissectors/packet-smpp.c')
-rw-r--r-- | epan/dissectors/packet-smpp.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/epan/dissectors/packet-smpp.c b/epan/dissectors/packet-smpp.c index 5d54bc16b1..9528249163 100644 --- a/epan/dissectors/packet-smpp.c +++ b/epan/dissectors/packet-smpp.c @@ -2403,7 +2403,7 @@ dissect_smpp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) guint32 offset = 0; while (tvb_reported_length_remaining(tvb, offset) > 0) { guint16 pdu_len = tvb_get_ntohl(tvb, offset); - gint pdu_real_len = tvb_length_remaining(tvb, offset); + gint pdu_real_len = tvb_captured_length_remaining(tvb, offset); tvbuff_t *pdu_tvb; if (pdu_len < 1) @@ -2420,7 +2420,7 @@ dissect_smpp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) } } - return tvb_length(tvb); + return tvb_captured_length(tvb); } @@ -2477,7 +2477,7 @@ dissect_smpp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data /* * Create display subtree for the protocol */ - ti = proto_tree_add_item (tree, proto_smpp, tvb, 0, tvb_length(tvb), ENC_NA); + ti = proto_tree_add_item (tree, proto_smpp, tvb, 0, tvb_captured_length(tvb), ENC_NA); smpp_tree = proto_item_add_subtree (ti, ett_smpp); /* @@ -2514,13 +2514,13 @@ dissect_smpp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data * Physical length: at most command_length * Reported length: command_length */ - if (tvb_length_remaining(tvb, offset - 16 + command_length) > 0) { + if (tvb_captured_length_remaining(tvb, offset - 16 + command_length) > 0) { pdu_tvb = tvb_new_subset(tvb, offset - 16, command_length, /* Physical length */ command_length); /* Length reported by the protocol */ } else { pdu_tvb = tvb_new_subset(tvb, offset - 16, - tvb_length_remaining(tvb, offset - 16),/* Physical length */ + tvb_captured_length_remaining(tvb, offset - 16),/* Physical length */ command_length); /* Length reported by the protocol */ } @@ -2719,7 +2719,7 @@ dissect_smpp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data first = FALSE; } - return tvb_length(tvb); + return tvb_captured_length(tvb); } |