Commit 53455086 authored by Youness Alaoui's avatar Youness Alaoui

Fix bug where a discovered peer-reflexive pair does not get nominated

parent 9be637ae
...@@ -244,7 +244,8 @@ static void priv_conn_check_unfreeze_related (NiceAgent *agent, Stream *stream, ...@@ -244,7 +244,8 @@ static void priv_conn_check_unfreeze_related (NiceAgent *agent, Stream *stream,
static gboolean priv_conn_check_tick_stream (Stream *stream, NiceAgent *agent, GTimeVal *now) static gboolean priv_conn_check_tick_stream (Stream *stream, NiceAgent *agent, GTimeVal *now)
{ {
gboolean keep_timer_going = FALSE; gboolean keep_timer_going = FALSE;
guint s_inprogress = 0, s_succeeded = 0, s_nominated = 0, s_waiting_for_nomination = 0; guint s_inprogress = 0, s_succeeded = 0, s_discovered = 0,
s_nominated = 0, s_waiting_for_nomination = 0;
guint frozen = 0, waiting = 0; guint frozen = 0, waiting = 0;
GSList *i, *k; GSList *i, *k;
...@@ -308,10 +309,14 @@ static gboolean priv_conn_check_tick_stream (Stream *stream, NiceAgent *agent, G ...@@ -308,10 +309,14 @@ static gboolean priv_conn_check_tick_stream (Stream *stream, NiceAgent *agent, G
++waiting; ++waiting;
else if (p->state == NICE_CHECK_SUCCEEDED) else if (p->state == NICE_CHECK_SUCCEEDED)
++s_succeeded; ++s_succeeded;
else if (p->state == NICE_CHECK_DISCOVERED)
++s_discovered;
if (p->state == NICE_CHECK_SUCCEEDED && p->nominated) if ((p->state == NICE_CHECK_SUCCEEDED || p->state == NICE_CHECK_DISCOVERED)
&& p->nominated)
++s_nominated; ++s_nominated;
else if (p->state == NICE_CHECK_SUCCEEDED && !p->nominated) else if ((p->state == NICE_CHECK_SUCCEEDED ||
p->state == NICE_CHECK_DISCOVERED) && !p->nominated)
++s_waiting_for_nomination; ++s_waiting_for_nomination;
} }
...@@ -344,8 +349,11 @@ static gboolean priv_conn_check_tick_stream (Stream *stream, NiceAgent *agent, G ...@@ -344,8 +349,11 @@ static gboolean priv_conn_check_tick_stream (Stream *stream, NiceAgent *agent, G
{ {
static int tick_counter = 0; static int tick_counter = 0;
if (tick_counter++ % 50 == 0 || keep_timer_going != TRUE) if (tick_counter++ % 50 == 0 || keep_timer_going != TRUE)
nice_debug ("Agent %p : timer(%p) tick #%u: %u frozen, %u in-progress, %u waiting, %u succeeded, %u nominated, %u waiting-for-nom.", agent, nice_debug ("Agent %p : timer tick #%u: %u frozen, %u in-progress, "
agent, tick_counter, frozen, s_inprogress, waiting, s_succeeded, s_nominated, s_waiting_for_nomination); "%u waiting, %u succeeded, %u discovered, %u nominated, "
"%u waiting-for-nom.", agent,
tick_counter, frozen, s_inprogress, waiting, s_succeeded,
s_discovered, s_nominated, s_waiting_for_nomination);
} }
return keep_timer_going; return keep_timer_going;
......
/* /*
* interfaces.c - Source for interface discovery code * interfaces.c - Source for interface discovery code
* *
* Farsight Helper functions
* Copyright (C) 2006 Youness Alaoui <kakaroto@kakaroto.homelinux.net> * Copyright (C) 2006 Youness Alaoui <kakaroto@kakaroto.homelinux.net>
* Copyright (C) 2007 Collabora, Nokia * Copyright (C) 2007 Collabora, Nokia
* Copyright (C) 2008 Haakon Sporsheim <haakon.sporsheim@tandberg.com> * Copyright (C) 2008 Haakon Sporsheim <haakon.sporsheim@tandberg.com>
......
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