Commit c8d6d783 authored by Youness Alaoui's avatar Youness Alaoui

remove the traffic_after_tick check because it caused problems with jingle. we...

remove the traffic_after_tick check because it caused problems with jingle. we need a tick every 25 seconds, but with that, the conncheck happens at 0s, and when the keepalive gets called @25s, it gets skipped and we only send our first keepalive after 50seconds... which means that jingle which stops processing if it doesn't receive a ping after 30 seconds, will stop playing our audio from 30 seconds to 50 seconds...
parent 899419b6
......@@ -302,7 +302,6 @@ static gboolean priv_conn_check_tick_stream (Stream *stream, NiceAgent *agent, G
g_time_val_add (&p->next_tick, timeout * 1000);
keep_timer_going = TRUE;
p->traffic_after_tick = TRUE; /* for keepalive timer */
break;
}
default:
......@@ -312,7 +311,6 @@ static gboolean priv_conn_check_tick_stream (Stream *stream, NiceAgent *agent, G
g_time_val_add (&p->next_tick, timeout * 1000);
keep_timer_going = TRUE;
p->traffic_after_tick = TRUE; /* for keepalive timer */
break;
}
}
......@@ -500,12 +498,9 @@ static gboolean priv_conn_keepalive_tick (gpointer pointer)
for (j = stream->conncheck_list; j ; j = j->next) {
CandidateCheckPair *p = j->data;
if (p->traffic_after_tick != TRUE) {
nice_debug ("Agent %p : resending STUN-CC to keep the candidate alive (pair %p).", agent, p);
conn_check_send (agent, p);
}
p->traffic_after_tick = FALSE;
}
}
}
......@@ -1346,7 +1341,6 @@ int conn_check_send (NiceAgent *agent, CandidateCheckPair *pair)
/* note: convert from milli to microseconds for g_time_val_add() */
g_get_current_time (&pair->next_tick);
g_time_val_add (&pair->next_tick, timeout * 1000);
pair->traffic_after_tick = TRUE; /* for keepalive timer */
}
return 0;
......
......@@ -74,7 +74,6 @@ struct _CandidateCheckPair
gboolean controlling;
guint64 priority;
GTimeVal next_tick; /* next tick timestamp */
gboolean traffic_after_tick;
stun_timer_t timer;
uint8_t stun_buffer[STUN_MAX_MESSAGE_SIZE];
StunMessage stun_message;
......
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