From 01844e151ad3b5882ef36893aac6339d4ccfd0a7 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sun, 27 May 2007 18:33:13 +0000 Subject: Use tvb_reported_length() to get the amount of data we should look at; the number of bytes in the packet or subset of the packet is the reported length, tvb_length() just gives you the amount of that data that was actually captured. Include , not , even in plugins. Fix the version numbers in the rc files. svn path=/trunk/; revision=21960 --- plugins/wimax/msg_dsc.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'plugins/wimax/msg_dsc.c') diff --git a/plugins/wimax/msg_dsc.c b/plugins/wimax/msg_dsc.c index 2a8c1eb970..0723030609 100644 --- a/plugins/wimax/msg_dsc.c +++ b/plugins/wimax/msg_dsc.c @@ -36,7 +36,7 @@ #define DEBUG */ -#include +#include #include #include "wimax_tlv.h" #include "wimax_mac.h" @@ -144,8 +144,8 @@ void dissect_mac_mgmt_msg_dsc_req_decoder(tvbuff_t *tvb, packet_info *pinfo, pro /* ensure the message type is DSC REQ/RSP/ACK */ if(payload_type != MAC_MGMT_MSG_DSC_REQ) return; - /* Get the tvb length */ - tvb_len = tvb_length(tvb); + /* Get the tvb reported length */ + tvb_len = tvb_reported_length(tvb); /* display MAC message type */ dsc_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_dsc_decoder, tvb, offset, tvb_len, "%s (%u bytes)", dsc_msgs[payload_type - MAC_MGMT_MSG_DSC_REQ], tvb_len); /* add MAC DSx subtree */ @@ -181,8 +181,8 @@ void dissect_mac_mgmt_msg_dsc_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, pro /* ensure the message type is DSC REQ/RSP/ACK */ if(payload_type != MAC_MGMT_MSG_DSC_RSP) return; - /* Get the tvb length */ - tvb_len = tvb_length(tvb); + /* Get the tvb reported length */ + tvb_len = tvb_reported_length(tvb); /* display MAC message type */ dsc_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_dsc_decoder, tvb, offset, tvb_len, "%s (%u bytes)", dsc_msgs[payload_type - MAC_MGMT_MSG_DSC_REQ], tvb_len); /* add MAC DSx subtree */ @@ -222,8 +222,8 @@ void dissect_mac_mgmt_msg_dsc_ack_decoder(tvbuff_t *tvb, packet_info *pinfo, pro /* ensure the message type is DSC REQ/RSP/ACK */ if((payload_type < MAC_MGMT_MSG_DSC_REQ) || (payload_type > MAC_MGMT_MSG_DSC_ACK)) return; - /* Get the tvb length */ - tvb_len = tvb_length(tvb); + /* Get the tvb reported length */ + tvb_len = tvb_reported_length(tvb); /* display MAC message type */ dsc_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_dsc_decoder, tvb, offset, tvb_len, "%s (%u bytes)", dsc_msgs[payload_type - MAC_MGMT_MSG_DSC_REQ], tvb_len); /* add MAC DSx subtree */ -- cgit v1.2.3