ObjXMPP  Diff

Differences From Artifact [7679e224b3]:

To Artifact [dc3dcbf9b8]:


234
235
236
237
238
239
240
241

242
243
244
245
246
247
248
234
235
236
237
238
239
240

241
242
243
244
245
246
247
248







-
+







	OFEnumerator *enumerator;
	OFString *domainToASCII;
	char *cDomainToASCII;
	Idna_rc rc;

	if (server)
		[sock connectToHost: server
			     onPort: port];
			       port: port];
	else {
		if ((rc = idna_to_ascii_8z([domain cString], &cDomainToASCII,
		    IDNA_USE_STD3_ASCII_RULES)) != IDNA_SUCCESS)
			@throw [XMPPIDNATranslationFailedException
				newWithClass: isa
				  connection: self
				   operation: @"ToASCII"
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
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







-
+














-
+







			SRVLookup = [XMPPSRVLookup
			    lookupWithDomain: domainToASCII];
			enumerator = [SRVLookup objectEnumerator];

			while ((candidate = [enumerator nextObject]) != nil) {
				@try {
					[sock connectToHost: [candidate target]
						     onPort: [candidate port]];
						       port: [candidate port]];
					break;
				} @catch (OFAddressTranslationFailedException
				    *e) {
					[e release];
				} @catch (OFConnectionFailedException *e) {
					[e release];
				}
			}
		} @catch (OFAddressTranslationFailedException *e) {
			[e release];
		}

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

	[self XMPP_startStream];

	[pool release];
}