Index: apimod.scm ================================================================== --- apimod.scm +++ apimod.scm @@ -293,6 +293,6 @@ ;; res ;; (list "ERROR, not string, list, number or boolean" 1 cmd params res))))) (db:obj->string res transport: 'http))) -) +) Index: rmtmod.scm ================================================================== --- rmtmod.scm +++ rmtmod.scm @@ -105,15 +105,17 @@ "main.db" (conc rid ".db"))) (dbfile (conc areapath "/.db/" dbfname)) (udata (alldat-ulexdat alldat)) (ulexconn (rmt:connect alldat dbfname dbtype))) ;; ulexconn is our new *runremote*, it is a dbowner struct < pdat lastrefresh > + (ulex:remote-request udata ulexconn 'immediate dbfile 'execute rid params))) ;; need to call this on the other side ;; (api:execute-requests dbstruct-local (vector (symbol->string cmd) params)))) - (with-input-from-string + + #;(with-input-from-string (ulex:remote-request udata ulexconn 'immediate dbfile 'execute rid (with-output-to-string (lambda ()(serialize params)))) - (lambda ()(deserialize))))) + (lambda ()(deserialize))) #;(rmt:open-qry-close-locally cmd 0 params) ;; ;; ;; #;(common:telemetry-log (conc "rmt:"(->string cmd)) Index: ulex/ulex.scm ================================================================== --- ulex/ulex.scm +++ ulex/ulex.scm @@ -487,15 +487,15 @@ (let ((res (if (and inp oup) (let* () (if my-host-port (begin - (write-line dat oup) - (write-line data oup) + (write dat oup) + (write data oup) ;; send as sexpr ;; (print "Sent dat: " dat " data: " data) (if retval - (read-line inp) + (read inp) #t)) (begin (print "ERROR: send called but no receiver has been setup. Please call setup first!") #f)) ;; NOTE: DO NOT BE TEMPTED TO LOOK AT ANY DATA ON INP HERE! @@ -606,14 +606,14 @@ ;; data comes as two lines ;; handlerkey resp-addr:resp-port hostname pid qrykey [dbpath/dbfile.db] ;; data (let loop ((state 'start)) (let-values (((inp oup)(tcp-accept serv-listener))) - (let* ((controldat (read-line inp)) - (data (read-line inp)) + (let* ((controldat (read inp)) + (data (read inp)) (resp (ulex-handler udata controldat data))) - (if resp (write-line resp oup)) + (if resp (write resp oup)) (close-input-port inp) (close-output-port oup)) (loop state))))) ;; add a proc to the handler list, these are done symetrically (i.e. in all instances)