Commit f02b5392 authored by Robert Schmidt's avatar Robert Schmidt

Correct init_cont_stats_update(), test for result

parent 2cf40606
......@@ -235,7 +235,10 @@ int flexran_agent_start(mid_t mod_id)
*/
/*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);
......
......@@ -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));
if (stats_context[mod_id].mutex == NULL)
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;
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