From 9659f46136aab868fe185181912ebd227c03670b Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Tue, 18 Dec 2018 11:02:25 +0100 Subject: [PATCH] log policy violation stream error message to logcat --- .../java/eu/siacs/conversations/xmpp/XmppConnection.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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());