[telepathy-sofiasip/master] Disallow using InitialAudio and InitialVideo with old style anon channels

Mikhail Zabaluev mikhail.zabaluev at nokia.com
Fri Jan 8 10:38:33 PST 2010


It made no sense and probably triggered an assertion.
---
 src/media-factory.c |   20 +++++++++-----------
 1 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/src/media-factory.c b/src/media-factory.c
index 5ab4aa7..821cfed 100644
--- a/src/media-factory.c
+++ b/src/media-factory.c
@@ -479,8 +479,6 @@ static const gchar * const named_channel_allowed_properties[] = {
 /* not advertised in foreach_channel_class - can only be requested with
  * RequestChannel, not with CreateChannel/EnsureChannel */
 static const gchar * const anon_channel_allowed_properties[] = {
-    TP_IFACE_CHANNEL_TYPE_STREAMED_MEDIA ".InitialAudio",
-    TP_IFACE_CHANNEL_TYPE_STREAMED_MEDIA ".InitialVideo",
     NULL
 };
 
@@ -576,14 +574,6 @@ tpsip_media_factory_requestotron (TpChannelManager *manager,
   handle = tp_asv_get_uint32 (request_properties,
       TP_IFACE_CHANNEL ".TargetHandle", NULL);
 
-  if (tp_asv_get_boolean (request_properties,
-        TP_IFACE_CHANNEL_TYPE_STREAMED_MEDIA ".InitialAudio", NULL))
-    chan_flags |= TPSIP_MEDIA_CHANNEL_CREATE_WITH_AUDIO;
-
-  if (tp_asv_get_boolean (request_properties,
-        TP_IFACE_CHANNEL_TYPE_STREAMED_MEDIA ".InitialVideo", NULL))
-    chan_flags |= TPSIP_MEDIA_CHANNEL_CREATE_WITH_VIDEO;
-
   switch (handle_type)
     {
     case TP_HANDLE_TYPE_NONE:
@@ -602,7 +592,7 @@ tpsip_media_factory_requestotron (TpChannelManager *manager,
               &error))
         goto error;
 
-      channel = new_media_channel (self, conn->self_handle, 0, chan_flags);
+      channel = new_media_channel (self, conn->self_handle, 0, 0);
       break;
 
     case TP_HANDLE_TYPE_CONTACT:
@@ -632,6 +622,14 @@ tpsip_media_factory_requestotron (TpChannelManager *manager,
             }
         }
 
+      if (tp_asv_get_boolean (request_properties,
+            TP_IFACE_CHANNEL_TYPE_STREAMED_MEDIA ".InitialAudio", NULL))
+        chan_flags |= TPSIP_MEDIA_CHANNEL_CREATE_WITH_AUDIO;
+
+      if (tp_asv_get_boolean (request_properties,
+            TP_IFACE_CHANNEL_TYPE_STREAMED_MEDIA ".InitialVideo", NULL))
+        chan_flags |= TPSIP_MEDIA_CHANNEL_CREATE_WITH_VIDEO;
+
       channel = new_media_channel (self, conn->self_handle, handle, chan_flags);
 
       if (add_peer_to_remote_pending)
-- 
1.5.6.5



More information about the telepathy-commits mailing list