diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2018-12-18 13:02:25 +0300 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2018-12-18 13:02:25 +0300 |
commit | 9659f46136aab868fe185181912ebd227c03670b (patch) | |
tree | 4b84553f8d8967e5cc3d864f05e0f59274c06324 | |
parent | 5c920a93620d190155f175a518c8c720311cf233 (diff) |
log policy violation stream error message to logcat
-rw-r--r-- | src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java index 94833a3b3..c525ff6b9 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java +++ b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java @@ -1311,7 +1311,11 @@ public class XmppConnection implements Runnable { throw new IOException(); } else if (streamError.hasChild("host-unknown")) { throw new StateChangingException(Account.State.HOST_UNKNOWN); - } else if (streamError.hasChild("policy-violation")) { + } else if (streamError.hasChild("policy-violation")) { ; + final String text = streamError.findChildContent("text"); + if (text != null) { + Log.d(Config.LOGTAG,account.getJid().asBareJid()+": policy violation. "+text); + } throw new StateChangingException(Account.State.POLICY_VIOLATION); } else { Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": stream error " + streamError.toString()); |