Index: rmt.scm ================================================================== --- rmt.scm +++ rmt.scm @@ -233,15 +233,29 @@ res)) (define (rmt:send-receive-no-auto-client-setup connection-info cmd run-id params) (let* ((run-id (if run-id run-id 0)) ;; (jparams (db:obj->string params)) ;; (rmt:dat->json-str params)) - (res (handle-exceptions - exn - #f - (http-transport:client-api-send-receive run-id connection-info cmd params)))) -;; ((commfail) (vector #f "communications fail"))))) + (res (case (rmt:run-id->transport-type run-id) + ((http) + (handle-exceptions + exn + #f + (http-transport:client-api-send-receive run-id connection-info cmd params))) + ((rpc) + (handle-exceptions + exn + #f + (rpc-transport:client-api-send-receive run-id connection-info cmd params))) + (else + (debug:print-error 0 *default-log-port* "(4) Transport [" *transport-type* + "] specified for run-id [" run-id + "] is not implemented in rmt:send-receive-no-auto-client-setup. Cannot proceed.") + (exit 1))))) + + + ;; ((commfail) (vector #f "communications fail"))))) (if (and res (vector-ref res 0)) (vector-ref res 1) ;;; YES!! THIS IS CORRECT!! CHANGE IT HERE, THEN CHANGE rmt:send-receive ALSO!!! #f))) ;; (db:string->obj (vector-ref dat 1)) ;; (begin @@ -284,17 +298,11 @@ ;; This login does no retries under the hood - it acts a bit like a ping. ;; Deprecated for nmsg-transport. ;; (define (rmt:login-no-auto-client-setup connection-info run-id) - (case (rmt:run-id->transport-type run-id) - ((http)(rmt:send-receive-no-auto-client-setup connection-info 'login run-id (list *toppath* megatest-version run-id *my-client-signature*))) - (else - (debug:print-error 0 *default-log-port* "(4) Transport [" *transport-type* - "] specified for run-id [" run-id - "] is not implemented in rmt:send-receive. Cannot proceed.") - (exit 1)))) + (rmt:send-receive-no-auto-client-setup connection-info 'login run-id (list *toppath* megatest-version run-id *my-client-signature*))) ;; hand off a call to one of the db:queries statements ;; added run-id to make looking up the correct db possible ;; (define (rmt:general-call stmtname run-id . params) Index: rpc-transport.scm ================================================================== --- rpc-transport.scm +++ rpc-transport.scm @@ -256,11 +256,14 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; this client-side procedure makes rpc call to server and returns result ;; (define (rpc-transport:client-api-send-receive run-id serverdat cmd params #!key (numretries 3)) (if (not (vector? serverdat)) - (BB> "WHAT?? for run-id="run-id", serverdat="serverdat)) + (begin + (BB> "WHAT?? for run-id="run-id", serverdat="serverdat) + (print-call-chain) + (exit 1))) (let* ((iface (rpc-transport:server-dat-get-iface serverdat)) (port (rpc-transport:server-dat-get-port serverdat)) (res #f) (api-exec (rpc-transport:get-api-exec iface port)) (send-receive (lambda () @@ -392,11 +395,11 @@ (set! db *inmemdb*) (debug:print 0 *default-log-port* "Server started on " host:port) - (thread-sleep! 4) + (thread-sleep! 5) (if (rpc-transport:self-test run-id ipaddrstr portnum) (debug:print 0 *default-log-port* "INFO: rpc self test passed!") (begin (debug:print 0 *default-log-port* "Error: rpc listener did not pass self test. Shutting down. On: " host:port) (exit)))