Adjust to ObjFW changes
This commit is contained in:
parent
781af5edef
commit
f82922df02
4 changed files with 12 additions and 14 deletions
|
@ -1,3 +1,3 @@
|
||||||
package_description 1
|
package_format 1
|
||||||
package_depends_on ObjOpenSSL
|
package_depends_on ObjOpenSSL
|
||||||
LIBS="-lobjxmpp $LIBS"
|
LIBS="-lobjxmpp $LIBS"
|
||||||
|
|
|
@ -297,9 +297,7 @@
|
||||||
|
|
||||||
- (void)resolver: (OFDNSResolver *)resolver
|
- (void)resolver: (OFDNSResolver *)resolver
|
||||||
didResolveDomainName: (OFString *)domainName
|
didResolveDomainName: (OFString *)domainName
|
||||||
answerRecords: (OFDictionary *)answerRecords
|
response: (OFDNSResponse *)response
|
||||||
authorityRecords: (OFDictionary *)authorityRecords
|
|
||||||
additionalRecords: (OFDictionary *)additionalRecords
|
|
||||||
exception: (id)exception
|
exception: (id)exception
|
||||||
{
|
{
|
||||||
OFMutableArray *records = [OFMutableArray array];
|
OFMutableArray *records = [OFMutableArray array];
|
||||||
|
@ -313,7 +311,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
for (OFDNSResourceRecord *record in
|
for (OFDNSResourceRecord *record in
|
||||||
[answerRecords objectForKey: domainName])
|
[response.answerRecords objectForKey: domainName])
|
||||||
if ([record isKindOfClass: [OFSRVDNSResourceRecord class]])
|
if ([record isKindOfClass: [OFSRVDNSResourceRecord class]])
|
||||||
[records addObject: record];
|
[records addObject: record];
|
||||||
|
|
||||||
|
@ -349,11 +347,12 @@
|
||||||
else {
|
else {
|
||||||
OFString *SRVDomain = [_domainToASCII
|
OFString *SRVDomain = [_domainToASCII
|
||||||
stringByPrependingString: @"_xmpp-client._tcp."];
|
stringByPrependingString: @"_xmpp-client._tcp."];
|
||||||
[[OFThread DNSResolver]
|
OFDNSRequest *request = [OFDNSRequest
|
||||||
asyncResolveHost: SRVDomain
|
requestWithHost: SRVDomain
|
||||||
recordClass: OF_DNS_RESOURCE_RECORD_CLASS_IN
|
recordClass: OF_DNS_RESOURCE_RECORD_CLASS_IN
|
||||||
recordType: OF_DNS_RESOURCE_RECORD_TYPE_SRV
|
recordType: OF_DNS_RESOURCE_RECORD_TYPE_SRV];
|
||||||
delegate: self];
|
[[OFThread DNSResolver] asyncPerformRequest: request
|
||||||
|
delegate: self];
|
||||||
}
|
}
|
||||||
|
|
||||||
objc_autoreleasePoolPop(pool);
|
objc_autoreleasePoolPop(pool);
|
||||||
|
|
|
@ -29,7 +29,6 @@
|
||||||
#import <ObjFW/OFDictionary.h>
|
#import <ObjFW/OFDictionary.h>
|
||||||
#import <ObjFW/OFNumber.h>
|
#import <ObjFW/OFNumber.h>
|
||||||
#import <ObjFW/OFData.h>
|
#import <ObjFW/OFData.h>
|
||||||
#import <ObjFW/OFAutoreleasePool.h>
|
|
||||||
|
|
||||||
#import <ObjFW/OFNotImplementedException.h>
|
#import <ObjFW/OFNotImplementedException.h>
|
||||||
|
|
||||||
|
@ -46,7 +45,7 @@
|
||||||
self = [super init];
|
self = [super init];
|
||||||
|
|
||||||
@try {
|
@try {
|
||||||
OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
|
void *pool = objc_autoreleasePoolPush();
|
||||||
|
|
||||||
_file = [file copy];
|
_file = [file copy];
|
||||||
@try {
|
@try {
|
||||||
|
@ -56,7 +55,7 @@
|
||||||
_data = [[OFMutableDictionary alloc] init];
|
_data = [[OFMutableDictionary alloc] init];
|
||||||
}
|
}
|
||||||
|
|
||||||
[pool release];
|
objc_autoreleasePoolPop(pool);
|
||||||
} @catch (id e) {
|
} @catch (id e) {
|
||||||
[self release];
|
[self release];
|
||||||
@throw e;
|
@throw e;
|
||||||
|
|
|
@ -208,7 +208,7 @@
|
||||||
|
|
||||||
- (OFData *)continueWithData: (OFData *)data
|
- (OFData *)continueWithData: (OFData *)data
|
||||||
{
|
{
|
||||||
OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
|
void *pool = objc_autoreleasePoolPush();
|
||||||
OFData *ret;
|
OFData *ret;
|
||||||
|
|
||||||
if (!_serverSignature)
|
if (!_serverSignature)
|
||||||
|
@ -217,7 +217,7 @@
|
||||||
ret = [self xmpp_parseServerFinalMessage: data];
|
ret = [self xmpp_parseServerFinalMessage: data];
|
||||||
|
|
||||||
[ret retain];
|
[ret retain];
|
||||||
[pool release];
|
objc_autoreleasePoolPop(pool);
|
||||||
|
|
||||||
return [ret autorelease];
|
return [ret autorelease];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue