ObjXMPP  Diff

Differences From Artifact [ad06d62613]:

To Artifact [56c6a8e995]:


194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217

218
219
220

221
222
223
224
225
226
227
	return [[password copy] autorelease];
}

- (void)connect
{
	OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
	XMPPSRVEnumerator *SRVEnumerator =
		[XMPPSRVEnumerator enumeratorWithDomain: server];
	XMPPSRVEntry *candidate;

	while ((candidate = [SRVEnumerator nextObject])) {
		@try {
			[sock connectToHost: [candidate target]
				     onPort: [candidate port]];
			break;
		} @catch (id e) {
			if (([e class] == [OFAddressTranslationFailedException
					class]) || ([e class] ==
					[OFConnectionFailedException class]))
				continue;
			else
				@throw e;
		}
	}

	if (!candidate)
		[sock connectToHost: server
			     onPort: port];

	[self XMPP_startStream];

	[pool release];
}

- (void)handleConnection
{







|


|




<
|
|
|
<
|
<


>



>







194
195
196
197
198
199
200
201
202
203
204
205
206
207
208

209
210
211

212

213
214
215
216
217
218
219
220
221
222
223
224
225
226
	return [[password copy] autorelease];
}

- (void)connect
{
	OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
	XMPPSRVEnumerator *SRVEnumerator =
	    [XMPPSRVEnumerator enumeratorWithDomain: server];
	XMPPSRVEntry *candidate;

	while ((candidate = [SRVEnumerator nextObject]) != nil) {
		@try {
			[sock connectToHost: [candidate target]
				     onPort: [candidate port]];
			break;

		} @catch (OFAddressTranslationFailedException *e) {
			[e release];
		} @catch (OFConnectionFailedException *e) {

			[e release];

		}
	}

	if (!candidate)
		[sock connectToHost: server
			     onPort: port];

	[self XMPP_startStream];

	[pool release];
}

- (void)handleConnection
{