From fbe77866c556f90978a04c05fb7448e712d31a04 Mon Sep 17 00:00:00 2001 From: Gaston Dombiak Date: Tue, 13 Sep 2005 19:43:22 +0000 Subject: [PATCH] Allow to send empty responses. git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2815 b35dd754-fafc-0310-a699-88a17e54d16e --- source/org/jivesoftware/smack/sasl/SASLMechanism.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/org/jivesoftware/smack/sasl/SASLMechanism.java b/source/org/jivesoftware/smack/sasl/SASLMechanism.java index d42375f4e..2b775456a 100644 --- a/source/org/jivesoftware/smack/sasl/SASLMechanism.java +++ b/source/org/jivesoftware/smack/sasl/SASLMechanism.java @@ -79,7 +79,9 @@ public abstract class SASLMechanism { StringBuffer stanza = new StringBuffer(); stanza.append(""); String authenticationText = getChallengeResponse(StringUtils.decodeBase64(challenge)); - stanza.append(StringUtils.encodeBase64(authenticationText)); + if (authenticationText != null) { + stanza.append(StringUtils.encodeBase64(authenticationText)); + } stanza.append(""); // Send the authentication to the server