diff options
author | etxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7> | 2008-12-13 22:00:22 +0000 |
---|---|---|
committer | etxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7> | 2008-12-13 22:00:22 +0000 |
commit | c6d0d47e012d94f057782a1bc8b25318f7074add (patch) | |
tree | 183bfa6ed2409aaa9cbf5def3acc82bf5af4bbf6 /epan/dissectors/packet-gprs-llc.c | |
parent | 8e113ed10efdf97d83b7d889ded1a4b720249e33 (diff) |
From Vincent Helfre:
Fix sndcp_xid_offset.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@26990 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-gprs-llc.c')
-rw-r--r-- | epan/dissectors/packet-gprs-llc.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/epan/dissectors/packet-gprs-llc.c b/epan/dissectors/packet-gprs-llc.c index d670abf92d..ef7997cb97 100644 --- a/epan/dissectors/packet-gprs-llc.c +++ b/epan/dissectors/packet-gprs-llc.c @@ -377,6 +377,7 @@ static void llc_gprs_dissect_xid(tvbuff_t *tvb, if (tmp == 0xB) /* L3 XID parameters, call the SNDCP-XID dissector */ { tvbuff_t *sndcp_xid_tvb; + guint8 sndcp_xid_offset; uinfo_field = proto_tree_add_text(xid_tree, tvb, location, item_len, "XID parameter Type: L3 parameters"); @@ -387,12 +388,21 @@ static void llc_gprs_dissect_xid(tvbuff_t *tvb, if (byte1 & 0x80) { proto_tree_add_uint(uinfo_tree, hf_llcgprs_xid_len2, tvb, location+1, 1, byte2); proto_tree_add_uint(uinfo_tree, hf_llcgprs_xid_spare, tvb, location+1, 1, byte2); + sndcp_xid_offset = 2; } + else + { + sndcp_xid_offset = 1; + } if (xid_param_len) { - sndcp_xid_tvb = tvb_new_subset (tvb, location+2, xid_param_len, xid_param_len); + + sndcp_xid_tvb = tvb_new_subset (tvb, location+sndcp_xid_offset, xid_param_len, xid_param_len); + if(sndcp_xid_handle) - call_dissector(sndcp_xid_handle, sndcp_xid_tvb, pinfo, uinfo_tree); + { + call_dissector(sndcp_xid_handle, sndcp_xid_tvb, pinfo, uinfo_tree); + } } location += item_len; |