minor bugfixes in concurrent lookup & error handling
This commit is contained in:
parent
470c2fbab3
commit
17a3dac645
|
@ -132,6 +132,7 @@
|
||||||
|
|
||||||
;; called by the error-handlers, prints out error descriptions
|
;; called by the error-handlers, prints out error descriptions
|
||||||
(define (dns-error-messages condition more)
|
(define (dns-error-messages condition more)
|
||||||
|
(display "dns-error: ")
|
||||||
(cond
|
(cond
|
||||||
((invalid-type? condition)
|
((invalid-type? condition)
|
||||||
(display "make-octet-question: invalid DNS query type\n"))
|
(display "make-octet-question: invalid DNS query type\n"))
|
||||||
|
@ -1015,12 +1016,13 @@
|
||||||
(release-lock lock)))))
|
(release-lock lock)))))
|
||||||
(map (lambda (adr32) (address32->ip-string adr32)) (dns-find-nameserver-list)))))
|
(map (lambda (adr32) (address32->ip-string adr32)) (dns-find-nameserver-list)))))
|
||||||
|
|
||||||
|
(obtain-lock lock)
|
||||||
(let loop ((count (length nameserver-list)))
|
(let loop ((count (length nameserver-list)))
|
||||||
(obtain-lock lock)
|
(if (not (queue-empty? queue))
|
||||||
(let ((result (dequeue! queue)))
|
(let ((result (dequeue! queue)))
|
||||||
(if (or result (= 1 (length nameserver-list)))
|
(if (or result (= 1 (length nameserver-list)))
|
||||||
result
|
result
|
||||||
(loop (- count 1)))))))
|
(loop (- count 1))))))))
|
||||||
|
|
||||||
;; checks the arguments of the simple lookup functions.
|
;; checks the arguments of the simple lookup functions.
|
||||||
;; if a nameserver-name is given and not a nameserver-ip
|
;; if a nameserver-name is given and not a nameserver-ip
|
||||||
|
|
Loading…
Reference in New Issue