From d93d73fe9b38e880cc76bd6b9040b679aa89ca4a Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 23 Apr 2018 15:55:10 +0200 Subject: [PATCH] FlexRAN: Send the Slice Configuration in enb_config_reply --- openair2/ENB_APP/flexran_agent_common.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/openair2/ENB_APP/flexran_agent_common.c b/openair2/ENB_APP/flexran_agent_common.c index db1943c945..37deec5d49 100644 --- a/openair2/ENB_APP/flexran_agent_common.c +++ b/openair2/ENB_APP/flexran_agent_common.c @@ -37,6 +37,7 @@ #include "flexran_agent_ran_api.h" //#include "PHY/extern.h" #include "common/utils/LOG/log.h" +#include "flexran_agent_mac_internal.h" //#include "SCHED/defs.h" #include "RRC/LTE/rrc_extern.h" @@ -290,6 +291,8 @@ int flexran_agent_destroy_enb_config_reply(Protocol__FlexranMessage *msg) { free(reply->cell_config[i]); } free(reply->cell_config); + /* don't free the slice_config, it is maintained internally during + * the liftetime of the agent */ free(reply); free(msg); @@ -1030,6 +1033,10 @@ int flexran_agent_enb_config_reply(mid_t mod_id, const void *params, Protocol__F cell_conf[i]->carrier_index = i; cell_conf[i]->has_carrier_index = 1; + + /* get a pointer to the config which is maintained in the agent throughout + * its lifetime */ + cell_conf[i]->slice_config = flexran_agent_get_slice_config(mod_id); } enb_config_reply_msg->cell_config=cell_conf; }