Megatest

Diff
Login

Differences From Artifact [47299d0079]:

To Artifact [68e1f7f6c8]:


206
207
208
209
210
211
212

213
214
215
216
217
218
219
220
221
222











223
224
225
226
227
228
229
206
207
208
209
210
211
212
213










214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231







+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+







    (if the-srv ;; yes, we have a server, now try connecting to it
	(let* ((srv-addr (server-address the-srv))
	       (ipaddr   (alist-ref 'ipaddr the-srv))
	       (port     (alist-ref 'port   the-srv))
	       (srvready (server-ready? ipaddr port))
	       (fullpath (db:dbname->path apath dbname)))
	  (if srvready
	      (begin
	      (hash-table-set! (rmt:remote-conns remote)
			       fullpath
			       (make-rmt:conn
				apath:   apath
				dbname:  dbname
				fullname: fullpath
				hostport: srv-addr
				lastmsg: (current-seconds)
				expires: (+ (current-seconds) 60) ;; this needs to be gathered during the ping
				))
		(hash-table-set! (rmt:remote-conns remote)
				 fullpath
				 (make-rmt:conn
				  apath:   apath
				  dbname:  dbname
				  fullname: fullpath
				  hostport: srv-addr
				  lastmsg: (current-seconds)
				  expires: (+ (current-seconds) 60) ;; this needs to be gathered during the ping
				  ))
		#t)
	      (start-main-srv)))
	(start-main-srv))))

;; NB// remote is a rmt:remote struct
;;
(define (rmt:general-open-connection remote apath dbname)
  (let  ((mainconn (rmt:get-connection remote apath (db:run-id->dbname #f))))