1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-27 00:32:07 +01:00

Remove ECHO for Candidates after a Session Establishment

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@7442 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Thiago Camargo 2007-03-09 22:04:14 +00:00 committed by thiago
parent 30a681a351
commit c3c44e142d
2 changed files with 9 additions and 4 deletions

View file

@ -760,7 +760,7 @@ public abstract class TransportCandidate {
} }
} }
catch (IOException e) { catch (IOException e) {
e.printStackTrace(); // Do Nothing
} }
this.removeListener(listener); this.removeListener(listener);
@ -778,7 +778,7 @@ public abstract class TransportCandidate {
public class TestResults { public class TestResults {
private boolean result; private boolean result=false;
public boolean isReachable() { public boolean isReachable() {
return result; return result;

View file

@ -278,8 +278,8 @@ public abstract class TransportNegotiator extends JingleNegotiator {
// Sleep for some time, waiting for the candidates checks // Sleep for some time, waiting for the candidates checks
int totalTime= (CANDIDATES_ACCEPT_PERIOD + (TransportResolver.CHECK_TIMEOUT * (resolver.getCandidatesList().size()+1))); int totalTime = (CANDIDATES_ACCEPT_PERIOD + (TransportResolver.CHECK_TIMEOUT * (resolver.getCandidatesList().size() + 1)));
int tries = (int)Math.ceil(totalTime/1000); int tries = (int) Math.ceil(totalTime / 1000);
for (int i = 0; i < tries; i++) { for (int i = 0; i < tries; i++) {
try { try {
@ -747,6 +747,11 @@ public abstract class TransportNegotiator extends JingleNegotiator {
*/ */
public void eventEnter() { public void eventEnter() {
System.out.println("Transport stabilished"); System.out.println("Transport stabilished");
for (TransportCandidate transportCandidate : offeredCandidates)
if (transportCandidate.getCandidateEcho() != null)
transportCandidate.removeCandidateEcho();
triggerTransportEstablished(getAcceptedLocalCandidate(), triggerTransportEstablished(getAcceptedLocalCandidate(),
getBestRemoteCandidate()); getBestRemoteCandidate());
super.eventEnter(); super.eventEnter();