Make use of -[OFXMLElement setStringValue:].

This commit is contained in:
Jonathan Schleifer 2011-10-04 14:54:49 +02:00
parent df5e8f04b4
commit 5a2f8ac0f4

View file

@ -621,16 +621,14 @@
OFDataArray *response = [authModule OFDataArray *response = [authModule
continueWithData: challenge]; continueWithData: challenge];
responseTag = [OFXMLElement elementWithName: @"response" responseTag = [OFXMLElement elementWithName: @"response"
namespace: XMPP_NS_SASL]; namespace: XMPP_NS_SASL];
if (response) { if (response) {
if ([response count] == 0) if ([response count] == 0)
[responseTag addChild: [OFXMLElement [responseTag setStringValue: @"="];
elementWithCharacters: @"="]];
else else
[responseTag addChild: [OFXMLElement [responseTag setStringValue:
elementWithCharacters: [response [response stringByBase64Encoding]];
stringByBase64Encoding]]];
} }
[self sendStanza: responseTag]; [self sendStanza: responseTag];
@ -795,11 +793,10 @@
stringValue: authName]; stringValue: authName];
if (initialMessage) { if (initialMessage) {
if ([initialMessage count] == 0) if ([initialMessage count] == 0)
[authTag addChild: [OFXMLElement [authTag setStringValue: @"="];
elementWithCharacters: @"="]];
else else
[authTag addChild: [OFXMLElement elementWithCharacters: [authTag setStringValue:
[initialMessage stringByBase64Encoding]]]; [initialMessage stringByBase64Encoding]];
} }
[self sendStanza: authTag]; [self sendStanza: authTag];