514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
|
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
|
-
+
+
+
+
|
((equal? (list-ref (car servers) 6) ;; compare the servinfofile
(tt-servinf-file ttdat))
(let* ((res (if db-locked-in
#t
(let* ((success (dbfile:with-no-sync-db
nosyncdbpath
(lambda (db)
(db:no-sync-get-lock-with-id db dbfname (tt-servinf-file ttdat))))))
(db:no-sync-get-lock-with-id db dbfname
;; (tt-servinf-file ttdat) ;; does NOT work, must be unique to the dbname which seems silly but makes sense!
areapath ;; as good as anything
)))))
(if success
(begin
(tt-state-set! ttdat 'running)
(debug:print 0 *default-log-port* "Got server lock for "
dbfname)
(set! db-locked-in #t)
#t)
|