summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert McQueen <robert.mcqueen@collabora.co.uk>2006-12-08 17:10:54 +0000
committerRobert McQueen <robert.mcqueen@collabora.co.uk>2006-12-08 17:10:54 +0000
commitdf21d001814b7c8d5a9367fbfad2d443273a7e56 (patch)
treeae5a7c6f4e3b5dda0b38f36780bc2759e04249c1
parent0e481dc100cdd32ad72f8987b127a09e82b9a8f5 (diff)
GabbleMediaStream: rather than letting Telepathy clients assert gabble by sending in multiple-transport candidates (a non-event in Google P2P connections), return an errortelepathy-gabble_0.5.0
-rw-r--r--src/gabble-media-stream.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gabble-media-stream.c b/src/gabble-media-stream.c
index 7698dfcb9..bf3523273 100644
--- a/src/gabble-media-stream.c
+++ b/src/gabble-media-stream.c
@@ -38,6 +38,7 @@
#include "telepathy-helpers.h"
#include "telepathy-constants.h"
+#include "telepathy-errors.h"
#include "gabble-media-stream.h"
#include "gabble-media-stream-signals-marshal.h"
@@ -814,6 +815,16 @@ gabble_media_stream_new_native_candidate (GabbleMediaStream *self,
1, transports,
G_MAXUINT);
+ if (transports->len != 1)
+ {
+ GMS_DEBUG_WARNING (priv->session, "%s: number of transports was not 1; "
+ "rejecting", G_STRFUNC);
+ g_set_error (error, TELEPATHY_ERRORS, NotImplemented, "google p2p "
+ "connections only support the concept of one transport per "
+ "candidate");
+ return FALSE;
+ }
+
transport = g_ptr_array_index (transports, 0);
addr = g_value_get_string (g_value_array_get_nth (transport, 1));
if (!strcmp (addr, "127.0.0.1"))