summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2011-01-31 19:47:41 (GMT)
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>2011-01-31 19:48:23 (GMT)
commit30c4f27a263e2c4763b09b86cb231f912818f5c8 (patch)
tree29613419756a3aea0ad36f23162863ef65c3e436
parent5cc9cddfb6a095c400d23ef4a44e918adc9dd390 (diff)
downloadlibnice-30c4f27a263e2c4763b09b86cb231f912818f5c8.tar.gz
libnice-30c4f27a263e2c4763b09b86cb231f912818f5c8.tar.xz
Only restart the timer onceHEADmaster
-rw-r--r--agent/conncheck.c10
-rw-r--r--agent/conncheck.h1
2 files changed, 8 insertions, 3 deletions
diff --git a/agent/conncheck.c b/agent/conncheck.c
index db03c51..eea1009 100644
--- a/agent/conncheck.c
+++ b/agent/conncheck.c
@@ -1763,9 +1763,13 @@ static gboolean priv_schedule_triggered_check (NiceAgent *agent, Stream *stream,
* we'll resend the exiting transactions faster if needed...? :P
*/
nice_debug ("Agent %p : check already in progress, "
- "restarting the timer..", agent);
- stun_timer_start (&p->timer, STUN_TIMER_DEFAULT_TIMEOUT,
- STUN_TIMER_DEFAULT_MAX_RETRANSMISSIONS);
+ "restarting the timer again?: %s ..", agent,
+ p->timer_restarted ? "no" : "yes");
+ if (!p->timer_restarted) {
+ stun_timer_start (&p->timer, STUN_TIMER_DEFAULT_TIMEOUT,
+ STUN_TIMER_DEFAULT_MAX_RETRANSMISSIONS);
+ p->timer_restarted = TRUE;
+ }
}
else if (p->state == NICE_CHECK_SUCCEEDED ||
p->state == NICE_CHECK_DISCOVERED) {
diff --git a/agent/conncheck.h b/agent/conncheck.h
index e8f7d53..4745a9d 100644
--- a/agent/conncheck.h
+++ b/agent/conncheck.h
@@ -73,6 +73,7 @@ struct _CandidateCheckPair
NiceCheckState state;
gboolean nominated;
gboolean controlling;
+ gboolean timer_restarted;
guint64 priority;
GTimeVal next_tick; /* next tick timestamp */
StunTimer timer;