aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-mbtcp.c
diff options
context:
space:
mode:
authorEvan Huus <eapache@gmail.com>2015-06-23 11:24:48 -0700
committerEvan Huus <eapache@gmail.com>2015-06-23 18:25:52 +0000
commit8bc294c0d12e742d8c539177a683eff16653b31b (patch)
tree3a309f71e73889bbe39d1df18417c250fa6a686b /epan/dissectors/packet-mbtcp.c
parentd7b286c7941bb0adf0566844637ffcc245bf1db1 (diff)
Replace more deprecated tvb_length calls
The return values of new-style dissectors always use the captured length, so replace those automagically with sed. Change-Id: Ic43072ee4a80d433cd4264444583a0e670adc26a Reviewed-on: https://code.wireshark.org/review/9065 Reviewed-by: Evan Huus <eapache@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-mbtcp.c')
-rw-r--r--epan/dissectors/packet-mbtcp.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/epan/dissectors/packet-mbtcp.c b/epan/dissectors/packet-mbtcp.c
index 187fa080e9..6bd436e5e2 100644
--- a/epan/dissectors/packet-mbtcp.c
+++ b/epan/dissectors/packet-mbtcp.c
@@ -533,7 +533,7 @@ dissect_mbtcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dat
p_remove_proto_data(wmem_file_scope(), pinfo, proto_modbus, 0);
p_add_proto_data(wmem_file_scope(), pinfo, proto_modbus, 0, p_save_proto_data);
- return tvb_length(tvb);
+ return tvb_captured_length(tvb);
}
/* Code to dissect Modbus RTU over TCP packets */
@@ -675,7 +675,7 @@ dissect_mbrtu_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dat
p_remove_proto_data(wmem_file_scope(), pinfo, proto_modbus, 0);
p_add_proto_data(wmem_file_scope(), pinfo, proto_modbus, 0, p_save_proto_data);
- return tvb_length(tvb);
+ return tvb_captured_length(tvb);
}
@@ -704,7 +704,7 @@ get_mbrtu_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb,
{
/* Modbus/TCP frames include a "length" word in each message; Modbus RTU over TCP does not, so don't attempt to get one */
- return tvb_length(tvb);
+ return tvb_captured_length(tvb);
}
@@ -731,7 +731,7 @@ dissect_mbtcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
tcp_dissect_pdus(tvb, pinfo, tree, mbtcp_desegment, 6,
get_mbtcp_pdu_len, dissect_mbtcp_pdu, data);
- return tvb_length(tvb);
+ return tvb_captured_length(tvb);
}
/* Code to dissect Modbus RTU over TCP messages */
@@ -752,7 +752,7 @@ dissect_mbrtu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
tcp_dissect_pdus(tvb, pinfo, tree, mbrtu_desegment, 6,
get_mbrtu_pdu_len, dissect_mbrtu_pdu, data);
- return tvb_length(tvb);
+ return tvb_captured_length(tvb);
}
@@ -1399,7 +1399,7 @@ dissect_modbus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _
}
}
- return tvb_length(tvb);
+ return tvb_captured_length(tvb);
}