[Telepathy-commits] [mingle/master] In rawudp properly wait for getting the screen and at least one candidate (if needed)

Sjoerd Simons sjoerd at luon.net
Sat Nov 8 14:20:59 PST 2008


---
 jingle.py |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/jingle.py b/jingle.py
index b6ee960..eefe0c9 100644
--- a/jingle.py
+++ b/jingle.py
@@ -331,9 +331,12 @@ class JingleRawudpTransport(JingleBaseTransport):
         candidate['id'] = make_sid()
 
     def prepare(self, fssession, contact):
-        JingleBaseTransport.prepare(self, fssession, contact)
-        self.candidate_deferred = defer.Deferred()
-        return self.candidate_deferred
+        base = JingleBaseTransport.prepare(self, fssession, contact)
+        dlist = [base]
+        if len(self.pending_candidates) == 0:
+            self.candidate_deferred = defer.Deferred()
+            dlist.append (self.candidate_deferred)
+        return defer.DeferredList(dlist)
 
     def candidate_to_fscandidate(self, candidate):
         fscandidate = JingleBaseTransport.candidate_to_fscandidate(self,
-- 
1.5.6.5




More information about the Telepathy-commits mailing list