[Telepathy-commits] [mingle/master] parse and set the preference attribute in candidates
Sjoerd Simons
sjoerd at luon.net
Mon Nov 24 05:52:58 PST 2008
---
jingle.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/jingle.py b/jingle.py
index 80e43da..067261a 100644
--- a/jingle.py
+++ b/jingle.py
@@ -247,6 +247,7 @@ class JingleBaseTransport:
'username': ('username', str),
'password': ('password', str),
'address': ('ip', str),
+ 'preference': ('priority', lambda x: int(float(x))),
'port': ('port', int),
'protocol': ('proto', {'udp': 0, 'tcp': 1}.__getitem__),
'name': ('component_id', {'rtp': farsight.COMPONENT_RTP,
@@ -375,7 +376,7 @@ class JingleGoogleTransport(JingleBaseTransport):
candidate['generation'] = '0'
candidate['username'] = fscandidate.username
candidate['password'] = fscandidate.password
- candidate['preference'] = "1.0" #str(fscandidate.priority)
+ candidate['preference'] = str(fscandidate.priority/1000.0)
candidate['network'] = "0"
candidate['type'] = \
{ farsight.CANDIDATE_TYPE_HOST: "local",
--
1.5.6.5
More information about the Telepathy-commits
mailing list