Adjust to recent ObjFW changes.
This commit is contained in:
parent
77543c786d
commit
a1645303f7
1 changed files with 4 additions and 3 deletions
|
@ -196,6 +196,7 @@
|
||||||
{
|
{
|
||||||
OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
|
OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
|
||||||
unsigned char *answer = NULL;
|
unsigned char *answer = NULL;
|
||||||
|
size_t pageSize = [OFSystemInfo pageSize];
|
||||||
OFString *request;
|
OFString *request;
|
||||||
|
|
||||||
request = [OFString stringWithFormat: @"_xmpp-client._tcp.%@", domain];
|
request = [OFString stringWithFormat: @"_xmpp-client._tcp.%@", domain];
|
||||||
|
@ -211,16 +212,16 @@
|
||||||
socket: nil
|
socket: nil
|
||||||
host: domain];
|
host: domain];
|
||||||
|
|
||||||
answer = [self allocMemoryWithSize: of_pagesize];
|
answer = [self allocMemoryWithSize: pageSize];
|
||||||
answerLen = res_nsearch(&resState,
|
answerLen = res_nsearch(&resState,
|
||||||
[request cStringUsingEncoding: OF_STRING_ENCODING_NATIVE],
|
[request cStringUsingEncoding: OF_STRING_ENCODING_NATIVE],
|
||||||
ns_c_in, ns_t_srv, answer, (int)of_pagesize);
|
ns_c_in, ns_t_srv, answer, (int)pageSize);
|
||||||
|
|
||||||
if ((answerLen == -1) && ((h_errno == HOST_NOT_FOUND) ||
|
if ((answerLen == -1) && ((h_errno == HOST_NOT_FOUND) ||
|
||||||
(h_errno == NO_DATA)))
|
(h_errno == NO_DATA)))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (answerLen < 1 || answerLen > of_pagesize) {
|
if (answerLen < 1 || answerLen > pageSize) {
|
||||||
@throw [OFAddressTranslationFailedException
|
@throw [OFAddressTranslationFailedException
|
||||||
exceptionWithClass: [self class]
|
exceptionWithClass: [self class]
|
||||||
socket: nil
|
socket: nil
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue