Fixes Google's ICE with TCP transport.
This commit is contained in:
parent
fab4966215
commit
338409c769
@ -340,6 +340,18 @@ public class Component
|
|||||||
{
|
{
|
||||||
if(localCnd.canReach(remoteCnd))
|
if(localCnd.canReach(remoteCnd))
|
||||||
{
|
{
|
||||||
|
if(localCnd.getTransport() == Transport.TCP &&
|
||||||
|
localCnd.getIceSocketWrapper().getTCPSocket().
|
||||||
|
isConnected())
|
||||||
|
{
|
||||||
|
if(!localCnd.getIceSocketWrapper().getTCPSocket().
|
||||||
|
getRemoteSocketAddress().equals(
|
||||||
|
remoteCnd.getTransportAddress()))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
CandidatePair pair = new CandidatePair(localCnd,
|
CandidatePair pair = new CandidatePair(localCnd,
|
||||||
remoteCnd);
|
remoteCnd);
|
||||||
logger.info("new Pair added: " + pair.toShortString());
|
logger.info("new Pair added: " + pair.toShortString());
|
||||||
|
|||||||
@ -189,6 +189,8 @@ class ConnectivityCheckClient
|
|||||||
//nominated pairs.
|
//nominated pairs.
|
||||||
if(candidatePair.isNominated())
|
if(candidatePair.isNominated())
|
||||||
{
|
{
|
||||||
|
logger.info("set useCandidateSent for " +
|
||||||
|
candidatePair.toShortString());
|
||||||
candidatePair.setUseCandidateSent();
|
candidatePair.setUseCandidateSent();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -517,8 +519,13 @@ class ConnectivityCheckClient
|
|||||||
.getAttribute(Attribute.USERNAME);
|
.getAttribute(Attribute.USERNAME);
|
||||||
String username = new String(uname.getUsername());
|
String username = new String(uname.getUsername());
|
||||||
String ufrag = username.substring(16, 32);
|
String ufrag = username.substring(16, 32);
|
||||||
validLocalCandidate = parentAgent.findLocalCandidate(mappedAddress,
|
|
||||||
ufrag);
|
if(mappedAddress.getTransport() == Transport.TCP)
|
||||||
|
validLocalCandidate = parentAgent.findLocalCandidate(
|
||||||
|
mappedAddress);
|
||||||
|
else
|
||||||
|
validLocalCandidate = parentAgent.findLocalCandidate(
|
||||||
|
mappedAddress, ufrag);
|
||||||
}
|
}
|
||||||
else if(parentAgent.getCompatibilityMode() == CompatibilityMode.RFC5245)
|
else if(parentAgent.getCompatibilityMode() == CompatibilityMode.RFC5245)
|
||||||
{
|
{
|
||||||
@ -666,7 +673,8 @@ class ConnectivityCheckClient
|
|||||||
|
|
||||||
logger.info("IsControlling: " + parentAgent.isControlling() +
|
logger.info("IsControlling: " + parentAgent.isControlling() +
|
||||||
" USE-CANDIDATE:" +
|
" USE-CANDIDATE:" +
|
||||||
request.containsAttribute(Attribute.USE_CANDIDATE));
|
(request.containsAttribute(Attribute.USE_CANDIDATE) ||
|
||||||
|
checkedPair.useCandidateSent()));
|
||||||
|
|
||||||
//If the agent was a controlling agent, and it had included a USE-
|
//If the agent was a controlling agent, and it had included a USE-
|
||||||
//CANDIDATE attribute in the Binding request, the valid pair generated
|
//CANDIDATE attribute in the Binding request, the valid pair generated
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user