[telepathy-butterfly/master] Only call RequestStream if a Initial* property is present
Olivier Le Thanh Duong
olivier at lethanh.be
Tue Jan 19 08:12:57 PST 2010
---
butterfly/channel/media.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/butterfly/channel/media.py b/butterfly/channel/media.py
index e35910e..2b5cde4 100644
--- a/butterfly/channel/media.py
+++ b/butterfly/channel/media.py
@@ -96,13 +96,14 @@ class ButterflyMediaChannel(
'InitialAudio': CHANNEL_TYPE_STREAMED_MEDIA,
'InitialVideo': CHANNEL_TYPE_STREAMED_MEDIA,
})
+
if props.get(initial_audio_prop, False):
types.append(MEDIA_STREAM_TYPE_AUDIO)
if props.get(initial_video_prop, False):
types.append(MEDIA_STREAM_TYPE_VIDEO)
- self.RequestStreams(handle, types)
-
+ if types:
+ self.RequestStreams(handle, types)
def Close(self):
logger.info("Channel closed by client")
--
1.5.6.5
More information about the telepathy-commits
mailing list