[Telepathy-commits] [multi-jingle/master] Set controlling-mode if we're making the call in the transmitter

Sjoerd Simons sjoerd.simons at collabora.co.uk
Sat Jan 17 14:45:16 PST 2009


---
 jingle.py |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/jingle.py b/jingle.py
index 881eb8b..16b96d0 100644
--- a/jingle.py
+++ b/jingle.py
@@ -1211,7 +1211,8 @@ class JingleConference(fs2.Conference):
         del participant
 
 
-    def create_stream(self, session, participant, namespace):
+    def create_stream(self, session, participant, namespace,
+        initiating = False):
         # Using stun.ekiga.net as a stunserver
         transmitters = {
             ns.GOOGLE_TRANSPORT_P2P: ("nice",
@@ -1221,11 +1222,17 @@ class JingleConference(fs2.Conference):
                 }),
             ns.JINGLE_TRANSPORT_RAW_UDP: ("rawudp", {} ),
             ns.JINGLE_TRANSPORT_ICE: ("nice",
-                { 'stun-ip': "69.0.208.27",
-                  'stun-port': 3478
+                { #'stun-ip': "69.0.208.27",
+                  #'stun-port': 3478
                 })
         }
 
+        if initiating:
+            transmitters[ns.GOOGLE_TRANSPORT_P2P][1]['controlling-mode'] = \
+                True
+            transmitters[ns.JINGLE_TRANSPORT_ICE][1]['controlling-mode'] = \
+                True
+
         if not namespace in get_available_transports():
             return None
 
@@ -1254,7 +1261,7 @@ class JingleConference(fs2.Conference):
                                ]
         for tns in transport_namespaces:
             if tns in caps:
-                stream = self.create_stream(session, participant, tns)
+                stream = self.create_stream(session, participant, tns, True)
                 if stream != None:
                     d = self.stream_deferreds[session].pop(participant)
                     d.callback(stream.fsstream)
-- 
1.5.6.5




More information about the Telepathy-commits mailing list