Index: db.scm ================================================================== --- db.scm +++ db.scm @@ -1121,10 +1121,12 @@ #f ;; no path - fail! (let ((calling-path (car remparam))) (if (equal? calling-path *toppath*) #t ;; path matches - pass! Should vet the caller at this time ... #f)))) ;; else fail to login + ((flush) + ( (else (mutex-lock! *incoming-mutex*) (set! *last-db-access* (current-seconds)) (set! *incoming-data* (cons (vector qry-name Index: server.scm ================================================================== --- server.scm +++ server.scm @@ -127,15 +127,15 @@ exn (begin (debug:print 0 "ERROR: Failed to open a connection to the server at host: " host " port: " port) (debug:print 0 " EXCEPTION: " ((condition-property-accessor 'exn 'message) exn)) (set! *runremote* #f)) - (if (and (not (args:get-arg "-server")) ;; no point in the server using the server using the server - ((rpc:procedure 'server:login host portn) *toppath*)) + (if (and (connect-socket zmq-socket hostinfo) + (cdb:client-call zmq-socket 'login #t *toppath*)) (begin (debug:print-info 2 "Logged in and connected to " host ":" port) - (set! *runremote* (vector host portn))) + (set! *runremote* zmq-socket)) (begin (debug:print-info 2 "Failed to login or connect to " host ":" port) (set! *runremote* #f))))) (debug:print-info 2 "no server available")))))