ObjXMPP  Diff

Differences From Artifact [dc3dcbf9b8]:

To Artifact [1b284eeb7a]:


251
252
253
254
255
256
257
258
259
260
261



262

263






264
265
266
267
268
269
270
271
272
273
274

275
276
277
278
279
280
281
282
283
284
285
286
287
288
251
252
253
254
255
256
257




258
259
260
261
262

263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278

279


280




281
282
283
284
285
286
287







-
-
-
-
+
+
+

+
-
+
+
+
+
+
+










-
+
-
-

-
-
-
-







		@try {
			domainToASCII = [OFString
			    stringWithCString: cDomainToASCII];
		} @finally {
			free(cDomainToASCII);
		}

		@try {
			SRVLookup = [XMPPSRVLookup
			    lookupWithDomain: domainToASCII];
			enumerator = [SRVLookup objectEnumerator];
		SRVLookup = [XMPPSRVLookup
		    lookupWithDomain: domainToASCII];
		enumerator = [SRVLookup objectEnumerator];

		// If there are no SRV records connect via A/AAAA record
			while ((candidate = [enumerator nextObject]) != nil) {
		if ((candidate = [enumerator nextObject]) == nil)
			[sock connectToHost: domainToASCII
				       port: port];
		// Iterate over SRV records
		else {
			do {
				@try {
					[sock connectToHost: [candidate target]
						       port: [candidate port]];
					break;
				} @catch (OFAddressTranslationFailedException
				    *e) {
					[e release];
				} @catch (OFConnectionFailedException *e) {
					[e release];
				}
			}
			} while ((candidate = [enumerator nextObject]) != nil);
		} @catch (OFAddressTranslationFailedException *e) {
			[e release];
		}

		if (!candidate)
			[sock connectToHost: domainToASCII
				       port: port];
	}

	[self XMPP_startStream];

	[pool release];
}