From c039ffcf352b6c6f7231e74a63bd9db028b3eaf3 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Wed, 14 Aug 2019 18:44:57 +0200 Subject: [PATCH] clean up logging --- .../siacs/conversations/services/XmppConnectionService.java | 5 ++--- .../java/eu/siacs/conversations/xmpp/XmppConnection.java | 6 ++---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java index a286bf198..ded2ab3c7 100644 --- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java @@ -428,11 +428,11 @@ public class XmppConnectionService extends Service { final int next = connection.getTimeToNextAttempt(); final boolean lowPingTimeoutMode = isInLowPingTimeoutMode(account); if (next <= 0) { - Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": error connecting account. reconnecting now. lowPingTimeout=" + Boolean.toString(lowPingTimeoutMode)); + Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": error connecting account. reconnecting now. lowPingTimeout=" + lowPingTimeoutMode); reconnectAccount(account, true, false); } else { final int attempt = connection.getAttempt() + 1; - Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": error connecting account. try again in " + next + "s for the " + attempt + " time. lowPingTimeout=" + Boolean.toString(lowPingTimeoutMode)); + Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": error connecting account. try again in " + next + "s for the " + attempt + " time. lowPingTimeout=" + lowPingTimeoutMode); scheduleWakeUpCall(next, account.getUuid().hashCode()); } } @@ -1522,7 +1522,6 @@ public class XmppConnectionService extends Service { packet.addChild(ChatState.toElement(conversation.getOutgoingChatState())); } } - Log.d(Config.LOGTAG,packet.toString()); sendMessagePacket(account, packet); } } diff --git a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java index 0edac8a5e..250a11d2d 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java +++ b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java @@ -1328,11 +1328,9 @@ 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); - } + 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());