aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/crypto
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-05-05 20:41:59 +0200
committerChristian Schneppe <christian@pix-art.de>2018-05-05 20:41:59 +0200
commitf37b1410e17ac8400c8b87a09b81b8af50c74e9d (patch)
tree9724dc835d5fd8f24f8b251c7546c8f64c5840c0 /src/main/java/de/pixart/messenger/crypto
parenta88700566a783414767f5e88723a373492ae9871 (diff)
improved logging for node configuration change
Diffstat (limited to 'src/main/java/de/pixart/messenger/crypto')
-rw-r--r--src/main/java/de/pixart/messenger/crypto/axolotl/AxolotlService.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/main/java/de/pixart/messenger/crypto/axolotl/AxolotlService.java b/src/main/java/de/pixart/messenger/crypto/axolotl/AxolotlService.java
index a4884e60a..ebf4e8667 100644
--- a/src/main/java/de/pixart/messenger/crypto/axolotl/AxolotlService.java
+++ b/src/main/java/de/pixart/messenger/crypto/axolotl/AxolotlService.java
@@ -597,7 +597,7 @@ public class AxolotlService implements OnAdvancedStreamFeaturesLoaded {
}
if (packet.getType() == IqPacket.TYPE.ERROR) {
if (preConditionNotMet) {
- Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": pre condition still not met on second attempt");
+ Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": device list pre condition still not met on second attempt");
} else if (error != null) {
pepBroken = true;
Log.d(Config.LOGTAG, getLogprefix(account) + "Error received while publishing own device id" + packet.findChild("error"));
@@ -790,8 +790,9 @@ public class AxolotlService implements OnAdvancedStreamFeaturesLoaded {
mXmppConnectionService.sendIqPacket(account, publish, new OnIqPacketReceived() {
@Override
public void onIqPacketReceived(final Account account, IqPacket packet) {
- Element error = packet.getType() == IqPacket.TYPE.ERROR ? packet.findChild("error") : null;
- if (firstAttempt && error != null && error.hasChild("precondition-not-met", Namespace.PUBSUB_ERROR)) {
+ final Element error = packet.getType() == IqPacket.TYPE.ERROR ? packet.findChild("error") : null;
+ final boolean preconditionNotMet = error != null && error.hasChild("precondition-not-met", Namespace.PUBSUB_ERROR);
+ if (firstAttempt && preconditionNotMet) {
Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": precondition wasn't met for bundle. pushing node configuration");
final String node = AxolotlService.PEP_BUNDLES + ":" + getOwnDeviceId();
mXmppConnectionService.pushNodeConfiguration(account, node, publishOptions, new XmppConnectionService.OnConfigurationPushed() {
@@ -814,8 +815,12 @@ public class AxolotlService implements OnAdvancedStreamFeaturesLoaded {
publishOwnDeviceIdIfNeeded();
}
} else if (packet.getType() == IqPacket.TYPE.ERROR) {
+ if (preconditionNotMet) {
+ Log.d(Config.LOGTAG, getLogprefix(account) + "bundle precondition still not met after second attempt");
+ } else {
+ Log.d(Config.LOGTAG, getLogprefix(account) + "Error received while publishing bundle: " + error);
+ }
pepBroken = true;
- Log.d(Config.LOGTAG, getLogprefix(account) + "Error received while publishing bundle: " + packet.findChild("error"));
}
}
});