[muji/master] Be more lenient when getting candidates

Sjoerd Simons sjoerd.simons at collabora.co.uk
Tue Jun 2 10:52:16 PDT 2009


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

diff --git a/jingle.py b/jingle.py
index 9b46f30..593b130 100644
--- a/jingle.py
+++ b/jingle.py
@@ -282,6 +282,9 @@ class JingleBaseTransport:
     def candidate_to_fscandidate(self, transport, candidate):
         fscandidate = farsight.Candidate()
 
+        fscandidate.username = ""
+        fscandidate.password = ""
+
         # Real jingle puts some keys in the transport"
         if transport != None:
             if transport.hasAttribute("ufrag"):
@@ -412,7 +415,10 @@ class GoogleTransport(JingleGoogleTransport):
         # candidate
         fscandidate = self.candidate_to_fscandidate(None, candidate)
         if fscandidate != None:
-          self.fsstream.add_remote_candidate(fscandidate)
+          try:
+            self.fsstream.add_remote_candidate(fscandidate)
+          except Exception, e:
+            print e
 
     def prepare(self, fssession, contact):
         # FIXME hack alert ?
@@ -433,11 +439,11 @@ class GoogleTransport(JingleGoogleTransport):
         if candidate.hasAttribute("name"):
             if self.type == GoogleTransport.TYPE_AUDIO:
                 if "video" in candidate["name"]:
-                    return
+                    return None
 
             if self.type == GoogleTransport.TYPE_VIDEO:
                 if not "video" in candidate["name"]:
-                    return
+                    return None
 
         return JingleGoogleTransport.candidate_to_fscandidate(self,
             transport, candidate)
-- 
1.5.6.5




More information about the telepathy-commits mailing list