[Telepathy-commits] [telepathy-gabble/master] avoid duplicating the required PRESENCE_CAP_* for a person to be callable

Robert McQueen robert.mcqueen at collabora.co.uk
Tue Aug 19 10:52:10 PDT 2008


by calling _gabble_media_channel_caps_to_typeflags instead (this just applies
to the trivial checking in AddMembers, only relevant when using the
pre-0.17.2 spec method of adding the member before requesting streams is being
used)

20080506121652-418b8-5d31be253bb22c2a846e33359648ac6aa4bde433.gz
---
 src/gabble-media-channel.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/gabble-media-channel.c b/src/gabble-media-channel.c
index 69057e1..6915328 100644
--- a/src/gabble-media-channel.c
+++ b/src/gabble-media-channel.c
@@ -261,9 +261,9 @@ create_session (GabbleMediaChannel *channel,
           goto NO_CAPS;
         }
 
-      if (!(presence->caps & PRESENCE_CAP_GOOGLE_VOICE ||
-            presence->caps & PRESENCE_CAP_JINGLE_DESCRIPTION_AUDIO ||
-            presence->caps & PRESENCE_CAP_JINGLE_DESCRIPTION_VIDEO))
+      if ((_gabble_media_channel_caps_to_typeflags (presence->caps) &
+            (TP_CHANNEL_MEDIA_CAPABILITY_AUDIO |
+             TP_CHANNEL_MEDIA_CAPABILITY_VIDEO)) == 0)
         {
           DEBUG ("failed to add contact %d (%s) to media channel: "
               "caps %x aren't sufficient", peer,
@@ -272,7 +272,6 @@ create_session (GabbleMediaChannel *channel,
           goto NO_CAPS;
         }
 
-
       sid = _gabble_media_factory_allocate_sid (priv->factory, channel);
     }
   else
-- 
1.5.6.3




More information about the Telepathy-commits mailing list