Commit 2ba23c1f authored by Fabrice Bellet's avatar Fabrice Bellet Committed by Olivier Crête

conncheck: fix tick counter used for debug stats

The tick counter variable used to display pairs statistics should be
per stream defined, to avoid side effects of a global variable, for
example always having an odd or even tick counter value when the agent
contains just two streams.

Differential Revision: https://phabricator.freedesktop.org/D1113
parent 382f3ece
......@@ -517,15 +517,12 @@ static gboolean priv_conn_check_tick_stream (NiceStream *stream, NiceAgent *agen
}
}
}
{
static int tick_counter = 0;
if (tick_counter++ % 50 == 0 || keep_timer_going != TRUE)
nice_debug ("Agent %p : stream %u: timer tick #%u: %u frozen, %u in-progress, "
"%u waiting, %u succeeded, %u discovered, %u nominated, "
"%u waiting-for-nom, %u valid.", agent, stream->id,
tick_counter, frozen, s_inprogress, waiting, s_succeeded,
s_discovered, s_nominated, s_waiting_for_nomination, s_valid);
}
if (stream->tick_counter++ % 50 == 0)
nice_debug ("Agent %p : stream %u: timer tick #%u: %u frozen, %u in-progress, "
"%u waiting, %u succeeded, %u discovered, %u nominated, "
"%u waiting-for-nom, %u valid.", agent, stream->id,
stream->tick_counter, frozen, s_inprogress, waiting, s_succeeded,
s_discovered, s_nominated, s_waiting_for_nomination, s_valid);
return keep_timer_going;
......
......@@ -88,6 +88,7 @@ struct _NiceStream {
gboolean gathering;
gboolean gathering_started;
gint tos;
guint tick_counter;
};
typedef struct {
......
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