ObjXMPP  Diff

Differences From Artifact [f3533e40c3]:

To Artifact [0237e9a199]:


266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290

291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
		}

		/* We can't have one if the priority is already bigger */
		if ([[iter->object firstObject] priority] > [entry priority])
			break;
	}

	/* No list with the priority -> create one at the correct place */
	for (iter = [list firstListObject]; iter != NULL; iter = iter->next) {
		if ([[iter->object firstObject] priority] > [entry priority]) {
			OFAutoreleasePool *pool;

			pool = [[OFAutoreleasePool alloc] init];

			subList = [OFList list];

			/*
			 * RFC 2782 says those with weight 0 should be at the
			 * beginning of the list.
			 */
			if ([entry weight] > 0)
				[subList appendObject: entry];
			else
				[subList prependObject: entry];


			[list insertObject: subList
			  beforeListObject: iter];

			[pool release];

			return;
		}
	}

	/* There is no list with a bigger priority -> append */
	pool = [[OFAutoreleasePool alloc] init];

	subList = [OFList list];

	/*
	 * RFC 2782 says those with weight 0 should be at the beginning of the
	 * list.
	 */
	if ([entry weight] > 0)
		[subList appendObject: entry];
	else
		[subList prependObject: entry];

	[list appendObject: subList];

	[pool release];
}

- (id)nextObject
{
	XMPPSRVEntry *ret;







<
<
<
<
<
|

|
<
<
<
<
<
<
|
<
<

>
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

<
<
|







266
267
268
269
270
271
272





273
274
275






276


277
278
279
280


















281


282
283
284
285
286
287
288
289
		}

		/* We can't have one if the priority is already bigger */
		if ([[iter->object firstObject] priority] > [entry priority])
			break;
	}






	pool = [[OFAutoreleasePool alloc] init];

	subList = [OFList list];






	[subList appendObject: entry];



	if (iter != NULL)
		[list insertObject: subList
		  beforeListObject: iter];


















	else


		[list appendObject: subList];

	[pool release];
}

- (id)nextObject
{
	XMPPSRVEntry *ret;