enable SM if it wasn’t enabled in bind 2
This commit is contained in:
parent
9a0c90f066
commit
7eb160386d
|
@ -780,8 +780,13 @@ public class XmppConnection implements Runnable {
|
||||||
final Element streamManagementEnabled =
|
final Element streamManagementEnabled =
|
||||||
bound.findChild("enabled", Namespace.STREAM_MANAGEMENT);
|
bound.findChild("enabled", Namespace.STREAM_MANAGEMENT);
|
||||||
final Element carbonsEnabled = bound.findChild("enabled", Namespace.CARBONS);
|
final Element carbonsEnabled = bound.findChild("enabled", Namespace.CARBONS);
|
||||||
|
final boolean waitForDisco;
|
||||||
if (streamManagementEnabled != null) {
|
if (streamManagementEnabled != null) {
|
||||||
processEnabled(streamManagementEnabled);
|
processEnabled(streamManagementEnabled);
|
||||||
|
waitForDisco = true;
|
||||||
|
} else {
|
||||||
|
//if we didn’t enable stream managment in bind do it now
|
||||||
|
waitForDisco = enableStreamManagement();
|
||||||
}
|
}
|
||||||
if (carbonsEnabled != null) {
|
if (carbonsEnabled != null) {
|
||||||
Log.d(
|
Log.d(
|
||||||
|
@ -789,9 +794,7 @@ public class XmppConnection implements Runnable {
|
||||||
account.getJid().asBareJid() + ": successfully enabled carbons");
|
account.getJid().asBareJid() + ": successfully enabled carbons");
|
||||||
features.carbonsEnabled = true;
|
features.carbonsEnabled = true;
|
||||||
}
|
}
|
||||||
// TODO if we didn’t enable stream managment in bind do it now
|
sendPostBindInitialization(waitForDisco, carbonsEnabled != null);
|
||||||
// TODO if both are set mark account ready for pipelining
|
|
||||||
sendPostBindInitialization(streamManagementEnabled != null, carbonsEnabled != null);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.quickStartInProgress = false;
|
this.quickStartInProgress = false;
|
||||||
|
|
Loading…
Reference in a new issue