1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-23 20:42:06 +01:00

Handle session-initiates in descriptionManager

This commit is contained in:
vanitasvitae 2017-07-27 23:59:26 +02:00
parent fec28ac7b6
commit d37bdb5d20
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
2 changed files with 13 additions and 1 deletions

View file

@ -39,4 +39,6 @@ public abstract class JingleDescription<D extends JingleContentDescriptionElemen
}
public abstract void onTransportReady(BytestreamSession bytestreamSession);
public abstract String getNamespace();
}

View file

@ -253,7 +253,17 @@ public class JingleSession {
}
private IQ handleSessionInitiate(JingleElement request) {
return null;
JingleDescription<?> description = getSoleContentOrThrow().getDescription();
JingleDescriptionManager descriptionManager = jingleManager.getDescriptionManager(description.getNamespace());
if (descriptionManager == null) {
LOGGER.log(Level.WARNING, "Unsupported description type: " + description.getNamespace());
return JingleElement.createSessionTerminate(getPeer(), getSessionId(), JingleReasonElement.Reason.unsupported_applications);
}
descriptionManager.notifySessionInitiate(this);
return IQ.createResultIQ(request);
}
private IQ handleTransportInfo(JingleElement request) {