Commit f02b5392 authored by Robert Schmidt's avatar Robert Schmidt

Correct init_cont_stats_update(), test for result

parent 2cf40606
...@@ -235,8 +235,11 @@ int flexran_agent_start(mid_t mod_id) ...@@ -235,8 +235,11 @@ int flexran_agent_start(mid_t mod_id)
*/ */
/*Initialize the continuous stats update mechanism*/ /*Initialize the continuous stats update mechanism*/
flexran_agent_init_cont_stats_update(mod_id); if (flexran_agent_init_cont_stats_update(mod_id) < 0) {
LOG_E(FLEXRAN_AGENT, "could not initialize continuous stats updates\n");
goto error;
}
new_thread(receive_thread, flexran); new_thread(receive_thread, flexran);
/* Register and initialize the control modules depending on capabilities. /* Register and initialize the control modules depending on capabilities.
......
...@@ -730,7 +730,7 @@ err_code_t flexran_agent_init_cont_stats_update(mid_t mod_id) { ...@@ -730,7 +730,7 @@ err_code_t flexran_agent_init_cont_stats_update(mid_t mod_id) {
stats_context[mod_id].mutex = calloc(1, sizeof(pthread_mutex_t)); stats_context[mod_id].mutex = calloc(1, sizeof(pthread_mutex_t));
if (stats_context[mod_id].mutex == NULL) if (stats_context[mod_id].mutex == NULL)
goto error; goto error;
if (pthread_mutex_init(stats_context[mod_id].mutex, NULL)) if (pthread_mutex_init(stats_context[mod_id].mutex, NULL) != 0)
goto error; goto error;
return 0; return 0;
......
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