@@ -810,11 +810,11 @@ ;; logic for getting homehost. Returns (host . at-home) ;; IF *toppath* is not set, wait up to five seconds trying every two seconds ;; (this is to accomodate the watchdog) ;; (define (common:get-homehost #!key (trynum 5)) - ;; called often especially at start up. use the launch setup mutex to eliminate collisions + ;; called often especially at start up. use mutex to eliminate collisions (mutex-lock! *homehost-mutex*) (cond (*home-host* (mutex-unlock! *homehost-mutex*) *home-host*) @@ -825,11 +825,10 @@ (begin (thread-sleep! 2) (common:get-homehost trynum: (- trynum 1))) #f)) (else - (mutex-unlock! *homehost-mutex*) (let* ((currhost (get-host-name)) (bestadrs (server:get-best-guess-address currhost)) ;; first look in config, then look in file .homehost, create it if not found (homehost (or (configf:lookup *configdat* "server" "homehost" ) (let ((hhf (conc *toppath* "/.homehost"))) @@ -843,10 +842,11 @@ (common:get-homehost)) #f))))) (at-home (or (equal? homehost currhost) (equal? homehost bestadrs)))) (set! *home-host* (cons homehost at-home)) + (mutex-unlock! *homehost-mutex*) *home-host*)))) ;; am I on the homehost? ;; (define (common:on-homehost?)