summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Lundblad <ml@update.uu.se>2012-05-18 13:29:12 +0200
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>2012-06-02 13:23:18 +0200
commit287fb2d9fabd2703c17020c4fd9493e8531c0a03 (patch)
tree148ad19e28d132f4f99c33d7bb54b6097bc2d0e3
parentbced2f61312ab407964ac3ef0653183eb3b8c6cc (diff)
Fix for initiating a video call from an Android tablet.
Reviewed-by: Sjoerd Simons <sjoerd@greynoise.nl> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=36998
-rw-r--r--gabble/capabilities.h2
-rw-r--r--src/jingle-media-rtp.c4
-rw-r--r--src/presence-cache.c12
3 files changed, 17 insertions, 1 deletions
diff --git a/gabble/capabilities.h b/gabble/capabilities.h
index 2e3175529..81c8c2546 100644
--- a/gabble/capabilities.h
+++ b/gabble/capabilities.h
@@ -33,6 +33,8 @@
#define QUIRK_OMITS_CONTENT_CREATORS "\x07omits-content-creators"
/* The Google Webmail client doesn't support some features */
#define QUIRK_GOOGLE_WEBMAIL_CLIENT "\x07google-webmail-client"
+/* The Android GTalk client needs a quirk for component names */
+#define QUIRK_ANDROID_GTALK_CLIENT "\x07android-gtalk-client"
/* Some useful capability sets for Jingle etc. */
const GabbleCapabilitySet *gabble_capabilities_get_legacy (void);
diff --git a/src/jingle-media-rtp.c b/src/jingle-media-rtp.c
index 9a120078c..45a14191a 100644
--- a/src/jingle-media-rtp.c
+++ b/src/jingle-media-rtp.c
@@ -337,7 +337,9 @@ static void transport_created (GabbleJingleContent *content,
if (priv->media_type == JINGLE_MEDIA_TYPE_VIDEO &&
(JINGLE_IS_GOOGLE_DIALECT (dialect) ||
gabble_jingle_session_peer_has_cap (content->session,
- QUIRK_GOOGLE_WEBMAIL_CLIENT)))
+ QUIRK_GOOGLE_WEBMAIL_CLIENT) ||
+ gabble_jingle_session_peer_has_cap (content->session,
+ QUIRK_ANDROID_GTALK_CLIENT)))
{
jingle_transport_google_set_component_name (gtrans, "video_rtp", 1);
jingle_transport_google_set_component_name (gtrans, "video_rtcp", 2);
diff --git a/src/presence-cache.c b/src/presence-cache.c
index b5a0dab8d..31a301215 100644
--- a/src/presence-cache.c
+++ b/src/presence-cache.c
@@ -1042,6 +1042,18 @@ _parse_node (GabblePresence *presence,
gabble_presence_set_capabilities (presence, resource, cap_set, NULL, serial);
gabble_capability_set_free (cap_set);
}
+
+ if (!tp_strdiff (node, "http://www.android.com/gtalk/client/caps") ||
+ !tp_strdiff (node, "http://www.android.com/gtalk/client/caps2"))
+ {
+ GabbleCapabilitySet *cap_set = gabble_capability_set_new ();
+
+ DEBUG ("Client is Android GTalk Client");
+
+ gabble_capability_set_add (cap_set, QUIRK_ANDROID_GTALK_CLIENT);
+ gabble_presence_set_capabilities (presence, resource, cap_set, NULL, serial);
+ gabble_capability_set_free (cap_set);
+ }
}