[telepathy-gabble/master] Parse audio *and* video for accepted Google calls

Will Thompson will.thompson at collabora.co.uk
Wed Sep 2 04:36:00 PDT 2009


---
 src/jingle-session.c |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/src/jingle-session.c b/src/jingle-session.c
index 54959fc..adeee06 100644
--- a/src/jingle-session.c
+++ b/src/jingle-session.c
@@ -1041,12 +1041,21 @@ on_session_accept (GabbleJingleSession *sess, LmMessageNode *node,
 
   DEBUG ("called");
 
-  /* handle single-content special case */
   if ((priv->dialect == JINGLE_DIALECT_GTALK3) ||
       (priv->dialect == JINGLE_DIALECT_GTALK4))
     {
-      GabbleJingleContent *c = _get_any_content (sess);
-      _each_content_accept (sess, c, node, error);
+      /* Google Talk calls don't have contents per se; they just have
+       * <payload-type>s in different namespaces for audio and video, in the
+       * same <description> stanza. So we need to feed the whole stanza to each
+       * content in turn.
+       */
+      GList *cs = gabble_jingle_session_get_contents (sess);
+      GList *l;
+
+      for (l = cs; l != NULL; l = l->next)
+        _each_content_accept (sess, l->data, node, error);
+
+      g_list_free (cs);
     }
   else
     {
-- 
1.5.6.5




More information about the telepathy-commits mailing list