diff options
author | Guy Harris <guy@alum.mit.edu> | 2007-05-27 18:33:13 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2007-05-27 18:33:13 +0000 |
commit | 01844e151ad3b5882ef36893aac6339d4ccfd0a7 (patch) | |
tree | de9cddb64f954a8a5c63aa0fe2c5e32bfac6ed06 /plugins/wimax/mac_hd_generic_decoder.c | |
parent | d99b6c0a8b53bcfd1b857e259d4cb1632302e408 (diff) |
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 <glib.h>, not <gmodule.h>, even in plugins.
Fix the version numbers in the rc files.
svn path=/trunk/; revision=21960
Diffstat (limited to 'plugins/wimax/mac_hd_generic_decoder.c')
-rw-r--r-- | plugins/wimax/mac_hd_generic_decoder.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/wimax/mac_hd_generic_decoder.c b/plugins/wimax/mac_hd_generic_decoder.c index 3f0b0bcc1c..acb5c825b0 100644 --- a/plugins/wimax/mac_hd_generic_decoder.c +++ b/plugins/wimax/mac_hd_generic_decoder.c @@ -1528,7 +1528,7 @@ void dissect_mac_header_generic_decoder(tvbuff_t *tvb, packet_info *pinfo, proto } #endif /* Get the frame length */ - tvb_len = tvb_length(tvb); + tvb_len = tvb_reported_length(tvb); if (tvb_len < WIMAX_MAC_HEADER_SIZE) { /* display the error message */ generic_item = proto_tree_add_protocol_format(tree, proto_mac_header_generic_decoder, tvb, offset, tvb_len, "Error: the size of Generic MAC Header tvb is too small! (%u bytes)", tvb_len); @@ -2073,8 +2073,8 @@ static gint extended_subheader_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Ext subhdrs"); } - /* Get the tvb length */ - length = tvb_length(tvb); + /* Get the tvb reported length */ + length = tvb_reported_length(tvb); if (!length) { /* display the error message */ proto_tree_add_protocol_format(tree, proto_mac_header_generic_decoder, tvb, offset, length, "Error: extended subheader tvb is empty ! (%u bytes)", length); @@ -2214,8 +2214,8 @@ static gint arq_feedback_payload_decoder(tvbuff_t *tvb, packet_info *pinfo, prot /* reset the offset */ offset = 0; - /* Get the tvb length */ - length = tvb_length(tvb); + /* Get the tvb reported length */ + length = tvb_reported_length(tvb); if (!length) { /* display the error message */ proto_tree_add_protocol_format(tree, proto_mac_header_generic_decoder, tvb, offset, length, "Error: ARQ feedback payload tvb is empty ! (%u bytes)", length); |