Index: common.scm ================================================================== --- common.scm +++ common.scm @@ -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?) Index: rmt.scm ================================================================== --- rmt.scm +++ rmt.scm @@ -58,11 +58,11 @@ ;; (mutex-lock! *db-multi-sync-mutex*) ;; 1. check if server is started IFF cmd is a write OR if we are not on the homehost, store in *runremote* ;; 2. check the age of the connections. refresh the connection if it is older than timeout-20 seconds. ;; 3. do the query, if on homehost use local access - + ;; (if (and #f ;; FORCE NO GO FOR RIGHT NOW (not *runremote*) ;; we trust *runremote* to reflect that a server was found previously (not (member cmd api:read-only-queries))) ;; we don't trust so much the list of write queries (let ((serverconn (server:check-if-running *toppath*))) (if serverconn