Index: webrtc/api/webrtcsdp.cc |
diff --git a/webrtc/api/webrtcsdp.cc b/webrtc/api/webrtcsdp.cc |
index a6edf7ce187d9fa4d9e8e55f25465703b3a3e6c2..6bab4076cab9e42da60e8cf7447c9164eccda4e6 100644 |
--- a/webrtc/api/webrtcsdp.cc |
+++ b/webrtc/api/webrtcsdp.cc |
@@ -154,8 +154,7 @@ static const char kValueConference[] = "conference"; |
// Candidate |
static const char kCandidateHost[] = "host"; |
static const char kCandidateSrflx[] = "srflx"; |
-// TODO: How to map the prflx with circket candidate type |
-// static const char kCandidatePrflx[] = "prflx"; |
+static const char kCandidatePrflx[] = "prflx"; |
static const char kCandidateRelay[] = "relay"; |
static const char kTcpCandidateType[] = "tcptype"; |
@@ -1014,6 +1013,8 @@ bool ParseCandidate(const std::string& message, Candidate* candidate, |
candidate_type = cricket::STUN_PORT_TYPE; |
} else if (type == kCandidateRelay) { |
candidate_type = cricket::RELAY_PORT_TYPE; |
+ } else if (type == kCandidatePrflx) { |
+ candidate_type = cricket::PRFLX_PORT_TYPE; |
} else { |
return ParseFailed(first_line, "Unsupported candidate type.", error); |
} |
@@ -1752,6 +1753,9 @@ void BuildCandidate(const std::vector<Candidate>& candidates, |
type = kCandidateSrflx; |
} else if (it->type() == cricket::RELAY_PORT_TYPE) { |
type = kCandidateRelay; |
+ } else if (it->type() == cricket::PRFLX_PORT_TYPE) { |
+ type = kCandidatePrflx; |
+ // Peer reflexive candidate may be signaled for being removed. |
} else { |
ASSERT(false); |
// Never write out candidates if we don't know the type. |