178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
|
[_domain release];
[super dealloc];
}
- (void)XMPP_lookup
{
OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
unsigned char *answer = NULL;
size_t pageSize = [OFSystemInfo pageSize];
OFString *request;
request = [OFString stringWithFormat: @"_xmpp-client._tcp.%@", _domain];
@try {
|
|
|
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
|
[_domain release];
[super dealloc];
}
- (void)XMPP_lookup
{
void *pool = objc_autoreleasePoolPush();
unsigned char *answer = NULL;
size_t pageSize = [OFSystemInfo pageSize];
OFString *request;
request = [OFString stringWithFormat: @"_xmpp-client._tcp.%@", _domain];
@try {
|
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
|
} @finally {
[self freeMemory: answer];
#ifdef HAVE_RES_NDESTROY
res_ndestroy(&_resState);
#endif
}
[pool release];
}
- (void)XMPP_addEntry: (XMPPSRVEntry *)entry
{
OFAutoreleasePool *pool;
OFList *subList;
of_list_object_t *iter;
/* Look if there already is a list with the priority */
for (iter = [_list firstListObject]; iter != NULL; iter = iter->next) {
XMPPSRVEntry *first = [iter->object firstObject];
|
|
|
|
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
|
} @finally {
[self freeMemory: answer];
#ifdef HAVE_RES_NDESTROY
res_ndestroy(&_resState);
#endif
}
objc_autoreleasePoolPop(pool);
}
- (void)XMPP_addEntry: (XMPPSRVEntry *)entry
{
void *pool = objc_autoreleasePoolPush();
OFList *subList;
of_list_object_t *iter;
/* Look if there already is a list with the priority */
for (iter = [_list firstListObject]; iter != NULL; iter = iter->next) {
XMPPSRVEntry *first = [iter->object firstObject];
|
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
|
}
/* We can't have one if the priority is already bigger */
if ([first 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];
}
- (OFEnumerator *)objectEnumerator
{
return [[[XMPPSRVEnumerator alloc] initWithList: _list] autorelease];
}
@end
|
<
<
|
|
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
|
}
/* We can't have one if the priority is already bigger */
if ([first priority] > [entry priority])
break;
}
subList = [OFList list];
[subList appendObject: entry];
if (iter != NULL)
[_list insertObject: subList
beforeListObject: iter];
else
[_list appendObject: subList];
objc_autoreleasePoolPop(pool);
}
- (OFEnumerator *)objectEnumerator
{
return [[[XMPPSRVEnumerator alloc] initWithList: _list] autorelease];
}
@end
|