Commit 2cf40606 authored by Robert Schmidt's avatar Robert Schmidt

Implement stats_reply-specific destroy function

parent 86d8e214
......@@ -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);
......
......@@ -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)) {
......
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