code review comments
This commit is contained in:
@@ -119,7 +119,7 @@ typedef struct sctp_data_ind_s {
|
||||
/* Buffer to send over SCTP */
|
||||
uint32_t buffer_length;
|
||||
uint8_t *buffer;
|
||||
bool freeAfterSend;
|
||||
|
||||
/* Streams on which data will be sent/received */
|
||||
uint16_t stream;
|
||||
} sctp_data_ind_t;
|
||||
|
||||
@@ -220,17 +220,15 @@ int e1ap_encode_send(E1_t type, e1ap_setup_req_t *setupReq, E1AP_E1AP_PDU_t *pdu
|
||||
if (encoded < 0) {
|
||||
LOG_E(E1AP, "%s: Failed to encode E1AP message\n", func);
|
||||
return -1;
|
||||
} else {
|
||||
MessageDef *message = itti_alloc_new_message((type==CPtype)?TASK_CUCP_E1:TASK_CUUP_E1, 0, SCTP_DATA_REQ);
|
||||
sctp_data_req_t *s = &message->ittiMsg.sctp_data_req;
|
||||
s->assoc_id = setupReq->assoc_id;
|
||||
s->buffer = buffer;
|
||||
s->buffer_length = encoded;
|
||||
s->stream = stream;
|
||||
s->freeAfterSend=true;
|
||||
LOG_I(E1AP, "%s: Sending ITTI message to SCTP Task\n", func);
|
||||
itti_send_msg_to_task(TASK_SCTP, 0 /*unused by callee*/, message);
|
||||
}
|
||||
MessageDef *message = itti_alloc_new_message((type == CPtype) ? TASK_CUCP_E1 : TASK_CUUP_E1, 0, SCTP_DATA_REQ);
|
||||
sctp_data_req_t *s = &message->ittiMsg.sctp_data_req;
|
||||
s->assoc_id = setupReq->assoc_id;
|
||||
s->buffer = buffer;
|
||||
s->buffer_length = encoded;
|
||||
s->stream = stream;
|
||||
LOG_I(E1AP, "%s: Sending ITTI message to SCTP Task\n", func);
|
||||
itti_send_msg_to_task(TASK_SCTP, 0 /*unused by callee*/, message);
|
||||
|
||||
return encoded;
|
||||
}
|
||||
|
||||
@@ -31,8 +31,7 @@ void f1ap_itti_send_sctp_data_req(bool isCu, instance_t instance, uint8_t *buffe
|
||||
sctp_data_req->assoc_id = f1ap_assoc_id(isCu,instance);
|
||||
sctp_data_req->buffer = buffer;
|
||||
sctp_data_req->buffer_length = buffer_length;
|
||||
sctp_data_req->stream = stream;
|
||||
sctp_data_req->freeAfterSend=true;
|
||||
sctp_data_req->stream = stream;
|
||||
LOG_D(F1AP, "Sending ITTI message to SCTP Task\n");
|
||||
itti_send_msg_to_task(TASK_SCTP, instance, message_p);
|
||||
}
|
||||
|
||||
@@ -2784,17 +2784,13 @@ void nr_mac_update_timers(module_id_t module_id,
|
||||
|
||||
NR_CellGroupConfig_t *cg = NULL;
|
||||
uper_decode(NULL,
|
||||
&asn_DEF_NR_CellGroupConfig, //might be added prefix later
|
||||
&asn_DEF_NR_CellGroupConfig, // might be added prefix later
|
||||
(void **)&cg,
|
||||
(uint8_t *)UE->cg_buf,
|
||||
(UE->enc_rval.encoded+7)/8, 0, 0);
|
||||
if (UE->CellGroup) {
|
||||
NR_CellGroupConfig_t *tmp=UE->CellGroup;
|
||||
UE->CellGroup = cg;
|
||||
ASN_STRUCT_FREE(asn_DEF_NR_CellGroupConfig,tmp);
|
||||
} else
|
||||
UE->CellGroup = cg;
|
||||
|
||||
(UE->enc_rval.encoded + 7) / 8,
|
||||
0,
|
||||
0);
|
||||
UE->CellGroup = cg;
|
||||
|
||||
if (LOG_DEBUGFLAG(DEBUG_ASN1)) {
|
||||
xer_fprint(stdout, &asn_DEF_NR_CellGroupConfig, (const void *) UE->CellGroup);
|
||||
|
||||
@@ -1760,7 +1760,8 @@ do_NR_DLInformationTransfer(
|
||||
|
||||
asn1cCalloc(infoTransfer->criticalExtensions.choice.dlInformationTransfer, dlInfoTransfer);
|
||||
asn1cCalloc(dlInfoTransfer->dedicatedNAS_Message,msg);
|
||||
// we will free the caller buffer
|
||||
// we will free the caller buffer, that is ok in the present code logic (else it will leak memory) but not natural,
|
||||
// comprehensive code design
|
||||
msg->buf = pdu_buffer;
|
||||
msg->size = pdu_length;
|
||||
|
||||
|
||||
@@ -1317,7 +1317,7 @@ int rrc_gNB_process_NGAP_PDUSESSION_RELEASE_COMMAND(MessageDef *msg_p, instance_
|
||||
PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt, instance, GNB_FLAG_YES, UE->rnti, 0, 0);
|
||||
xid = rrc_gNB_get_next_transaction_identifier(ctxt.module_id);
|
||||
LOG_I(
|
||||
NR_RRC, "PDU Session Release Command: AMF_UE_NGAP_ID %lu GNB_UE_NGAP_ID %u release_pdusessions %d \n", cmd->amf_ue_ngap_id & 0x000000FFFFFFFFFF, gNB_ue_ngap_id, cmd->nb_pdusessions_torelease);
|
||||
NR_RRC, "PDU Session Release Command: AMF_UE_NGAP_ID %lu GNB_UE_NGAP_ID %u release_pdusessions %d \n", cmd->amf_ue_ngap_id, gNB_ue_ngap_id, cmd->nb_pdusessions_torelease);
|
||||
|
||||
for (int pdusession = 0; pdusession < cmd->nb_pdusessions_torelease; pdusession++) {
|
||||
rrc_pdu_session_param_t *pduSession = find_pduSession(UE, cmd->pdusession_release_params[pdusession].pdusession_id, false);
|
||||
|
||||
@@ -237,7 +237,10 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc, rrc_gNB_ue_context_t *ue_context_p, x2a
|
||||
|
||||
NR_ServingCellConfig_t *scc = UE->spCellConfig ? UE->spCellConfig->spCellConfigDedicated : NULL;
|
||||
fill_default_reconfig(carrier->servingcellconfigcommon, scc, reconfig_ies, UE->secondaryCellGroup, UE->UE_Capability_nr, configuration, ue_context_p->ue_context.gNB_ue_ngap_id);
|
||||
rrc_gNB_update_ue_context_rnti(UE->secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity, rrc, UE->gNB_ue_ngap_id);
|
||||
// the UE context is not yet inserted in the RRC UE manager
|
||||
// rrc_gNB_update_ue_context_rnti(UE->secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity, rrc,
|
||||
// UE->gNB_ue_ngap_id);
|
||||
UE->rnti = UE->secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity;
|
||||
NR_CG_Config_t *CG_Config = calloc(1,sizeof(*CG_Config));
|
||||
memset((void *)CG_Config,0,sizeof(*CG_Config));
|
||||
// int CG_Config_size = generate_CG_Config(rrc,CG_Config,UE->reconfig,UE->rb_config);
|
||||
|
||||
@@ -43,8 +43,7 @@ void x2ap_eNB_itti_send_sctp_data_req(instance_t instance, int32_t assoc_id, uin
|
||||
sctp_data_req->assoc_id = assoc_id;
|
||||
sctp_data_req->buffer = buffer;
|
||||
sctp_data_req->buffer_length = buffer_length;
|
||||
sctp_data_req->stream = stream;
|
||||
sctp_data_req->freeAfterSend=true;
|
||||
sctp_data_req->stream = stream;
|
||||
|
||||
itti_send_msg_to_task(TASK_SCTP, instance, message_p);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user