[telepathy-gabble/master] Ensure that InitialAudio and/or InitialVideo is set.
Mike Ruprecht
mike.ruprecht at collabora.co.uk
Mon Jan 18 18:17:57 PST 2010
---
src/media-factory.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/media-factory.c b/src/media-factory.c
index fe559cb..a4f265f 100644
--- a/src/media-factory.c
+++ b/src/media-factory.c
@@ -835,8 +835,15 @@ gabble_media_factory_create_call (TpChannelManager *manager,
initial_video = tp_asv_get_boolean (request_properties,
GABBLE_IFACE_CHANNEL_TYPE_CALL ".InitialVideo", NULL);
- /* FIXME need to check if there is at least one of InitialAudio/InitialVideo
- * FIXME creating the channel should check and wait for the capabilities
+ if (!initial_audio && !initial_video)
+ {
+ g_set_error (&error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ "Call channel must contain at least "
+ "one InitialAudio or InitialVideo");
+ goto error;
+ }
+
+ /* FIXME creating the channel should check and wait for the capabilities
* FIXME need to cope with disconnecting while channels are setting up
*/
--
1.5.6.5
More information about the telepathy-commits
mailing list