From 1f0ba6b5339c5702ceb8c5d3f28d43ba883fc9b6 Mon Sep 17 00:00:00 2001 From: Jonathan Schleifer Date: Sat, 10 Sep 2011 18:17:35 +0200 Subject: [PATCH] Use an OFSet for mechanisms. --- src/XMPPConnection.m | 2 +- src/XMPPSCRAMAuth.m | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/XMPPConnection.m b/src/XMPPConnection.m index 0fac880..bae86d2 100644 --- a/src/XMPPConnection.m +++ b/src/XMPPConnection.m @@ -702,7 +702,7 @@ namespace: XMPP_NS_SESSION]; OFXMLElement *mechs = [element elementForName: @"mechanisms" namespace: XMPP_NS_SASL]; - OFMutableArray *mechanisms = [OFMutableArray array]; + OFMutableSet *mechanisms = [OFMutableSet set]; if (starttls != nil) { [self sendStanza: diff --git a/src/XMPPSCRAMAuth.m b/src/XMPPSCRAMAuth.m index 39b83e8..140e606 100644 --- a/src/XMPPSCRAMAuth.m +++ b/src/XMPPSCRAMAuth.m @@ -151,10 +151,12 @@ GS2Header = nil; if (authzid) - GS2Header = [[OFString alloc] initWithFormat: @"%@,a=%@,", - (plusAvailable ? @"p=tls-unique" : @"y"), authzid]; + GS2Header = [[OFString alloc] + initWithFormat: @"%@,a=%@,", + (plusAvailable ? @"p=tls-unique" : @"y"), + authzid]; else - GS2Header = plusAvailable ? @"p=tls-unique,," : @"y,,"; + GS2Header = (plusAvailable ? @"p=tls-unique,," : @"y,,"); [cNonce release]; cNonce = nil;