ObjXMPP  Check-in [c59cefc261]

Overview
Comment:Don't leak the old socket when using STARTTLS.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: c59cefc2612cf5247d064e37bf0d12f7fdd8d78a0cbc08abb41fed2398f34676
User & Date: js on 2011-04-02 14:07:49
Other Links: manifest | tags
Context
2011-04-03
11:48
Add two delegates for TLS upgrades.
This way, an OFStreamObserver can be used even with TLS.
check-in: 1faf025f1a user: js tags: trunk
2011-04-02
14:07
Don't leak the old socket when using STARTTLS. check-in: c59cefc261 user: js tags: trunk
2011-04-01
02:26
Add -[socket] to XMPPConnection. check-in: 9e5a047eec user: js tags: trunk
Changes

Modified src/XMPPConnection.m from [08a8e3a88e] to [bba441d31e].

342
343
344
345
346
347
348

349


350
351
352
353
354
355
356

		assert(0);
	}

	if ([[elem namespace] isEqual: XMPP_NS_STARTTLS]) {
		if ([[elem name] isEqual: @"proceed"]) {
			/* FIXME: Catch errors here */

			sock = [[SSLSocket alloc] initWithSocket: sock];



			/* Stream restart */
			[parser setDelegate: self];
			[self XMPP_startStream];
			return;
		}








>
|
>
>







342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359

		assert(0);
	}

	if ([[elem namespace] isEqual: XMPP_NS_STARTTLS]) {
		if ([[elem name] isEqual: @"proceed"]) {
			/* FIXME: Catch errors here */
			SSLSocket *newSock = [[SSLSocket alloc]
			    initWithSocket: sock];
			[sock release];
			sock = newSock;

			/* Stream restart */
			[parser setDelegate: self];
			[self XMPP_startStream];
			return;
		}