[telepathy-gabble/telepathy-gabble-0.8] For gtalk jingle dialect always use google p2p
Sjoerd Simons
sjoerd.simons at collabora.co.uk
Sat Sep 12 13:52:49 PDT 2009
---
src/media-channel.c | 15 ++++++---------
1 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/src/media-channel.c b/src/media-channel.c
index 7e9d6db..b8899f9 100644
--- a/src/media-channel.c
+++ b/src/media-channel.c
@@ -1477,7 +1477,12 @@ CHOOSE_TRANSPORT:
/* We prefer gtalk-p2p to ice, because it can use tcp and https relays (if
* available). */
- if (gabble_presence_resource_has_caps (presence, resource,
+ if (*dialect == JINGLE_DIALECT_GTALK4 || *dialect == JINGLE_DIALECT_GTALK3)
+ {
+ /* the GTalk dialects only support google p2p as transport protocol. */
+ *transport_ns = NS_GOOGLE_TRANSPORT_P2P;
+ }
+ else if (gabble_presence_resource_has_caps (presence, resource,
PRESENCE_CAP_GOOGLE_TRANSPORT_P2P))
{
*transport_ns = NS_GOOGLE_TRANSPORT_P2P;
@@ -1492,14 +1497,6 @@ CHOOSE_TRANSPORT:
{
*transport_ns = NS_JINGLE_TRANSPORT_RAWUDP;
}
- else if (*dialect == JINGLE_DIALECT_GTALK4
- || *dialect == JINGLE_DIALECT_GTALK3)
- {
- /* (Some) GTalk clients don't advertise gtalk-p2p, though
- * they support it. If we know it's GTalk and there's no
- * transport, we can assume it also. */
- *transport_ns = NS_GOOGLE_TRANSPORT_P2P;
- }
if (*transport_ns == NULL)
return NULL;
--
1.5.6.5
More information about the telepathy-commits
mailing list