[farsight2/master] Ignore new-candidate signals before the candidates-gathering-done arrives

Olivier Crête olivier.crete at collabora.co.uk
Tue Dec 23 15:26:17 PST 2008


---
 transmitters/nice/fs-nice-stream-transmitter.c |   13 +++++++++++++
 transmitters/nice/fs-nice-transmitter.c        |   11 +++++------
 2 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/transmitters/nice/fs-nice-stream-transmitter.c b/transmitters/nice/fs-nice-stream-transmitter.c
index e6574ac..4b17f98 100644
--- a/transmitters/nice/fs-nice-stream-transmitter.c
+++ b/transmitters/nice/fs-nice-stream-transmitter.c
@@ -875,6 +875,19 @@ fs_nice_stream_transmitter_new_candidate (FsNiceStreamTransmitter *self,
   FsCandidate *fscandidate = NULL;
   GSList *candidates, *item;
 
+  /* Ignore this signal completely
+   * it seems broken
+   */
+  return;
+
+  FS_NICE_STREAM_TRANSMITTER_LOCK (self);
+  if (!self->priv->gathered)
+  {
+    FS_NICE_STREAM_TRANSMITTER_UNLOCK (self);
+    return;
+  }
+  FS_NICE_STREAM_TRANSMITTER_UNLOCK (self);
+
   candidates = nice_agent_get_local_candidates (
       self->priv->transmitter->agent,
       self->priv->stream_id, component_id);
diff --git a/transmitters/nice/fs-nice-transmitter.c b/transmitters/nice/fs-nice-transmitter.c
index e1332c9..cf24a4a 100644
--- a/transmitters/nice/fs-nice-transmitter.c
+++ b/transmitters/nice/fs-nice-transmitter.c
@@ -531,7 +531,7 @@ agent_component_state_changed (NiceAgent *agent, guint stream_id,
   if (!st)
   {
     fs_transmitter_emit_error (FS_TRANSMITTER (self), FS_ERROR_INTERNAL,
-        "Receiving signal with invalid stream id", NULL);
+        "Receiving component-changed signal with invalid stream id", NULL);
     return;
   }
 
@@ -563,7 +563,7 @@ agent_new_selected_pair (NiceAgent *agent, guint stream_id,
   if (!st)
   {
     fs_transmitter_emit_error (FS_TRANSMITTER (self), FS_ERROR_INTERNAL,
-        "Receiving signal with invalid stream id", NULL);
+        "Receiving new-selected-pair signal with invalid stream id", NULL);
     return;
   }
 
@@ -581,12 +581,11 @@ agent_new_candidate (NiceAgent *agent, guint stream_id,
   FsNiceTransmitter *self = FS_NICE_TRANSMITTER (user_data);
   FsNiceStreamTransmitter *st = get_stream_transmitter (self, stream_id);
 
+  /* We can't emit an error here because it starts emitting this signal
+   * as soon as its created... SUCKY API
+   */
   if (!st)
-  {
-    fs_transmitter_emit_error (FS_TRANSMITTER (self), FS_ERROR_INTERNAL,
-        "Receiving signal with invalid stream id", NULL);
     return;
-  }
 
   fs_nice_stream_transmitter_new_candidate (st, component_id, foundation);
 
-- 
1.5.6.5




More information about the farsight-commits mailing list