mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-12-12 14:01:08 +01:00
Merge branch '4.2'
This commit is contained in:
commit
81002c4fbd
63 changed files with 391 additions and 266 deletions
|
|
@ -84,7 +84,7 @@ public final class JingleManager extends Manager {
|
|||
|
||||
JingleSessionHandler sessionHandler = jingleSessionHandlers.get(fullJidAndSessionId);
|
||||
if (sessionHandler != null) {
|
||||
//Handle existing session
|
||||
// Handle existing session
|
||||
return sessionHandler.handleJingleSessionRequest(jingle);
|
||||
}
|
||||
|
||||
|
|
@ -96,19 +96,19 @@ public final class JingleManager extends Manager {
|
|||
description.getNamespace());
|
||||
|
||||
if (jingleDescriptionHandler == null) {
|
||||
//Unsupported Application
|
||||
// Unsupported Application
|
||||
LOGGER.log(Level.WARNING, "Unsupported Jingle application.");
|
||||
return jutil.createSessionTerminateUnsupportedApplications(fullFrom, sid);
|
||||
}
|
||||
return jingleDescriptionHandler.handleJingleRequest(jingle);
|
||||
}
|
||||
|
||||
//Unknown session
|
||||
// Unknown session
|
||||
LOGGER.log(Level.WARNING, "Unknown session.");
|
||||
return jutil.createErrorUnknownSession(jingle);
|
||||
}
|
||||
});
|
||||
//Register transports.
|
||||
// Register transports.
|
||||
JingleTransportMethodManager transportMethodManager = JingleTransportMethodManager.getInstanceFor(connection);
|
||||
transportMethodManager.registerTransportManager(JingleIBBTransportManager.getInstanceFor(connection));
|
||||
transportMethodManager.registerTransportManager(JingleS5BTransportManager.getInstanceFor(connection));
|
||||
|
|
|
|||
|
|
@ -59,6 +59,6 @@ public final class JingleIBBTransportManager extends JingleTransportManager<Jing
|
|||
|
||||
@Override
|
||||
public void authenticated(XMPPConnection connection, boolean resumed) {
|
||||
//Nothing to do.
|
||||
// Nothing to do.
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ public class JingleIBBTransportSession extends JingleTransportSession<JingleIBBT
|
|||
@Override
|
||||
public IQ handleTransportInfo(Jingle transportInfo) {
|
||||
return IQ.createResultIQ(transportInfo);
|
||||
//TODO
|
||||
// TODO
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ public class JingleS5BTransportSession extends JingleTransportSession<JingleS5BT
|
|||
.setStreamId(sid).setMode(mode).setDestinationAddress(
|
||||
Socks5Utils.createDigest(sid, jingleSession.getLocal(), jingleSession.getRemote()));
|
||||
|
||||
//Local host
|
||||
// Local host
|
||||
if (JingleS5BTransportManager.isUseLocalCandidates()) {
|
||||
for (Bytestream.StreamHost host : transportManager().getLocalStreamHosts()) {
|
||||
jb.addTransportCandidate(new JingleS5BTransportCandidate(host, 100, JingleS5BTransportCandidate.Type.direct));
|
||||
|
|
@ -204,7 +204,7 @@ public class JingleS5BTransportSession extends JingleTransportSession<JingleS5BT
|
|||
case JingleS5BTransportInfo.ProxyError.ELEMENT:
|
||||
return handleProxyError(transportInfo);
|
||||
}
|
||||
//We should never go here, but lets be gracious...
|
||||
// We should never go here, but lets be gracious...
|
||||
return IQ.createResultIQ(transportInfo);
|
||||
}
|
||||
|
||||
|
|
@ -239,7 +239,7 @@ public class JingleS5BTransportSession extends JingleTransportSession<JingleS5BT
|
|||
}
|
||||
|
||||
public IQ handleProxyError(Jingle jingle) {
|
||||
//TODO
|
||||
// TODO
|
||||
return IQ.createResultIQ(jingle);
|
||||
}
|
||||
|
||||
|
|
@ -265,7 +265,7 @@ public class JingleS5BTransportSession extends JingleTransportSession<JingleS5BT
|
|||
|
||||
LOGGER.log(Level.INFO, "Ready.");
|
||||
|
||||
//Determine nominated candidate.
|
||||
// Determine nominated candidate.
|
||||
UsedCandidate nominated;
|
||||
if (ourChoice != CANDIDATE_FAILURE && theirChoice != CANDIDATE_FAILURE) {
|
||||
if (ourChoice.candidate.getPriority() > theirChoice.candidate.getPriority()) {
|
||||
|
|
@ -288,7 +288,7 @@ public class JingleS5BTransportSession extends JingleTransportSession<JingleS5BT
|
|||
nominated = connectToOurCandidate(nominated.candidate);
|
||||
} catch (InterruptedException | IOException | XMPPException | SmackException | TimeoutException e) {
|
||||
LOGGER.log(Level.INFO, "Could not connect to our candidate.", e);
|
||||
//TODO: Proxy-Error
|
||||
// TODO: Proxy-Error
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -326,7 +326,7 @@ public class JingleS5BTransportSession extends JingleTransportSession<JingleS5BT
|
|||
callback.onSessionInitiated(bs);
|
||||
|
||||
}
|
||||
//Our choice
|
||||
// Our choice
|
||||
else {
|
||||
LOGGER.log(Level.INFO, "Our choice, so their candidate was used.");
|
||||
boolean isProxy = nominated.candidate.getType() == JingleS5BTransportCandidate.Type.proxy;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue