ObjXMPP  Check-in [1420288ed7]

Overview
Comment:Make use of -[OFXMLElement setStringValue:].
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 1420288ed7d8b9c136a10c3f177a0a675e9c79d398dcaa14b46e08864a35165c
User & Date: js on 2011-10-04 12:54:49
Other Links: manifest | tags
Context
2011-10-24
18:32
Don't retain the delegate to prevent a reference cycle. check-in: 3d540fd517 user: js tags: trunk
2011-10-04
12:54
Make use of -[OFXMLElement setStringValue:]. check-in: 1420288ed7 user: js tags: trunk
2011-09-22
23:38
Adjust to recent ObjFW changes. check-in: a6c65a6aa2 user: js tags: trunk
Changes

Modified src/XMPPConnection.m from [2cc82e5d61] to [19e1471872].

617
618
619
620
621
622
623
624
625


626
627
628

629
630
631

632
633

634
635
636
637
638
639
640
617
618
619
620
621
622
623


624
625
626
627

628

629

630


631
632
633
634
635
636
637
638







-
-
+
+


-
+
-

-
+
-
-
+







	if ([[element name] isEqual: @"challenge"]) {
		OFXMLElement *responseTag;
		OFDataArray *challenge = [OFDataArray
		    dataArrayWithBase64EncodedString: [element stringValue]];
		OFDataArray *response = [authModule
		    continueWithData: challenge];

		responseTag = [OFXMLElement  elementWithName: @"response"
						   namespace: XMPP_NS_SASL];
		responseTag = [OFXMLElement elementWithName: @"response"
						  namespace: XMPP_NS_SASL];
		if (response) {
			if ([response count] == 0)
				[responseTag addChild: [OFXMLElement
				[responseTag setStringValue: @"="];
				    elementWithCharacters: @"="]];
			else
				[responseTag addChild: [OFXMLElement
				[responseTag setStringValue:
				    elementWithCharacters: [response
					stringByBase64Encoding]]];
				    [response stringByBase64Encoding]];
		}

		[self sendStanza: responseTag];
		return;
	}

	if ([[element name] isEqual: @"success"]) {
791
792
793
794
795
796
797
798

799
800
801
802


803
804
805
806
807
808
809
789
790
791
792
793
794
795

796

797


798
799
800
801
802
803
804
805
806







-
+
-

-
-
+
+








	authTag = [OFXMLElement elementWithName: @"auth"
				      namespace: XMPP_NS_SASL];
	[authTag addAttributeWithName: @"mechanism"
			  stringValue: authName];
	if (initialMessage) {
		if ([initialMessage count] == 0)
			[authTag addChild: [OFXMLElement
			[authTag setStringValue: @"="];
			    elementWithCharacters: @"="]];
		else
			[authTag addChild: [OFXMLElement elementWithCharacters:
			    [initialMessage stringByBase64Encoding]]];
			[authTag setStringValue:
			    [initialMessage stringByBase64Encoding]];
	}

	[self sendStanza: authTag];
}

- (void)XMPP_sendResourceBind
{