diff options
author | Anders Broman <anders.broman@ericsson.com> | 2006-03-22 17:11:31 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2006-03-22 17:11:31 +0000 |
commit | f0c117048d515574a2ba2de5fac8e54ece89683f (patch) | |
tree | 250588d1365a6ff6e23c51eb6451e35f0b44ff17 /epan/dissectors | |
parent | f935a4f8f6f5f6e046b43e31b1e08c8fef3fb696 (diff) |
Handle two octet lengths correctly and remove optional decoding of sns_config, as I read the standard there is no difference.
svn path=/trunk/; revision=17696
Diffstat (limited to 'epan/dissectors')
-rw-r--r-- | epan/dissectors/packet-nsip.c | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/epan/dissectors/packet-nsip.c b/epan/dissectors/packet-nsip.c index d7bb036d56..a06b258b61 100644 --- a/epan/dissectors/packet-nsip.c +++ b/epan/dissectors/packet-nsip.c @@ -271,7 +271,7 @@ get_value_length(nsip_ie_t *ie, build_info_t *bi) { else { length_len++; length <<= 8; - length |= tvb_get_guint8(bi->tvb, bi->offset); + length |= tvb_get_guint8(bi->tvb, bi->offset+1); } ie->value_length = length; ie->total_length += length_len + length; @@ -811,10 +811,7 @@ decode_pdu_sns_changeweight(build_info_t *bi) { static void decode_pdu_sns_config(build_info_t *bi) { - int use520 = 1; - - if (use520) { - /* According to v. 5.2.0 */ + nsip_ie_t ies[] = { { 0, NSIP_IE_PRESENCE_M, NSIP_IE_FORMAT_V, 0, 1 }, /* End flag */ { NSIP_IE_NSEI, NSIP_IE_PRESENCE_M, NSIP_IE_FORMAT_TLV, 0, 4 }, @@ -825,21 +822,6 @@ decode_pdu_sns_config(build_info_t *bi) { }; decode_iei_end_flag(ies, bi, bi->offset); decode_pdu_general(&ies[1], 3, bi); - } - else { /* According to v. 5.3.0 */ - nsip_ie_t ies[] = { - { NSIP_IE_NSEI, NSIP_IE_PRESENCE_M, NSIP_IE_FORMAT_TLV, 0, 4 }, - { 0, NSIP_IE_PRESENCE_M, NSIP_IE_FORMAT_V, 0, 1 }, /* End flag */ - { NSIP_IE_NSEI, NSIP_IE_PRESENCE_M, NSIP_IE_FORMAT_TLV, 0, 4 }, - { NSIP_IE_IP4_ELEMENTS, NSIP_IE_PRESENCE_C, NSIP_IE_FORMAT_TLV, 0, 0 }, - /* Unknown length */ - { NSIP_IE_IP6_ELEMENTS, NSIP_IE_PRESENCE_C, NSIP_IE_FORMAT_TLV, 0, 0 }, - /* Unknown length */ - }; - decode_pdu_general(ies, 1, bi); - decode_iei_end_flag(&ies[1], bi, bi->offset); - decode_pdu_general(&ies[2], 3, bi); - } } static void |