changeset 3b38c7493c92 in /home/hg/repos/gajim
details:http://hg.gajim.org/gajim?cmd=changeset;node=3b38c7493c92
description: add an id to jingle ICE UDP transports
diffstat:
src/common/gajim.py | 6 ++++++
src/common/jingle_transport.py | 3 ++-
2 files changed, 8 insertions(+), 1 deletions(-)
diffs (36 lines):
diff -r 0d137d5012e6 -r 3b38c7493c92 src/common/gajim.py
--- a/src/common/gajim.py Fri Aug 31 15:42:25 2012 +0400
+++ b/src/common/gajim.py Fri Aug 31 13:42:44 2012 +0200
@@ -222,6 +222,12 @@
import caps_cache
caps_cache.initialize(logger)
+global_id = 0
+def get_an_id():
+ global global_id
+ global_id += 1
+ return global_id
+
def get_nick_from_jid(jid):
pos = jid.find('@')
return jid[:pos]
diff -r 0d137d5012e6 -r 3b38c7493c92 src/common/jingle_transport.py
--- a/src/common/jingle_transport.py Fri Aug 31 15:42:25 2012 +0400
+++ b/src/common/jingle_transport.py Fri Aug 31 13:42:44 2012 +0200
@@ -178,7 +178,7 @@
local_ip_cand = []
port = int(gajim.config.get('file_transfers_port'))
#type preference of connection type. XEP-0260 section 2.2
- type_preference = 126
+ type_preference = 126
c = {'host': self.connection.peerhost[0]}
c['candidate_id'] = self.connection.connection.getAnID()
c['port'] = port
@@ -351,6 +351,7 @@
'network': '0',
'port': candidate.port,
'priority': int(candidate.priority), # hack
+ 'id': gajim.get_an_id()
}
if candidate.type in types:
attrs['type'] = types[candidate.type]
_______________________________________________
Commits mailing list
[email protected]
http://lists.gajim.org/cgi-bin/listinfo/commits