ObjXMPP  Check-in [5027cc014a]

Overview
Comment:Fix mechanisms parsing
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 5027cc014af7ffee48b91a0f11d4e1599da123d0ef01c3fc05606a7ec9174a52
User & Date: florob@babelmonkeys.de on 2011-02-19 22:39:11
Other Links: manifest | tags
Context
2011-02-21
03:09
Add SCRAM-SHA-1 support check-in: 6a3b0a9988 user: florob@babelmonkeys.de tags: trunk
2011-02-19
22:39
Fix mechanisms parsing check-in: 5027cc014a user: florob@babelmonkeys.de tags: trunk
22:17
Adapt tests for checking a stanza's JID check-in: 8402175d15 user: florob@babelmonkeys.de tags: trunk
Changes

Modified src/XMPPConnection.m from [c09c538201] to [8f383aeac0].

282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
- (void)_handleFeatures: (OFXMLElement*)elem
{
	OFArray *mechs = [elem elementsForName: @"mechanisms"
				     namespace: NS_SASL];
	OFXMLElement *bind = [elem elementsForName: @"bind"
					 namespace: NS_BIND].firstObject;

	for (OFXMLElement *mech in mechs)
		[mechanisms addObject: mech.name];

	if ([mechanisms containsObject: @"PLAIN"])
		[self _sendPLAINAuth];

	if (bind != nil)
		[self _sendResourceBind];
}







|
|







282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
- (void)_handleFeatures: (OFXMLElement*)elem
{
	OFArray *mechs = [elem elementsForName: @"mechanisms"
				     namespace: NS_SASL];
	OFXMLElement *bind = [elem elementsForName: @"bind"
					 namespace: NS_BIND].firstObject;

	for (OFXMLElement *mech in [mechs.firstObject children])
		[mechanisms addObject: [mech.children.firstObject stringValue]];

	if ([mechanisms containsObject: @"PLAIN"])
		[self _sendPLAINAuth];

	if (bind != nil)
		[self _sendResourceBind];
}