minor bugfixes in concurrent lookup & error handling

This commit is contained in:
cresh 2002-07-08 09:13:56 +00:00
parent 470c2fbab3
commit 17a3dac645
1 changed files with 7 additions and 5 deletions

View File

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