diff options
author | Daniel Gultsch <daniel.gultsch@rwth-aachen.de> | 2014-04-05 09:45:15 +0200 |
---|---|---|
committer | Daniel Gultsch <daniel.gultsch@rwth-aachen.de> | 2014-04-05 09:45:15 +0200 |
commit | 850b24c4dbbed20cde68f6015be2a5b7f28fba93 (patch) | |
tree | 4d8dc6d34dacb63ec5da6bab15b7bbdcf8bdcc94 /src/eu/siacs/conversations/xmpp | |
parent | ee24baa0fd62f959a2d91c787d3a405281eeb311 (diff) |
code cleanup
Diffstat (limited to 'src/eu/siacs/conversations/xmpp')
-rw-r--r-- | src/eu/siacs/conversations/xmpp/XmppConnection.java | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/eu/siacs/conversations/xmpp/XmppConnection.java b/src/eu/siacs/conversations/xmpp/XmppConnection.java index 591752c4..7b26e3d8 100644 --- a/src/eu/siacs/conversations/xmpp/XmppConnection.java +++ b/src/eu/siacs/conversations/xmpp/XmppConnection.java @@ -387,14 +387,10 @@ public class XmppConnection implements Runnable { } private void sendCompressionZlib() throws IOException { - tagWriter.writeElement(new Element("compress") { - public String toString() { - return - "<compress xmlns='http://jabber.org/protocol/compress'>" - + "<method>zlib</method>" - + "</compress>"; - } - }); + Element compress = new Element("compress"); + compress.setAttribute("xmlns", "http://jabber.org/protocol/compress"); + compress.addChild("method").setContent("zlib"); + tagWriter.writeElement(compress); } private void switchOverToZLib(Tag currentTag) throws XmlPullParserException, @@ -408,9 +404,8 @@ public class XmppConnection implements Runnable { tagReader.setInputStream(new ZLibInputStream(tagReader.getInputStream())); sendStartStream(); + Log.d(LOGTAG,account.getJid()+": compression enabled"); processStream(tagReader.readTag()); - - Log.d(LOGTAG,account.getJid()+": zlib compressed stream established"); } private void sendStartTLS() throws IOException { @@ -568,7 +563,6 @@ public class XmppConnection implements Runnable { return true; } } - return false; } |