mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2025-09-09 10:19:41 +02:00
commit
1bd097ed9b
15 changed files with 89 additions and 23 deletions
|
@ -801,7 +801,7 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
|
|||
return;
|
||||
}
|
||||
|
||||
Compress.Feature compression = getFeature(Compress.Feature.ELEMENT, Compress.NAMESPACE);
|
||||
Compress.Feature compression = getFeature(Compress.Feature.class);
|
||||
if (compression == null) {
|
||||
// Server does not support compression
|
||||
return;
|
||||
|
@ -857,7 +857,7 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
|
|||
|
||||
@Override
|
||||
protected void afterFeaturesReceived() throws NotConnectedException, InterruptedException, SecurityRequiredByServerException {
|
||||
StartTls startTlsFeature = getFeature(StartTls.ELEMENT, StartTls.NAMESPACE);
|
||||
StartTls startTlsFeature = getFeature(StartTls.class);
|
||||
if (startTlsFeature != null) {
|
||||
if (startTlsFeature.required() && config.getSecurityMode() == SecurityMode.disabled) {
|
||||
SecurityRequiredByServerException smackException = new SecurityRequiredByServerException();
|
||||
|
|
|
@ -819,7 +819,7 @@ public class XmppTcpTransportModule extends ModularXmppClientToServerConnectionM
|
|||
@Override
|
||||
public StateTransitionResult.TransitionImpossible isTransitionToPossible(WalkStateGraphContext walkStateGraphContext)
|
||||
throws SecurityRequiredByClientException, SecurityRequiredByServerException {
|
||||
StartTls startTlsFeature = connectionInternal.connection.getFeature(StartTls.ELEMENT, StartTls.NAMESPACE);
|
||||
StartTls startTlsFeature = connectionInternal.connection.getFeature(StartTls.class);
|
||||
SecurityMode securityMode = connectionInternal.connection.getConfiguration().getSecurityMode();
|
||||
|
||||
switch (securityMode) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue