Small repairs to get the code running again with mainline syndicate-rkt

This commit is contained in:
Tony Garnock-Jones 2024-05-27 15:48:48 +02:00
parent 4dc546d0c6
commit cdbe97e0a3
2 changed files with 8 additions and 4 deletions

View File

@ -10,6 +10,7 @@
(require syndicate/driver-support)
(require syndicate/dataspace)
(require syndicate/pattern)
(require syndicate/smart-pattern)
(require (only-in racket/port peek-bytes-avail!-evt))
(require "cook-port.rkt")
@ -75,8 +76,11 @@
(define (auth-method m f)
(assert (SshAuthenticationMethodAcceptable m))
(during (Observe (:pattern (SshAuthenticationAcceptable m ,(DLit $r) ,_)) _)
(assert (SshAuthenticationAcceptable m r (f (parse-SshAuthRequest r))))))
(during (Observe (:pattern (SshAuthenticationAcceptable m ,$r0 ,_)) _)
(define r1 (parse-Pattern r0))
(when (not (eof-object? r1))
(define r (literal-pattern->literal r1))
(assert (SshAuthenticationAcceptable m r (f (parse-SshAuthRequest r)))))))
(auth-method (SshAuthMethod-none)
(match-lambda [(SshAuthRequest-none "guest") #t]

View File

@ -274,8 +274,8 @@
(send! conn-ds (ssh-identification-line remote-identification))
(stop-facet identification-line-timeout-facet)
(update-input-handler #:on-data handle-packet-header)))
(define identification-line-timeout-facet
(at ground-ds
(at ground-ds
(define identification-line-timeout-facet
(once [(timeout 10000)
(log-info "Timeout waiting for remote-identification")
(stop-current-facet)])))