[telepathy-gabble/master] Improve RequestStreams' error in GTalk calls

Will Thompson will.thompson at collabora.co.uk
Mon Jun 22 11:33:09 PDT 2009


Google Talk calls can now have more than one stream; the point is that
they can't change once the call has started. Also, let's not assert that
there's only one stream. :-)
---
 src/media-channel.c |   14 +++-----------
 1 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/src/media-channel.c b/src/media-channel.c
index 44ebbe8..1603476 100644
--- a/src/media-channel.c
+++ b/src/media-channel.c
@@ -1669,21 +1669,13 @@ _gabble_media_channel_request_contents (GabbleMediaChannel *chan,
   /* existing call; the recipient and the mode has already been decided */
   if (priv->session != NULL)
     {
-      g_object_get (priv->session,
-          "dialect", &dialect,
-          "peer-resource", &peer_resource,
-          NULL);
+      peer_resource = gabble_jingle_session_get_peer_resource (priv->session);
 
       /* is a google call... we have no other option */
-      if (JINGLE_IS_GOOGLE_DIALECT (dialect))
+      if (!gabble_jingle_session_can_modify_contents (priv->session))
         {
-          DEBUG ("already in Google mode; can't add new stream");
-
-          g_assert (priv->streams->len == 1);
-
           g_set_error (error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE,
-              "Google Talk calls may only contain one stream");
-
+              "Streams can't be added to ongoing Google Talk calls");
           return FALSE;
         }
 
-- 
1.5.6.5




More information about the telepathy-commits mailing list