diff --git a/openair2/ENB_APP/flexran_agent_common.h b/openair2/ENB_APP/flexran_agent_common.h index 29dd6fe61dda518db48b42e70a62e707a9b2123f..76f9e3ce5c86d4b04f967c92c95f816bbf5fcb40 100644 --- a/openair2/ENB_APP/flexran_agent_common.h +++ b/openair2/ENB_APP/flexran_agent_common.h @@ -155,6 +155,7 @@ int flexran_agent_handle_stats(mid_t mod_id, const void *params, Protocol__Flexr /* Function to be used to handle reply message . */ int flexran_agent_stats_reply(mid_t enb_id, xid_t xid, const report_config_t *report_config, Protocol__FlexranMessage **msg); +int flexran_agent_destroy_stats_reply(Protocol__FlexranMessage *msg); /* Top level Statistics request protocol message constructor and destructor */ int flexran_agent_stats_request(mid_t mod_id, xid_t xid, const stats_request_config_t *report_config, Protocol__FlexranMessage **msg); diff --git a/openair2/ENB_APP/flexran_agent_handler.c b/openair2/ENB_APP/flexran_agent_handler.c index bdcd7bff7b3f229ed2f8c35ab7fbf7b2add43508..40c09ddef9465790a6675501662caeb90eb06a92 100644 --- a/openair2/ENB_APP/flexran_agent_handler.c +++ b/openair2/ENB_APP/flexran_agent_handler.c @@ -63,7 +63,7 @@ flexran_agent_message_destruction_callback message_destruction_callback[] = { flexran_agent_destroy_echo_request, flexran_agent_destroy_echo_reply, flexran_agent_destroy_stats_request, - flexran_agent_mac_destroy_stats_reply, + flexran_agent_destroy_stats_reply, flexran_agent_mac_destroy_sf_trigger, flexran_agent_mac_destroy_sr_info, flexran_agent_destroy_enb_config_request, @@ -648,6 +648,26 @@ int flexran_agent_destroy_stats_request(Protocol__FlexranMessage *msg) { return -1; } +int flexran_agent_destroy_stats_reply(Protocol__FlexranMessage *msg) +{ + if (msg->msg_case != PROTOCOL__FLEXRAN_MESSAGE__MSG_STATS_REPLY_MSG) { + LOG_E(FLEXRAN_AGENT, "%s(): message is not a msg_stats_reply\n", __func__); + return -1; + } + + flexran_agent_mac_destroy_stats_reply((Protocol__FlexranMessage *)msg->stats_reply_msg); + // TODO implement rrc_destroy_stats_reply() + //flexran_agent_rrc_destroy_stats_reply(msg->stats_reply_msg); + // TODO implement pdcp_destroy_stats_reply() + //flexran_agent_pdcp_destroy_stats_reply(msg->stats_reply_msg); + free(msg->stats_reply_msg->header); + free(msg->stats_reply_msg->cell_report); + free(msg->stats_reply_msg->ue_report); + free(msg->stats_reply_msg); + free(msg); + return 0; +} + err_code_t flexran_agent_disable_cont_stats_update(mid_t mod_id) { /*Disable the continuous updates for the MAC*/ if (pthread_mutex_lock(stats_context[mod_id].mutex)) {