Fixed number of return values in generic-receive-message!

This commit is contained in:
mainzelm 2001-09-17 19:17:48 +00:00
parent cc84656633
commit a05217d045
1 changed files with 4 additions and 3 deletions

View File

@ -421,8 +421,9 @@
reader sockfd flags reader sockfd flags
s start end from)) s start end from))
(let ((addr (make-addr from))) (let ((addr (make-addr from)))
(let loop ((i start)) (let loop ((i start) (remote #f))
(if (>= i end) (- i start) (if (>= i end)
(values (- i start) remote)
(receive (err nread) (receive (err nread)
(reader sockfd flags s i end addr) (reader sockfd flags s i end addr)
(cond (err (if (= err errno/intr) (loop i) (cond (err (if (= err errno/intr) (loop i)
@ -435,7 +436,7 @@
(let ((result (- i start))) (let ((result (- i start)))
(and (not (zero? result)) result)) (and (not (zero? result)) result))
from)) from))
(else (loop (+ i nread))))))))) (else (loop (+ i nread) from))))))))
(define (receive-message/partial socket len . maybe-flags) (define (receive-message/partial socket len . maybe-flags)
(let ((flags (:optional maybe-flags 0))) (let ((flags (:optional maybe-flags 0)))