Commit c30707b3 authored by Lionel Gauthier's avatar Lionel Gauthier

1/2 correction of bug when releasing UE

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@6329 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent f5d3fda2
......@@ -182,4 +182,10 @@ typedef struct protocol_ctxt_s {
frame_t frame; /*!< \brief LTE Frame number.*/
eNB_flag_t enb_flag; /*!< \brief Flag to indicate eNB (1) or UE (0) */
} protocol_ctxt_t;
#define PROTOCOL_CTXT_FMT "[FRAME %05u][%s][MOD %02u/%02u]"
#define PROTOCOL_CTXT_ARGS(CTXT_Pp) \
CTXT_Pp->frame, \
(CTXT_Pp->enb_flag == ENB_FLAG_YES) ? "eNB":" UE", \
CTXT_Pp->enb_module_id, \
CTXT_Pp->ue_module_id
#endif
......@@ -70,7 +70,10 @@ rlc_am_get_buffer_occupancy_in_bytes (
if (rlc_pP->t_status_prohibit.running == 0) {
#ifdef TRACE_RLC_AM_BO
if (((15 + rlc_pP->num_nack_sn*(10+1) + rlc_pP->num_nack_so*(15+15+1) + 7) >> 3) > 0) {
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] BO : CONTROL PDU %d bytes \n", ctxt_pP->frame, rlc_pP->module_id, rlc_pP->rb_id, ((15 + rlc_pP->num_nack_sn*(10+1) + rlc_pP->num_nack_so*(15+15+1) + 7) >> 3));
LOG_D(RLC, PROTOCOL_CTXT_FMT RB_AM_FMT" BO : CONTROL PDU %d bytes \n",
PROTOCOL_CTXT_ARGS(ctxt_pP),
RB_AM_ARGS(rlc_pP),
((15 + rlc_pP->num_nack_sn*(10+1) + rlc_pP->num_nack_so*(15+15+1) + 7) >> 3));
}
#endif
return ((15 + rlc_pP->num_nack_sn*(10+1) + rlc_pP->num_nack_so*(15+15+1) + 7) >> 3);
......@@ -92,9 +95,15 @@ rlc_am_get_buffer_occupancy_in_bytes (
#ifdef TRACE_RLC_AM_BO
if ((rlc_pP->status_buffer_occupancy + rlc_pP->retransmission_buffer_occupancy + rlc_pP->sdu_buffer_occupancy + max_li_overhead + header_overhead) > 0) {
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] BO : STATUS BUFFER %d bytes \n", ctxt_pP->frame, rlc_pP->module_id, rlc_pP->rb_id, rlc_pP->status_buffer_occupancy);
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] BO : RETRANS BUFFER %d bytes \n", ctxt_pP->frame, rlc_pP->module_id,rlc_pP->rb_id, rlc_pP->retransmission_buffer_occupancy);
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u] BO : SDU BUFFER %d bytes + li_overhead %d bytes header_overhead %d bytes (nb sdu not segmented %d)\n", ctxt_pP->frame, rlc_pP->module_id,rlc_pP->rb_id, rlc_pP->sdu_buffer_occupancy, max_li_overhead, header_overhead, rlc_pP->nb_sdu_no_segmented);
LOG_D(RLC, PROTOCOL_CTXT_FMT RB_AM_FMT" BO : STATUS BUFFER %d bytes \n", PROTOCOL_CTXT_ARGS(ctxt_pP), RB_AM_ARGS(rlc_pP), rlc_pP->status_buffer_occupancy);
LOG_D(RLC, PROTOCOL_CTXT_FMT RB_AM_FMT" BO : RETRANS BUFFER %d bytes \n", PROTOCOL_CTXT_ARGS(ctxt_pP), RB_AM_ARGS(rlc_pP), rlc_pP->retransmission_buffer_occupancy);
LOG_D(RLC, PROTOCOL_CTXT_FMT RB_AM_FMT" BO : SDU BUFFER %d bytes + li_overhead %d bytes header_overhead %d bytes (nb sdu not segmented %d)\n",
PROTOCOL_CTXT_ARGS(ctxt_pP),
RB_AM_ARGS(rlc_pP),
rlc_pP->sdu_buffer_occupancy,
max_li_overhead,
header_overhead,
rlc_pP->nb_sdu_no_segmented);
}
#endif
return rlc_pP->status_buffer_occupancy + rlc_pP->retransmission_buffer_occupancy + rlc_pP->sdu_buffer_occupancy + max_li_overhead + header_overhead;
......@@ -128,20 +137,15 @@ config_req_rlc_am (
if (h_rc == HASH_TABLE_OK) {
l_rlc_p = &rlc_union_p->rlc.am;
LOG_D(RLC,
"[FRAME %5u][%s][RRC][MOD %u/%u][][--- CONFIG_REQ (max_retx_threshold=%d poll_pdu=%d poll_byte=%d t_poll_retransmit=%d t_reord=%d t_status_prohibit=%d) --->][RLC_AM][MOD %u/%u][RB %u]\n",
ctxt_pP->frame,
( ctxt_pP->enb_flag > 0) ? "eNB":"UE",
ctxt_pP->enb_module_id,
ctxt_pP->ue_module_id,
PROTOCOL_CTXT_FMT RB_AM_FMT" CONFIG_REQ (max_retx_threshold=%d poll_pdu=%d poll_byte=%d t_poll_retransmit=%d t_reord=%d t_status_prohibit=%d)\n",
PROTOCOL_CTXT_ARGS(ctxt_pP),
RB_AM_ARGS(l_rlc_p),
config_am_pP->max_retx_threshold,
config_am_pP->poll_pdu,
config_am_pP->poll_byte,
config_am_pP->t_poll_retransmit,
config_am_pP->t_reordering,
config_am_pP->t_status_prohibit,
ctxt_pP->enb_module_id,
ctxt_pP->ue_module_id,
rb_idP);
config_am_pP->t_status_prohibit);
rlc_am_init(ctxt_pP, l_rlc_p);
rlc_am_set_debug_infos(ctxt_pP, l_rlc_p, srb_flagP, rb_idP);
rlc_am_configure(ctxt_pP, l_rlc_p,
......@@ -152,14 +156,9 @@ config_req_rlc_am (
config_am_pP->t_reordering,
config_am_pP->t_status_prohibit);
} else {
LOG_E(RLC, "[FRAME %5u][%s][RRC][MOD %u/%u][][--- CONFIG_REQ --->][RLC_AM][MOD %u/%u][RB %u] RLC NOT FOUND\n",
ctxt_pP->frame,
(ctxt_pP->enb_flag) ? "eNB" : "UE",
ctxt_pP->enb_module_id,
ctxt_pP->ue_module_id,
ctxt_pP->enb_module_id,
ctxt_pP->ue_module_id,
rb_idP);
LOG_E(RLC, PROTOCOL_CTXT_FMT RB_AM_FMT" CONFIG_REQ RLC NOT FOUND\n",
PROTOCOL_CTXT_ARGS(ctxt_pP),
RB_AM_ARGS(l_rlc_p));
}
}
uint32_t pollPDU_tab[PollPDU_pInfinity+1]={4,8,16,32,64,128,256,1024}; // What is PollPDU_pInfinity??? 1024 for now
......@@ -192,20 +191,15 @@ void config_req_rlc_am_asn1 (
(config_am_pP->dl_AM_RLC.t_Reordering<T_Reordering_spare1) &&
(config_am_pP->dl_AM_RLC.t_StatusProhibit<T_StatusProhibit_spare8) ){
LOG_D(RLC, "[FRAME %5u][%s][RRC][MOD %u/%u][][--- CONFIG_REQ (max_retx_threshold=%d poll_pdu=%d poll_byte=%d t_poll_retransmit=%d t_reord=%d t_status_prohibit=%d) --->][RLC_AM][MOD %u/%u][RB %u]\n",
ctxt_pP->frame,
(ctxt_pP->enb_flag) ? "eNB" : "UE",
ctxt_pP->enb_module_id,
ctxt_pP->ue_module_id,
LOG_D(RLC, PROTOCOL_CTXT_FMT RB_AM_FMT" CONFIG_REQ (max_retx_threshold=%d poll_pdu=%d poll_byte=%d t_poll_retransmit=%d t_reord=%d t_status_prohibit=%d)\n",
PROTOCOL_CTXT_ARGS(ctxt_pP),
RB_AM_ARGS(l_rlc_p),
maxRetxThreshold_tab[config_am_pP->ul_AM_RLC.maxRetxThreshold],
pollPDU_tab[config_am_pP->ul_AM_RLC.pollPDU],
pollByte_tab[config_am_pP->ul_AM_RLC.pollByte],
PollRetransmit_tab[config_am_pP->ul_AM_RLC.t_PollRetransmit],
am_t_Reordering_tab[config_am_pP->dl_AM_RLC.t_Reordering],
t_StatusProhibit_tab[config_am_pP->dl_AM_RLC.t_StatusProhibit],
ctxt_pP->enb_module_id,
ctxt_pP->ue_module_id,
rb_idP);
t_StatusProhibit_tab[config_am_pP->dl_AM_RLC.t_StatusProhibit]);
rlc_am_init(ctxt_pP, l_rlc_p);
rlc_am_set_debug_infos(ctxt_pP, l_rlc_p, srb_flagP, rb_idP);
......@@ -218,30 +212,20 @@ void config_req_rlc_am_asn1 (
t_StatusProhibit_tab[config_am_pP->dl_AM_RLC.t_StatusProhibit]);
} else {
LOG_D(RLC,
"[FRAME %5u][%s][RRC][MOD %u/%u][][--- ILLEGAL CONFIG_REQ (max_retx_threshold=%d poll_pdu=%d poll_byte=%d t_poll_retransmit=%d t_reord=%d t_status_prohibit=%d) --->][RLC_AM][MOD %u/%u][RB %u], RLC-AM NOT CONFIGURED\n",
ctxt_pP->frame,
(ctxt_pP->enb_flag) ? "eNB" : "UE",
ctxt_pP->enb_module_id,
ctxt_pP->ue_module_id,
PROTOCOL_CTXT_FMT RB_AM_FMT "ILLEGAL CONFIG_REQ (max_retx_threshold=%d poll_pdu=%d poll_byte=%d t_poll_retransmit=%d t_reord=%d t_status_prohibit=%d), RLC-AM NOT CONFIGURED\n",
PROTOCOL_CTXT_ARGS(ctxt_pP),
RB_AM_ARGS(l_rlc_p),
config_am_pP->ul_AM_RLC.maxRetxThreshold,
config_am_pP->ul_AM_RLC.pollPDU,
config_am_pP->ul_AM_RLC.pollByte,
config_am_pP->ul_AM_RLC.t_PollRetransmit,
config_am_pP->dl_AM_RLC.t_Reordering,
config_am_pP->dl_AM_RLC.t_StatusProhibit,
ctxt_pP->enb_module_id,
ctxt_pP->ue_module_id,
rb_idP);
config_am_pP->dl_AM_RLC.t_StatusProhibit);
}
} else {
LOG_E(RLC, "[FRAME %5u][%s][RRC][MOD %u/%u][][--- CONFIG_REQ --->][RLC_AM][MOD %u/%u][RB %u] RLC NOT FOUND\n",
ctxt_pP->frame,
(ctxt_pP->enb_flag) ? "eNB" : "UE",
ctxt_pP->enb_module_id,
ctxt_pP->ue_module_id,
ctxt_pP->enb_module_id,
ctxt_pP->ue_module_id,
rb_idP);
LOG_E(RLC, PROTOCOL_CTXT_FMT RB_AM_FMT "CONFIG_REQ RLC NOT FOUND\n",
PROTOCOL_CTXT_ARGS(ctxt_pP),
RB_AM_ARGS(l_rlc_p));
}
}
......
......@@ -86,6 +86,11 @@
#define RB_AM_FMT "[%s %02u]"
#define RB_AM_ARGS(RLC_Pp) \
(RLC_Pp->is_data_plane == TRUE) ? "DRB AM":"SRB AM", \
RLC_Pp->rb_id
/*! \fn void rlc_am_release (const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pP)
* \brief Empty function, TO DO.
* \param[in] ctxt_pP Running context.
......
......@@ -43,9 +43,11 @@ rlc_am_init(
//-----------------------------------------------------------------------------
{
if (rlc_pP->initialized == TRUE) {
LOG_D(RLC, "[FRAME %5u][RLC_AM][MOD XX][RB XX][INIT] INITIALIZATION ALREADY DONE, DOING NOTHING\n", ctxt_pP->frame);
LOG_D(RLC, PROTOCOL_CTXT_FMT"[AM INIT] INITIALIZATION ALREADY DONE, DOING NOTHING\n",
PROTOCOL_CTXT_ARGS(ctxt_pP));
} else {
LOG_D(RLC, "[FRAME %5u][RLC_AM][MOD XX][RB XX][INIT] INITIALIZATION: STATE VARIABLES, BUFFERS, LISTS\n", ctxt_pP->frame);
LOG_D(RLC, PROTOCOL_CTXT_FMT"[AM INIT] INITIALIZATION: STATE VARIABLES, BUFFERS, LISTS\n",
PROTOCOL_CTXT_ARGS(ctxt_pP));
memset(rlc_pP, 0, sizeof(rlc_am_entity_t));
list2_init(&rlc_pP->receiver_buffer, "RX BUFFER");
......@@ -59,8 +61,14 @@ rlc_am_init(
#warning "cast the rlc retrans buffer to uint32"
// rlc_pP->pdu_retrans_buffer = calloc(1, (uint16_t)((unsigned int)RLC_AM_PDU_RETRANSMISSION_BUFFER_SIZE*(unsigned int)sizeof(rlc_am_tx_data_pdu_management_t)));
rlc_pP->pdu_retrans_buffer = calloc(1, (uint32_t)((unsigned int)RLC_AM_PDU_RETRANSMISSION_BUFFER_SIZE*(unsigned int)sizeof(rlc_am_tx_data_pdu_management_t)));
LOG_D(RLC, "[FRAME %5u][RLC_AM][MOD XX][RB XX][INIT] input_sdus[] = %p element size=%d\n", ctxt_pP->frame, rlc_pP->input_sdus,sizeof(rlc_am_tx_sdu_management_t));
LOG_D(RLC, "[FRAME %5u][RLC_AM][MOD XX][RB XX][INIT] pdu_retrans_buffer[] = %p element size=%d\n", ctxt_pP->frame, rlc_pP->pdu_retrans_buffer,sizeof(rlc_am_tx_data_pdu_management_t));
LOG_D(RLC, PROTOCOL_CTXT_FMT"[AM INIT] input_sdus[] = %p element size=%d\n",
PROTOCOL_CTXT_ARGS(ctxt_pP),
rlc_pP->input_sdus,
sizeof(rlc_am_tx_sdu_management_t));
LOG_D(RLC, PROTOCOL_CTXT_FMT"[AM INIT] pdu_retrans_buffer[] = %p element size=%d\n",
PROTOCOL_CTXT_ARGS(ctxt_pP),
rlc_pP->pdu_retrans_buffer,
sizeof(rlc_am_tx_data_pdu_management_t));
// TX state variables
//rlc_pP->vt_a = 0;
......@@ -104,7 +112,8 @@ rlc_am_reestablish(
* - stop and reset all timers;
* - reset all state variables to their initial values.
*/
LOG_D(RLC, "[FRAME %5u][RLC_AM][MOD XX][RB XX][REESTABLISH] RE-INIT STATE VARIABLES, BUFFERS, LISTS\n", ctxt_pP->frame);
LOG_D(RLC, PROTOCOL_CTXT_FMT"[AM REESTABLISH] RE-INIT STATE VARIABLES, BUFFERS, LISTS\n",
PROTOCOL_CTXT_ARGS(ctxt_pP));
#warning TODO when possible reassemble RLC SDUs from any byte segments of AMD PDUs with SN inf VR(MR)
list2_free(&rlc_pP->receiver_buffer);
......@@ -141,15 +150,13 @@ rlc_am_reestablish(
//-----------------------------------------------------------------------------
void
rlc_am_cleanup(
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t* const rlc_pP)
rlc_am_entity_t* const rlc_pP
)
//-----------------------------------------------------------------------------
{
LOG_I(RLC, "[FRAME ?????][%s][RLC_AM][MOD %u/%u][RB %u][CLEANUP]\n",
(ctxt_pP->enb_flag) ? "eNB" : "UE",
ctxt_pP->enb_module_id,
ctxt_pP->ue_module_id,
rlc_pP->rb_id);
LOG_I(RLC, RB_AM_FMT"[CLEANUP %p]\n",
RB_AM_ARGS(rlc_pP),
rlc_pP);
list2_free(&rlc_pP->receiver_buffer);
list_free(&rlc_pP->pdus_to_mac_layer);
......@@ -199,11 +206,8 @@ rlc_am_configure(
//-----------------------------------------------------------------------------
{
if (rlc_pP->configured == TRUE) {
LOG_I(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][RECONFIGURE] max_retx_threshold %d poll_pdu %d poll_byte %d t_poll_retransmit %d t_reordering %d t_status_prohibit %d\n",
ctxt_pP->frame,
(ctxt_pP->enb_flag) ? "eNB" : "UE",
ctxt_pP->enb_module_id,
ctxt_pP->ue_module_id,
LOG_I(RLC, PROTOCOL_CTXT_FMT"[RB AM %u][RECONFIGURE] max_retx_threshold %d poll_pdu %d poll_byte %d t_poll_retransmit %d t_reordering %d t_status_prohibit %d\n",
PROTOCOL_CTXT_ARGS(ctxt_pP),
rlc_pP->rb_id,
max_retx_thresholdP,
poll_pduP,
......@@ -221,11 +225,8 @@ rlc_am_configure(
rlc_pP->t_reordering.time_out = t_reorderingP;
rlc_pP->t_status_prohibit.time_out = t_status_prohibitP;
} else {
LOG_I(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][CONFIGURE] max_retx_threshold %d poll_pdu %d poll_byte %d t_poll_retransmit %d t_reordering %d t_status_prohibit %d\n",
ctxt_pP->frame,
(ctxt_pP->enb_flag) ? "eNB" : "UE",
ctxt_pP->enb_module_id,
ctxt_pP->ue_module_id,
LOG_I(RLC, PROTOCOL_CTXT_FMT"[RB AM %u][CONFIGURE] max_retx_threshold %d poll_pdu %d poll_byte %d t_poll_retransmit %d t_reordering %d t_status_prohibit %d\n",
PROTOCOL_CTXT_ARGS(ctxt_pP),
rlc_pP->rb_id,
max_retx_thresholdP,
poll_pduP,
......@@ -257,17 +258,6 @@ rlc_am_set_debug_infos(
const rb_id_t rb_idP)
//-----------------------------------------------------------------------------
{
LOG_D(RLC, "[FRAME %5u][%s][RLC_AM][MOD %u/%u][RB %u][SET DEBUG INFOS] module_id %d rb_id %d is SRB %d\n",
ctxt_pP->frame,
(ctxt_pP->enb_flag) ? "eNB" : "UE",
ctxt_pP->enb_module_id,
ctxt_pP->ue_module_id,
rb_idP,
ctxt_pP->enb_module_id,
ctxt_pP->ue_module_id,
rb_idP,
(srb_flagP) ? "TRUE" : "FALSE");
rlc_pP->rb_id = rb_idP;
if (srb_flagP) {
......@@ -275,4 +265,8 @@ rlc_am_set_debug_infos(
} else {
rlc_pP->is_data_plane = 1;
}
LOG_D(RLC, PROTOCOL_CTXT_FMT RB_AM_FMT "[SET DEBUG INFOS]\n",
PROTOCOL_CTXT_ARGS(ctxt_pP),
RB_AM_ARGS(rlc_pP));
}
......@@ -85,12 +85,11 @@ typedef volatile struct {
*/
public_rlc_am_init( void rlc_am_init (const protocol_ctxt_t* const ctxtP, rlc_am_entity_t* rlc_pP);)
/*! \fn void rlc_am_cleanup(const protocol_ctxt_t* const ctxtP, rlc_am_entity_t *const rlc_pP)
/*! \fn void rlc_am_cleanup(rlc_am_entity_t *const rlc_pP)
* \brief Free all memory resources allocated and kept by this RLC AM instance.
* \param[in] ctxtP Running context.
* \param[in] rlc_pP RLC AM protocol instance pointer.
*/
public_rlc_am_init( void rlc_am_cleanup(const protocol_ctxt_t* const ctxtP, rlc_am_entity_t* rlc_pP);)
public_rlc_am_init( void rlc_am_cleanup(rlc_am_entity_t* rlc_pP);)
/*! \fn void rlc_am_configure(const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pP, uint16_t max_retx_thresholdP, uint16_t poll_pduP, uint16_t poll_byteP, uint32_t t_poll_retransmitP, uint32_t t_reorderingP, uint32_t t_status_prohibitP)
* \brief Set RLC AM protocol parameters.
......
......@@ -122,7 +122,6 @@ rlc_tm_reset_state_variables (
//-----------------------------------------------------------------------------
void
rlc_tm_cleanup (
const protocol_ctxt_t* const ctxt_pP,
rlc_tm_entity_t * const rlcP
)
{
......
......@@ -104,12 +104,11 @@ protected_rlc_tm_init(void rlc_tm_reset_state_variables (
const protocol_ctxt_t* const ctxt_pP,
rlc_tm_entity_t * const rlcP);)
/*! \fn void rlc_tm_cleanup(const protocol_ctxt_t* const ctxt_pP,rlc_tm_entity_t * const rlcP)
/*! \fn void rlc_tm_cleanup(rlc_tm_entity_t * const rlcP)
* \brief Free all allocated memory (lists and buffers) previously allocated by this RLC TM instance.
* \param[in] rlcP RLC TM protocol instance pointer.
*/
public_rlc_tm_init( void rlc_tm_cleanup(
const protocol_ctxt_t* const ctxt_pP,
rlc_tm_entity_t * const rlcP);)
/*! \fn void rlc_tm_configure(const protocol_ctxt_t* const ctxt_pP,rlc_tm_entity_t * const rlcP, const boolean_t is_uplink_downlinkP)
......
......@@ -286,7 +286,6 @@ rlc_um_reset_state_variables (
//-----------------------------------------------------------------------------
void
rlc_um_cleanup (
const protocol_ctxt_t* const ctxt_pP,
rlc_um_entity_t * const rlc_pP)
{
//-----------------------------------------------------------------------------
......
......@@ -138,13 +138,11 @@ protected_rlc_um_control_primitives(void rlc_um_reset_state_variables (
const protocol_ctxt_t* const ctxt_pP,
rlc_um_entity_t * const rlc_pP);)
/*! \fn void rlc_um_cleanup(const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP)
/*! \fn void rlc_um_cleanup(rlc_um_entity_t * const rlc_pP)
* \brief Free all allocated memory (lists and buffers) previously allocated by this RLC UM instance.
* \param[in] ctxtP Running context.
* \param[in] rlc_pP RLC UM protocol instance pointer.
*/
public_rlc_um_control_primitives( void rlc_um_cleanup(
const protocol_ctxt_t* const ctxt_pP,
rlc_um_entity_t * const rlc_pP);)
/*! \fn void rlc_um_configure(
......
......@@ -335,11 +335,10 @@ public_rlc_rrc( rlc_op_status_t rrc_rlc_config_asn1_req (
/*! \fn void rb_free_rlc_union (void *rlcu_pP)
* \brief Free the rlc memory contained in the RLC embedded in the rlc_union_t
* struct pointed by of the rlcu_pP parameter. Free the rlc_union_t struct also.
* \param[in] ctxtP Running context.
* \param[in] rlcu_pP Pointer on the rlc_union_t struct.
*/
public_rlc_rrc(void
rb_free_rlc_union (const protocol_ctxt_t* const ctxt_pP, void *rlcu_pP);)
rb_free_rlc_union (void *rlcu_pP);)
/*! \fn rlc_op_status_t rrc_rlc_remove_ue (const protocol_ctxt_t* const ctxtP)
......
......@@ -407,22 +407,22 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP
//-----------------------------------------------------------------------------
void
rb_free_rlc_union (
const protocol_ctxt_t* const ctxt_pP,
void *rlcu_pP)
{
//-----------------------------------------------------------------------------
rlc_union_t * rlcu_p;
if (rlcu_pP) {
rlcu_p = (rlc_union_t *)(rlcu_pP);
LOG_D(RLC,"%s %p \n",__FUNCTION__,rlcu_pP);
switch (rlcu_p->mode) {
case RLC_MODE_AM:
rlc_am_cleanup(ctxt_pP, &rlcu_p->rlc.am);
rlc_am_cleanup(&rlcu_p->rlc.am);
break;
case RLC_MODE_UM:
rlc_um_cleanup(ctxt_pP, &rlcu_p->rlc.um);
rlc_um_cleanup(&rlcu_p->rlc.um);
break;
case RLC_MODE_TM:
rlc_tm_cleanup(ctxt_pP, &rlcu_p->rlc.tm);
rlc_tm_cleanup(&rlcu_p->rlc.tm);
break;
default:
LOG_W(RLC,
......@@ -431,11 +431,6 @@ rb_free_rlc_union (
rlcu_pP);
break;
}
LOG_D(RLC,
"%s %p \n",
__FUNCTION__,
rlcu_pP);
free(rlcu_p);
}
}
......@@ -529,7 +524,7 @@ rlc_op_status_t rrc_rlc_remove_rlc (
h_rc = hashtable_get(rlc_coll_p, key, &rlc_union_p);
if (h_rc == HASH_TABLE_OK) {
switch (rlc_union_p->mode) {
/*switch (rlc_union_p->mode) {
case RLC_MODE_AM:
rlc_am_cleanup(ctxt_pP, &rlc_union_p->rlc.am);
break;
......@@ -542,6 +537,8 @@ rlc_op_status_t rrc_rlc_remove_rlc (
default:
break;
}
cleanup is done in free() callback function configured in hashtable
*/
h_rc = hashtable_remove(rlc_coll_p, key);
LOG_D(RLC, "[Frame %05u][%s][RLC_RRC][INST %u/%u][%s %u] RELEASED %s\n",
ctxt_pP->frame,
......
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