mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-23 20:42:06 +01:00
Coming closer...
This commit is contained in:
parent
daa6b6b999
commit
0952c20a5c
1 changed files with 36 additions and 34 deletions
|
@ -145,11 +145,15 @@ public class JingleS5BTransportSession extends JingleTransportSession<JingleS5BT
|
||||||
Socks5Client socks5Client = new Socks5Client(streamHost, receivedTransport.getDestinationAddress());
|
Socks5Client socks5Client = new Socks5Client(streamHost, receivedTransport.getDestinationAddress());
|
||||||
socket = socks5Client.getSocket(10 * 1000);
|
socket = socks5Client.getSocket(10 * 1000);
|
||||||
workedForUs = candidate;
|
workedForUs = candidate;
|
||||||
|
LOGGER.log(Level.INFO, "Connected to remote address " + address + " with dstAddr "
|
||||||
|
+ receivedTransport.getDestinationAddress());
|
||||||
|
break;
|
||||||
|
|
||||||
} catch (IOException | XMPPException | InterruptedException | TimeoutException | SmackException e) {
|
} catch (IOException | XMPPException | InterruptedException | TimeoutException | SmackException e) {
|
||||||
LOGGER.log(Level.WARNING, "Could not connect to remotes address " + address + " with dstAddr "
|
LOGGER.log(Level.WARNING, "Could not connect to remotes address " + address + " with dstAddr "
|
||||||
+ receivedTransport.getDestinationAddress());
|
+ receivedTransport.getDestinationAddress());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
JingleContent content = jSession.getContents().get(0);
|
JingleContent content = jSession.getContents().get(0);
|
||||||
|
|
||||||
|
@ -178,7 +182,6 @@ public class JingleS5BTransportSession extends JingleTransportSession<JingleS5BT
|
||||||
|
|
||||||
closeIfBothSidesFailed();
|
closeIfBothSidesFailed();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private boolean closeIfBothSidesFailed() {
|
private boolean closeIfBothSidesFailed() {
|
||||||
JingleSession jSession = jingleSession.get();
|
JingleSession jSession = jingleSession.get();
|
||||||
|
@ -234,7 +237,7 @@ public class JingleS5BTransportSession extends JingleTransportSession<JingleS5BT
|
||||||
return jutil.createErrorMalformedRequest(candidateUsed);
|
return jutil.createErrorMalformedRequest(candidateUsed);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (localUsedCandidate != null) {
|
if (localUsedCandidate != null || localError) {
|
||||||
try {
|
try {
|
||||||
connect(determineUsedCandidate());
|
connect(determineUsedCandidate());
|
||||||
} catch (SmackException.NotConnectedException | InterruptedException e) {
|
} catch (SmackException.NotConnectedException | InterruptedException e) {
|
||||||
|
@ -341,12 +344,11 @@ public class JingleS5BTransportSession extends JingleTransportSession<JingleS5BT
|
||||||
return IQ.createResultIQ(candidateError);
|
return IQ.createResultIQ(candidateError);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (localUsedCandidate != null) {
|
if (localUsedCandidate != null || localError) {
|
||||||
|
try {
|
||||||
if (localUsedCandidate.getType() != JingleS5BTransportCandidate.Type.proxy) {
|
connect(determineUsedCandidate());
|
||||||
//TODO: Connect
|
} catch (SmackException.NotConnectedException | InterruptedException e) {
|
||||||
} else {
|
callback.onException(e);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue