[Nice] [nice/master] 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...

Youness Alaoui youness.alaoui at collabora.co.uk
Wed Nov 12 17:49:48 PST 2008


---
 agent/conncheck.c |   10 ++--------
 agent/conncheck.h |    1 -
 2 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/agent/conncheck.c b/agent/conncheck.c
index 16f0c4d..046d5a3 100644
--- a/agent/conncheck.c
+++ b/agent/conncheck.c
@@ -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,11 +498,8 @@ 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;
+        nice_debug ("Agent %p : resending STUN-CC to keep the candidate alive (pair %p).", agent, p);
+        conn_check_send (agent, p);
       }
     }
   }
@@ -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;
diff --git a/agent/conncheck.h b/agent/conncheck.h
index 47dc9fb..b5adc68 100644
--- a/agent/conncheck.h
+++ b/agent/conncheck.h
@@ -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;
-- 
1.5.6.5




More information about the Nice mailing list