[farsight2/master] Ignore gathering-done signal if the stream_id doesn't match

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


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

diff --git a/transmitters/nice/fs-nice-stream-transmitter.c b/transmitters/nice/fs-nice-stream-transmitter.c
index d380bd7..f62ce96 100644
--- a/transmitters/nice/fs-nice-stream-transmitter.c
+++ b/transmitters/nice/fs-nice-stream-transmitter.c
@@ -149,7 +149,8 @@ static void agent_state_changed (NiceAgent *agent,
     guint component_id,
     guint state,
     gpointer user_data);
-static void agent_gathering_done (NiceAgent *agent, gpointer user_data);
+static void agent_gathering_done (NiceAgent *agent, guint stream_id,
+    gpointer user_data);
 static void agent_new_selected_pair (NiceAgent *agent,
     guint stream_id,
     guint component_id,
@@ -1288,12 +1289,15 @@ agent_new_candidate (NiceAgent *agent,
 }
 
 static void
-agent_gathering_done (NiceAgent *agent, gpointer user_data)
+agent_gathering_done (NiceAgent *agent, guint stream_id, gpointer user_data)
 {
   FsNiceStreamTransmitter *self = FS_NICE_STREAM_TRANSMITTER (user_data);
   GSList *candidates, *item;
   gint c;
 
+  if (stream_id != self->priv->stream_id)
+    return;
+
   FS_NICE_STREAM_TRANSMITTER_LOCK (self);
   if (self->priv->gathered)
   {
-- 
1.5.6.5




More information about the farsight-commits mailing list