Commit 0cc1a161 authored by Olivier Crête's avatar Olivier Crête

conncheck: Only print debug message if actually freeing something

parent b572ecc5
...@@ -1435,9 +1435,12 @@ void conn_check_free (NiceAgent *agent) ...@@ -1435,9 +1435,12 @@ void conn_check_free (NiceAgent *agent)
for (i = agent->streams; i; i = i->next) { for (i = agent->streams; i; i = i->next) {
Stream *stream = i->data; Stream *stream = i->data;
nice_debug ("Agent %p, freeing conncheck_list of stream %p", agent, stream); if (stream->conncheck_list) {
g_slist_free_full (stream->conncheck_list, conn_check_free_item); nice_debug ("Agent %p, freeing conncheck_list of stream %p", agent,
stream->conncheck_list = NULL; stream);
g_slist_free_full (stream->conncheck_list, conn_check_free_item);
stream->conncheck_list = NULL;
}
} }
conn_check_stop (agent); conn_check_stop (agent);
...@@ -1454,8 +1457,12 @@ void conn_check_prune_stream (NiceAgent *agent, Stream *stream) ...@@ -1454,8 +1457,12 @@ void conn_check_prune_stream (NiceAgent *agent, Stream *stream)
GSList *i; GSList *i;
gboolean keep_going = FALSE; gboolean keep_going = FALSE;
g_slist_free_full (stream->conncheck_list, conn_check_free_item); if (stream->conncheck_list) {
stream->conncheck_list = NULL; nice_debug ("Agent %p, freeing conncheck_list of stream %p", agent, stream);
g_slist_free_full (stream->conncheck_list, conn_check_free_item);
stream->conncheck_list = NULL;
}
for (i = agent->streams; i; i = i->next) { for (i = agent->streams; i; i = i->next) {
Stream *s = i->data; Stream *s = i->data;
......
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