add an id to jingle ICE UDP transports
This commit is contained in:
parent
3ec7e2eee4
commit
b8adce541f
2 changed files with 8 additions and 1 deletions
|
@ -222,6 +222,12 @@ caps_hash = {}
|
|||
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]
|
||||
|
|
|
@ -351,6 +351,7 @@ class JingleTransportICEUDP(JingleTransport):
|
|||
'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]
|
||||
|
|
Loading…
Add table
Reference in a new issue