Assigning a priority to TURN server list passed to PeerConnection. First entry in the TURN server list will get the highest priotity and so forth.
This priority will be used in calculating the candidate priority generated from the server. This will allow candidate generated from server to have unique priority. BUG=3223 R=jiayl@webrtc.org, juberti@webrtc.org, pthatcher@webrtc.org Review URL: https://webrtc-codereview.appspot.com/16549004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@6721 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@@ -253,13 +253,26 @@ void Port::AddAddress(const talk_base::SocketAddress& address,
|
||||
const std::string& type,
|
||||
uint32 type_preference,
|
||||
bool final) {
|
||||
AddAddress(address, base_address, related_address, protocol,
|
||||
type, type_preference, 0, final);
|
||||
}
|
||||
|
||||
void Port::AddAddress(const talk_base::SocketAddress& address,
|
||||
const talk_base::SocketAddress& base_address,
|
||||
const talk_base::SocketAddress& related_address,
|
||||
const std::string& protocol,
|
||||
const std::string& type,
|
||||
uint32 type_preference,
|
||||
uint32 relay_preference,
|
||||
bool final) {
|
||||
Candidate c;
|
||||
c.set_id(talk_base::CreateRandomString(8));
|
||||
c.set_component(component_);
|
||||
c.set_type(type);
|
||||
c.set_protocol(protocol);
|
||||
c.set_address(address);
|
||||
c.set_priority(c.GetPriority(type_preference, network_->preference()));
|
||||
c.set_priority(c.GetPriority(type_preference, network_->preference(),
|
||||
relay_preference));
|
||||
c.set_username(username_fragment());
|
||||
c.set_password(password_);
|
||||
c.set_network_name(network_->name());
|
||||
|
||||
Reference in New Issue
Block a user