From dc396f800b11fc9aa4bae07df268ad51a2740d8b Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sat, 29 May 2021 14:59:42 -0700 Subject: hostattrs accessors: call PREPROCESS-HOST in some situations Signed-off-by: Sean Whitton --- src/host.lisp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/host.lisp') diff --git a/src/host.lisp b/src/host.lisp index acda791..a449d3c 100644 --- a/src/host.lisp +++ b/src/host.lisp @@ -80,6 +80,10 @@ attributes, so that implementations of ESTABLISH-CONNECTION can push new attributes (typically to request prerequisite data) without disturbing host values higher up the call stack.")) +(defparameter *preprocessing-host* nil + "HOST value currently being preprocessed. +Used by GET-HOSTATTRS to break infinite loops.") + (defmethod preprocess-host ((host preprocessed-host)) (shallow-copy-host host)) @@ -87,7 +91,8 @@ values higher up the call stack.")) (let ((*host* (make-instance 'preprocessed-host :hostattrs (copy-list (hostattrs host)) - :propspec (preprocess-propspec (host-propspec host))))) + :propspec (preprocess-propspec (host-propspec host)))) + (*preprocessing-host* host)) (propappattrs (eval-propspec (host-propspec *host*))) *host*)) -- cgit v1.2.3