From fd8b2320179106e5d808ed0786acb45fe3be264e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnther=20Niess?= Date: Wed, 9 Sep 2009 11:26:44 +0000 Subject: [PATCH] SMACK-264: Fix SASL Anonymous for updated API. git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@11257 b35dd754-fafc-0310-a699-88a17e54d16e --- .../jivesoftware/smack/sasl/SASLAnonymous.java | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/source/org/jivesoftware/smack/sasl/SASLAnonymous.java b/source/org/jivesoftware/smack/sasl/SASLAnonymous.java index 9423bedc8..598d02f24 100644 --- a/source/org/jivesoftware/smack/sasl/SASLAnonymous.java +++ b/source/org/jivesoftware/smack/sasl/SASLAnonymous.java @@ -48,24 +48,14 @@ public class SASLAnonymous extends SASLMechanism { } protected void authenticate() throws IOException { - StringBuilder stanza = new StringBuilder(); - stanza.append(""); - stanza.append(""); - // Send the authentication to the server - getSASLAuthentication().send(stanza.toString()); + getSASLAuthentication().send(new AuthMechanism(getName(), null)); } public void challengeReceived(String challenge) throws IOException { // Build the challenge response stanza encoding the response text - StringBuilder stanza = new StringBuilder(); - stanza.append(""); - stanza.append("="); - stanza.append(""); - - // Send the authentication to the server - getSASLAuthentication().send(stanza.toString()); + // and send the authentication to the server + getSASLAuthentication().send(new Response()); }