From 780acd99312b6071dd2ae314086704f37c04cab1 Mon Sep 17 00:00:00 2001 From: Anders Broman Date: Mon, 29 Aug 2011 14:47:20 +0000 Subject: [PATCH] From Fredrik Kuivinen: Fix a problem with dissection of HandoverRequest. svn path=/trunk/; revision=38776 --- asn1/x2ap/x2ap.cnf | 10 +++------- epan/dissectors/packet-x2ap.c | 13 +++++-------- 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/asn1/x2ap/x2ap.cnf b/asn1/x2ap/x2ap.cnf index 797dca886c..7def384789 100644 --- a/asn1/x2ap/x2ap.cnf +++ b/asn1/x2ap/x2ap.cnf @@ -127,21 +127,17 @@ ProtocolExtensionID TYPE = FT_UINT8 DISPLAY = BASE_DEC STRINGS = VALS(x2ap_Prot proto_tree_add_item(subtree, hf_x2ap_transportLayerAddressIPv6, parameter_tvb, 0, tvb_len, FALSE); } -#.FN_BODY RRC-Context -#VAL_PTR = ¶meter_tvb +#.FN_BODY RRC-Context VAL_PTR = ¶meter_tvb # Includes the RRC Handover Preparation Information message as defined in # subclause 10.2.2 of [9]. # [9] 3GPP TS 36.331: "Evolved Universal Terrestrial Radio Access (E-UTRAN); Radio Resource # Control (RRC) Protocol Specification". tvbuff_t *parameter_tvb=NULL; - gint32 start_offset; - - start_offset = offset; + %(DEFAULT_BODY)s - parameter_tvb = tvb_new_subset(tvb, start_offset>>3, -1, -1); if (!parameter_tvb) return offset; - dissect_lte_rrc_HandoverCommand_PDU(parameter_tvb, actx->pinfo, tree); + dissect_lte_rrc_HandoverPreparationInformation_PDU(parameter_tvb, actx->pinfo, tree); #.ASSIGN_VALUE_TO_TYPE # X2AP does not have constants assigned to types, they are pure INTEGER # ProcedureCode diff --git a/epan/dissectors/packet-x2ap.c b/epan/dissectors/packet-x2ap.c index 474b8091f5..64b38b1dad 100644 --- a/epan/dissectors/packet-x2ap.c +++ b/epan/dissectors/packet-x2ap.c @@ -2689,18 +2689,15 @@ dissect_x2ap_ReportCharacteristics(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t static int dissect_x2ap_RRC_Context(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 136 "../../asn1/x2ap/x2ap.cnf" +#line 135 "../../asn1/x2ap/x2ap.cnf" tvbuff_t *parameter_tvb=NULL; - gint32 start_offset; - - start_offset = offset; - offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, - NO_BOUND, NO_BOUND, FALSE, NULL); - parameter_tvb = tvb_new_subset(tvb, start_offset>>3, -1, -1); + offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, + NO_BOUND, NO_BOUND, FALSE, ¶meter_tvb); + if (!parameter_tvb) return offset; - dissect_lte_rrc_HandoverCommand_PDU(parameter_tvb, actx->pinfo, tree); + dissect_lte_rrc_HandoverPreparationInformation_PDU(parameter_tvb, actx->pinfo, tree);