Don't throw an exception if SRV records don't exist
This commit is contained in:
parent
901108dd1c
commit
0761f45bf4
1 changed files with 5 additions and 1 deletions
|
@ -216,11 +216,15 @@
|
||||||
answerLen = res_nsearch(&resState, [request cString], ns_c_in,
|
answerLen = res_nsearch(&resState, [request cString], ns_c_in,
|
||||||
ns_t_srv, answer, (int)of_pagesize);
|
ns_t_srv, answer, (int)of_pagesize);
|
||||||
|
|
||||||
if (answerLen < 1 || answerLen > of_pagesize)
|
if ((answerLen == -1) && (h_errno == HOST_NOT_FOUND))
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (answerLen < 1 || answerLen > of_pagesize) {
|
||||||
@throw [OFAddressTranslationFailedException
|
@throw [OFAddressTranslationFailedException
|
||||||
newWithClass: isa
|
newWithClass: isa
|
||||||
socket: nil
|
socket: nil
|
||||||
host: domain];
|
host: domain];
|
||||||
|
}
|
||||||
|
|
||||||
if (ns_initparse(answer, answerLen, &handle))
|
if (ns_initparse(answer, answerLen, &handle))
|
||||||
@throw [OFAddressTranslationFailedException
|
@throw [OFAddressTranslationFailedException
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue