CandidatePair can be updated with useCandidateReceived even if the state is not succeeded.
This commit is contained in:
parent
3cc3c94b63
commit
fab4966215
@ -1217,7 +1217,8 @@ public class Agent
|
|||||||
* {@link org.ice4j.message.Request} contained the USE-CANDIDATE ICE
|
* {@link org.ice4j.message.Request} contained the USE-CANDIDATE ICE
|
||||||
* attribute.
|
* attribute.
|
||||||
*/
|
*/
|
||||||
protected void incomingCheckReceived(TransportAddress remoteAddress,
|
protected void incomingCheckReceived(
|
||||||
|
TransportAddress remoteAddress,
|
||||||
TransportAddress localAddress,
|
TransportAddress localAddress,
|
||||||
long priority,
|
long priority,
|
||||||
String remoteUFrag,
|
String remoteUFrag,
|
||||||
@ -1337,6 +1338,10 @@ public class Agent
|
|||||||
|
|
||||||
if (knownPair != null)
|
if (knownPair != null)
|
||||||
{
|
{
|
||||||
|
boolean useCand = false;
|
||||||
|
|
||||||
|
useCand = triggerPair.useCandidateReceived();
|
||||||
|
|
||||||
//if the incoming request contained a USE-CANDIDATE attribute then
|
//if the incoming request contained a USE-CANDIDATE attribute then
|
||||||
//make sure we don't lose this piece of info.
|
//make sure we don't lose this piece of info.
|
||||||
if (triggerPair.useCandidateReceived())
|
if (triggerPair.useCandidateReceived())
|
||||||
@ -1347,10 +1352,20 @@ public class Agent
|
|||||||
//we already know about the remote address so we only need to
|
//we already know about the remote address so we only need to
|
||||||
//trigger a check for the existing pair
|
//trigger a check for the existing pair
|
||||||
|
|
||||||
|
if(compatibilityMode != CompatibilityMode.RFC5245 &&
|
||||||
|
!isControlling())
|
||||||
|
{
|
||||||
|
logger.info("set useCandidateReceived for " +
|
||||||
|
triggerPair.toShortString());
|
||||||
|
//next time we will see a request it will be considered as
|
||||||
|
// having USE-CANDIDATE
|
||||||
|
triggerPair.setUseCandidateReceived();
|
||||||
|
}
|
||||||
|
|
||||||
if (knownPair.getState() == CandidatePairState.SUCCEEDED )
|
if (knownPair.getState() == CandidatePairState.SUCCEEDED )
|
||||||
{
|
{
|
||||||
//7.2.1.5. Updating the Nominated Flag
|
//7.2.1.5. Updating the Nominated Flag
|
||||||
if (!isControlling() && triggerPair.useCandidateReceived())
|
if (!isControlling() && useCand)
|
||||||
{
|
{
|
||||||
logger.info("update nominated flag");
|
logger.info("update nominated flag");
|
||||||
// If the Binding request received by the agent had the
|
// If the Binding request received by the agent had the
|
||||||
@ -1370,13 +1385,6 @@ public class Agent
|
|||||||
//ICE processing state.
|
//ICE processing state.
|
||||||
checkListStatesUpdated();
|
checkListStatesUpdated();
|
||||||
}
|
}
|
||||||
else if(compatibilityMode != CompatibilityMode.RFC5245 &&
|
|
||||||
!isControlling())
|
|
||||||
{
|
|
||||||
//next time we will see a request it will be considered as
|
|
||||||
// having USE-CANDIDATE
|
|
||||||
triggerPair.setUseCandidateReceived();
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user