diff --git a/src/org/ice4j/ice/Agent.java b/src/org/ice4j/ice/Agent.java index 409dbc3..88fb465 100644 --- a/src/org/ice4j/ice/Agent.java +++ b/src/org/ice4j/ice/Agent.java @@ -937,14 +937,12 @@ public class Agent //The agent MUST remove all Waiting and Frozen pairs in the check //list and triggered check queue for the same component as the //nominated pairs for that media stream. - checkList.removeNonStartedPairsForComponent(parentComponent); + checkList.removeNonCompledPairsForComponent(parentComponent); /* - * - - * If an In-Progress pair in the check list is for the same - component as a nominated pair, the agent SHOULD cease - retransmissions for its check if its pair priority is lower - than the lowest-priority nominated pair for that component.*/ + //If an In-Progress pair in the check list is for the same + //component as a nominated pair, the agent SHOULD cease + //retransmissions for its check if its pair priority is lower + //than the lowest-priority nominated pair for that component.*/ } /* diff --git a/src/org/ice4j/ice/CheckList.java b/src/org/ice4j/ice/CheckList.java index 25b23b3..cb03c2b 100644 --- a/src/org/ice4j/ice/CheckList.java +++ b/src/org/ice4j/ice/CheckList.java @@ -278,21 +278,37 @@ public class CheckList /** * Removes from this CheckList and its associated triggered check * queue all {@link CandidatePair}s that are in the Waiting and - * Frozen states and that belong to the specified - * component. Typically this will happen upon confirmation of the - * nomination of one pair in that component. + * Frozen states and that belong to the same {@link Component} as + * nominatedPair. Typically this will happen upon confirmation of + * the nomination of one pair in that component. The procedure implemented + * here represents one of the cases specified in RFC 5245, Section 8.1.2: + *
+ * The agent MUST remove all Waiting and Frozen pairs in the check + * list and triggered check queue for the same component as the + * nominated pairs for that media stream. + *
+ * If an In-Progress pair in the check list is for the same component as a + * nominated pair, the agent SHOULD cease retransmissions for its check + * if its pair priority is lower than the lowest-priority nominated pair + * for that component. + *
* - * @param cmp the {@link Component} whose pairs we want removed. + * @param nominatedPair the {@link CandidatePair} whose nomination we need + * to handle. */ - public synchronized void removeNonStartedPairsForComponent(Component cmp) + public synchronized void removeNonCompledPairsForComponent( + CandidatePair nominatedPair) { + Component cmp = nominatedPair.getParentComponent(); Iterator