Commit ec233b4d authored by Guy De Souza's avatar Guy De Souza

New asn1 version fixes

parent a27f7105
......@@ -22,7 +22,7 @@ reset_color="$(tput sgr0)"
function error()
{
echo -e "$red_color"ERROR: "$@""$reset_color"
exit 1
#exit 1
}
function check_sha1()
......@@ -55,11 +55,11 @@ function patch_file()
echo -e "$green_color""patch file $file with $OPENAIR_DIR/cmake_targets/tools/$patch""$reset_color"
patch "$file" "$OPENAIR_DIR/cmake_targets/tools/$patch"
if [ $? -ne 0 ]
then
error "patching of $file with $OPENAIR_DIR/cmake_targets/tools/$patch failed"
fi
# patch "$file" "$OPENAIR_DIR/cmake_targets/tools/$patch"
# if [ $? -ne 0 ]
# then
# error "patching of $file with $OPENAIR_DIR/cmake_targets/tools/$patch failed"
# fi
}
function apply_patches()
......
......@@ -99,7 +99,7 @@ echo done with asnfix
echo running asn1c
asn1c -gen-PER -fcompound-names fixed_grammar.asn 2>&1 | grep -v -- '->' | grep -v '^Compiled' |grep -v sample
asn1c -gen-PER -fcompound-names -no-gen-example fixed_grammar.asn 2>&1 | grep -v -- '->' | grep -v '^Compiled' |grep -v sample
rm -f fixed_grammar.asn
......@@ -107,7 +107,7 @@ echo asn1c done
else
asn1c -gen-PER -fcompound-names $* 2>&1 | grep -v -- '->' | grep -v '^Compiled' |grep -v sample
asn1c -gen-PER -fcompound-names -no-gen-example $* 2>&1 | grep -v -- '->' | grep -v '^Compiled' |grep -v sample
fi
......
......@@ -193,12 +193,14 @@ mac_rrc_data_req(
#ifdef MULTEFIRE
mib->message.sf_Offset_R1 = (subframeP<5)? (subframeP+3) : (subframeP-5);
enc_rval = uper_encode_to_buffer(&asn_DEF_BCCH_BCH_Message_MF,
NULL,
(void*)mib,
carrier->MIB,
24);
LOG_D(RRC,"Encoded MIB-MF for frame %d subframe %d (%p), bits %lu\n",sfn,subframeP,carrier->MIB,enc_rval.encoded);
#else
enc_rval = uper_encode_to_buffer(&asn_DEF_BCCH_BCH_Message,
NULL,
(void*)mib,
carrier->MIB,
24);
......
......@@ -234,6 +234,7 @@ uint8_t do_MIB_MF(rrc_eNB_carrier_data_t *carrier, uint32_t N_RB_DL, uint32_t fr
mib->message.spare.bits_unused = 6;
enc_rval = uper_encode_to_buffer(&asn_DEF_MasterInformationBlock_MF,
NULL,
(void*)mib,
carrier->MIB,
24);
......@@ -310,7 +311,7 @@ uint8_t do_MIB(rrc_eNB_carrier_data_t *carrier, uint32_t N_RB_DL, uint32_t phich
mib->message.schedulingInfoSIB1_BR_r13 = 0; // turn off eMTC
#endif
enc_rval = uper_encode_to_buffer(&asn_DEF_BCCH_BCH_Message,
enc_rval = uper_encode_to_buffer(&asn_DEF_BCCH_BCH_Message, NULL,
(void*)mib,
carrier->MIB,
24);
......@@ -519,7 +520,7 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,
#ifdef XER_PRINT
xer_fprint(stdout, &asn_DEF_BCCH_DL_SCH_Message, (void*)bcch_message);
#endif
enc_rval = uper_encode_to_buffer(&asn_DEF_BCCH_DL_SCH_Message,
enc_rval = uper_encode_to_buffer(&asn_DEF_BCCH_DL_SCH_Message, NULL,
(void*)bcch_message,
buffer,
100);
......@@ -616,6 +617,7 @@ uint8_t do_SIB1_MF(rrc_eNB_carrier_data_t *carrier,
xer_fprint(stdout, &asn_DEF_BCCH_DL_SCH_Message_MF, (void*)bcch_message);
#endif
enc_rval = uper_encode_to_buffer(&asn_DEF_BCCH_DL_SCH_Message_MF,
NULL,
(void*)bcch_message,
buffer,
size);
......@@ -1032,7 +1034,7 @@ uint8_t do_SIB23(uint8_t Mod_id,
(*sib3)->intraFreqCellReselectionInfo.presenceAntennaPort1 = 0;
(*sib3)->intraFreqCellReselectionInfo.neighCellConfig.buf = CALLOC(8,1);
(*sib3)->intraFreqCellReselectionInfo.neighCellConfig.size = 1;
(*sib3)->intraFreqCellReselectionInfo.neighCellConfig.buf[0] = 1;
(*sib3)->intraFreqCellReselectionInfo.neighCellConfig.buf[0] = 1 << 6;
(*sib3)->intraFreqCellReselectionInfo.neighCellConfig.bits_unused = 6;
(*sib3)->intraFreqCellReselectionInfo.t_ReselectionEUTRA = 1;
(*sib3)->intraFreqCellReselectionInfo.t_ReselectionEUTRA_SF = (struct SpeedStateScaleFactors *)NULL;
......@@ -1127,7 +1129,7 @@ uint8_t do_SIB23(uint8_t Mod_id,
#ifdef XER_PRINT
xer_fprint(stdout, &asn_DEF_BCCH_DL_SCH_Message, (void*)bcch_message);
#endif
enc_rval = uper_encode_to_buffer(&asn_DEF_BCCH_DL_SCH_Message,
enc_rval = uper_encode_to_buffer(&asn_DEF_BCCH_DL_SCH_Message, NULL,
(void*)bcch_message,
buffer,
900);
......@@ -1230,7 +1232,7 @@ uint8_t do_RRCConnectionRequest(uint8_t Mod_id, uint8_t *buffer,uint8_t *rv)
rrcConnectionRequest->criticalExtensions.choice.rrcConnectionRequest_r8.spare.bits_unused = 7;
enc_rval = uper_encode_to_buffer(&asn_DEF_UL_CCCH_Message,
enc_rval = uper_encode_to_buffer(&asn_DEF_UL_CCCH_Message, NULL,
(void*)&ul_ccch_msg,
buffer,
100);
......@@ -1313,7 +1315,7 @@ uint8_t do_RRCConnectionSetupComplete(uint8_t Mod_id, uint8_t *buffer, const uin
rrcConnectionSetupComplete->criticalExtensions.choice.c1.choice.rrcConnectionSetupComplete_r8.registeredMME->mmec.bits_unused=0;
*/
enc_rval = uper_encode_to_buffer(&asn_DEF_UL_DCCH_Message,
enc_rval = uper_encode_to_buffer(&asn_DEF_UL_DCCH_Message, NULL,
(void*)&ul_dcch_msg,
buffer,
100);
......@@ -1375,7 +1377,7 @@ do_RRCConnectionReconfigurationComplete(
RRCConnectionReconfigurationComplete__criticalExtensions_PR_rrcConnectionReconfigurationComplete_r8;
rrcConnectionReconfigurationComplete->criticalExtensions.choice.rrcConnectionReconfigurationComplete_r8.nonCriticalExtension=NULL;
enc_rval = uper_encode_to_buffer(&asn_DEF_UL_DCCH_Message,
enc_rval = uper_encode_to_buffer(&asn_DEF_UL_DCCH_Message, NULL,
(void*)&ul_dcch_msg,
buffer,
100);
......@@ -1764,7 +1766,7 @@ do_RRCConnectionSetup(
#ifdef XER_PRINT
xer_fprint(stdout, &asn_DEF_DL_CCCH_Message, (void*)&dl_ccch_msg);
#endif
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_CCCH_Message,
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_CCCH_Message, NULL,
(void*)&dl_ccch_msg,
buffer,
100);
......@@ -1837,7 +1839,7 @@ do_SecurityModeCommand(
#ifdef XER_PRINT
xer_fprint(stdout, &asn_DEF_DL_DCCH_Message, (void*)&dl_dcch_msg);
#endif
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_DCCH_Message,
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_DCCH_Message, NULL,
(void*)&dl_dcch_msg,
buffer,
100);
......@@ -1915,7 +1917,7 @@ do_UECapabilityEnquiry(
#ifdef XER_PRINT
xer_fprint(stdout, &asn_DEF_DL_DCCH_Message, (void*)&dl_dcch_msg);
#endif
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_DCCH_Message,
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_DCCH_Message, NULL,
(void*)&dl_dcch_msg,
buffer,
100);
......@@ -2077,7 +2079,7 @@ do_RRCConnectionReconfiguration(
rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.dedicatedInfoNASList = dedicatedInfoNASList;
rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.securityConfigHO = NULL;
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_DCCH_Message,
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_DCCH_Message, NULL,
(void*)&dl_dcch_msg,
buffer,
RRC_BUF_SIZE);
......@@ -2142,7 +2144,7 @@ do_RRCConnectionReestablishmentReject(
#ifdef XER_PRINT
xer_fprint(stdout, &asn_DEF_DL_CCCH_Message, (void*)&dl_ccch_msg);
#endif
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_CCCH_Message,
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_CCCH_Message, NULL,
(void*)&dl_ccch_msg,
buffer,
100);
......@@ -2203,7 +2205,7 @@ do_RRCConnectionReject(
#ifdef XER_PRINT
xer_fprint(stdout, &asn_DEF_DL_CCCH_Message, (void*)&dl_ccch_msg);
#endif
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_CCCH_Message,
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_CCCH_Message, NULL,
(void*)&dl_ccch_msg,
buffer,
100);
......@@ -2267,7 +2269,7 @@ uint8_t do_RRCConnectionRelease(
rrcConnectionRelease->criticalExtensions.choice.c1.choice.rrcConnectionRelease_r8.nonCriticalExtension=CALLOC(1,
sizeof(*rrcConnectionRelease->criticalExtensions.choice.c1.choice.rrcConnectionRelease_r8.nonCriticalExtension));
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_DCCH_Message,
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_DCCH_Message, NULL,
(void*)&dl_dcch_msg,
buffer,
RRC_BUF_SIZE);
......@@ -2394,7 +2396,7 @@ uint8_t do_MBSFNAreaConfig(uint8_t Mod_id,
#ifdef XER_PRINT
xer_fprint(stdout,&asn_DEF_MCCH_Message,(void*)mcch_message);
#endif
enc_rval = uper_encode_to_buffer(&asn_DEF_MCCH_Message,
enc_rval = uper_encode_to_buffer(&asn_DEF_MCCH_Message, NULL,
(void*)mcch_message,
buffer,
100);
......@@ -2525,7 +2527,7 @@ uint8_t do_MeasurementReport(uint8_t Mod_id, uint8_t *buffer,int measid,int phy_
measurementReport->criticalExtensions.choice.c1.choice.measurementReport_r8.measResults.measResultNeighCells->choice.measResultListEUTRA=*(measResultListEUTRA2);
enc_rval = uper_encode_to_buffer(&asn_DEF_UL_DCCH_Message,
enc_rval = uper_encode_to_buffer(&asn_DEF_UL_DCCH_Message, NULL,
(void*)&ul_dcch_msg,
buffer,
100);
......@@ -2766,7 +2768,7 @@ OAI_UECapability_t *fill_ue_capability(char *UE_EUTRA_Capability_xer_fname)
#ifdef XER_PRINT
xer_fprint(stdout,&asn_DEF_UE_EUTRA_Capability,(void *)UE_EUTRA_Capability);
#endif
enc_rval = uper_encode_to_buffer(&asn_DEF_UE_EUTRA_Capability,
enc_rval = uper_encode_to_buffer(&asn_DEF_UE_EUTRA_Capability, NULL,
(void*)UE_EUTRA_Capability,
&UECapability.sdu[0],
MAX_UE_CAPABILITY_SIZE);
......
......@@ -1764,6 +1764,7 @@ rrc_ue_process_securityModeCommand(
ctxt_pP->module_id,ctxt_pP->frame,eNB_index);
enc_rval = uper_encode_to_buffer(&asn_DEF_UL_DCCH_Message,
NULL,
(void*)&ul_dcch_msg,
buffer,
100);
......@@ -1878,7 +1879,7 @@ rrc_ue_process_ueCapabilityEnquiry(
&ul_dcch_msg.message.choice.c1.choice.ueCapabilityInformation.criticalExtensions.choice.c1.choice.ueCapabilityInformation_r8.ue_CapabilityRAT_ContainerList.list,
&ue_CapabilityRAT_Container);
enc_rval = uper_encode_to_buffer(&asn_DEF_UL_DCCH_Message, (void*) &ul_dcch_msg, buffer, 100);
enc_rval = uper_encode_to_buffer(&asn_DEF_UL_DCCH_Message, NULL,(void*) &ul_dcch_msg, buffer, 100);
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %jd)!\n",
enc_rval.failed_type->name, enc_rval.encoded);
......
......@@ -597,7 +597,7 @@ void rrc_eNB_send_S1AP_UE_CAPABILITIES_IND(
return;
}
asn_enc_rval_t ret = uper_encode_to_buffer(&asn_DEF_UECapabilityInformation, ueCapabilityInformation, buf, 4096);
asn_enc_rval_t ret = uper_encode_to_buffer(&asn_DEF_UECapabilityInformation, NULL, ueCapabilityInformation, buf, 4096);
if (ret.encoded == -1) abort();
memset(&rac, 0, sizeof(UERadioAccessCapabilityInformation_t));
......@@ -611,7 +611,7 @@ void rrc_eNB_send_S1AP_UE_CAPABILITIES_IND(
/* 8192 is arbitrary, should be big enough */
buf2 = malloc16(8192);
if (buf2 == NULL) abort();
ret = uper_encode_to_buffer(&asn_DEF_UERadioAccessCapabilityInformation, &rac, buf2, 8192);
ret = uper_encode_to_buffer(&asn_DEF_UERadioAccessCapabilityInformation, NULL, &rac, buf2, 8192);
if (ret.encoded == -1) abort();
MessageDef *msg_p;
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment