Index: megatest.scm ================================================================== --- megatest.scm +++ megatest.scm @@ -346,12 +346,12 @@ (debug:print 0 "WARNING: -itempatt has been deprecated, please use -testpatt testpatt/itempatt method, new testpatt is "newval) (hash-table-set! args:arg-hash "-testpatt" newval) (hash-table-delete! args:arg-hash "-itempatt"))) (on-exit (lambda () - (if *megatest-db* - (db:close-all *megatest-db*)))) + (if *dbstruct-db* (db:close-all *dbstruct-db*)) + (if *megatest-db* (sqlite3:finalize! *megatest-db*)))) ;;====================================================================== ;; Misc general calls ;;====================================================================== Index: rmt.scm ================================================================== --- rmt.scm +++ rmt.scm @@ -86,14 +86,14 @@ (debug:print-info 4 "no server and read-only query, bypassing normal channel") (rmt:open-qry-close-locally cmd run-id params))))) (define (rmt:open-qry-close-locally cmd run-id params) (let* ((dbdir (conc (configf:lookup *configdat* "setup" "linktree") "/.db")) - (dbstruct-local (if *megatest-db* - *megatest-db* + (dbstruct-local (if *dbstruct-db* + *dbstruct-db* (let ((db (make-dbr:dbstruct path: dbdir local: #t))) - (set! *megatest-db* db) + (set! *dbstruct-db* db) db))) (db-file-path (db:dbfile-path 0)) ;; (read-only (not (file-read-access? db-file-path))) (res (api:execute-requests dbstruct-local (symbol->string cmd) params))) ;; (db:close-all dbstruct-local)