Changeset 8524 for branches/jingle/src/common/jingle.py
- Timestamp:
- 08/21/07 01:14:57 (17 months ago)
- Files:
-
- 1 modified
-
branches/jingle/src/common/jingle.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/jingle/src/common/jingle.py
r8507 r8524 432 432 for candidate in content.getTag('transport').iterTags('candidate'): 433 433 cand={ 434 # 'candidate_id': str(self.session.connection.connection.getAnID()),435 434 'candidate_id': candidate['cid'], 436 435 'component': int(candidate['component']), 437 436 'ip': candidate['ip'], 438 437 'port': int(candidate['port']), 439 'proto': candidate['protocol']=='udp' and farsight.NETWORK_PROTOCOL_UDP \440 or farsight.NETWORK_PROTOCOL_TCP,441 438 'proto_subtype':'RTP', 442 439 'proto_profile':'AVP', 443 440 'preference': float(candidate['priority'])/100000, 444 # 'type': farsight.CANDIDATE_TYPE_LOCAL, 445 'type': int(candidate['type']), 441 'type': farsight.CANDIDATE_TYPE_LOCAL, 446 442 } 447 if 'ufrag' in candidate: cand['username']=candidate['ufrag'] 448 if 'pwd' in candidate: cand['password']=candidate['pwd'] 443 if candidate['protocol']=='udp': 444 cand['proto']=farsight.NETWORK_PROTOCOL_UDP 445 else: 446 # we actually don't handle properly different tcp options in jingle 447 cand['proto']=farsight.NETWORK_PROTOCOL_TCP 448 if 'ufrag' in candidate: 449 cand['username']=candidate['ufrag'] 450 if 'pwd' in candidate: 451 cand['password']=candidate['pwd'] 449 452 450 453 candidates.append(cand) … … 541 544 'port': candidate['port'], 542 545 'priority': int(100000*candidate['preference']), # hack 543 'protocol': candidate['proto']==farsight.NETWORK_PROTOCOL_UDP and 'udp' or 'tcp',544 546 } 547 if candidate['proto']==farsight.NETWORK_PROTOCOL_UDP: 548 attrs['protocol']='udp' 549 else: 550 # we actually don't handle properly different tcp options in jingle 551 attrs['protocol']='tcp' 545 552 if 'username' in candidate: attrs['ufrag']=candidate['username'] 546 553 if 'password' in candidate: attrs['pwd']=candidate['password']
