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:
parent
fec28ac7b6
commit
d37bdb5d20
2 changed files with 13 additions and 1 deletions
|
@ -39,4 +39,6 @@ public abstract class JingleDescription<D extends JingleContentDescriptionElemen
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract void onTransportReady(BytestreamSession bytestreamSession);
|
public abstract void onTransportReady(BytestreamSession bytestreamSession);
|
||||||
|
|
||||||
|
public abstract String getNamespace();
|
||||||
}
|
}
|
||||||
|
|
|
@ -253,7 +253,17 @@ public class JingleSession {
|
||||||
}
|
}
|
||||||
|
|
||||||
private IQ handleSessionInitiate(JingleElement request) {
|
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) {
|
private IQ handleTransportInfo(JingleElement request) {
|
||||||
|
|
Loading…
Reference in a new issue