summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert McQueen <robert.mcqueen@collabora.co.uk>2006-10-13 11:56:50 +0000
committerRobert McQueen <robert.mcqueen@collabora.co.uk>2006-10-13 11:56:50 +0000
commit8d4b99a108f2e0c10956ac0a876f5d6480e3f56f (patch)
tree2c852a08fd574a4c5dbd6c744645ae5b1f28f190
parente13a5b84394225a961a7e49f5272fdb569dce7db (diff)
GabbleMediaSession: remove the stream if you request NONE direction
-rw-r--r--src/gabble-media-session.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/gabble-media-session.c b/src/gabble-media-session.c
index 8f2c9e65a..cd9935d0d 100644
--- a/src/gabble-media-session.c
+++ b/src/gabble-media-session.c
@@ -2472,9 +2472,16 @@ _gabble_media_session_request_stream_direction (GabbleMediaSession *session,
if (requested_dir == TP_MEDIA_STREAM_DIRECTION_NONE)
{
- *error = g_error_new (TELEPATHY_ERRORS, NotAvailable, "jingle calls "
- "cannot have no senders");
- return FALSE;
+ GPtrArray *streams;
+
+ GMS_DEBUG_INFO (session, "request for NONE direction; removing stream");
+
+ streams = g_ptr_array_sized_new (1);
+ g_ptr_array_add (streams, stream);
+ _gabble_media_session_remove_streams (session, streams);
+ g_ptr_array_free (streams, TRUE);
+
+ return TRUE;
}
/* if we're awaiting a local decision on sending... */