Index: common.scm ================================================================== --- common.scm +++ common.scm @@ -2320,11 +2320,16 @@ ;; Manage pkts, used in servers, tests and likely other contexts so put ;; in common ;;====================================================================== (define common:pkts-spec - '((default . ((parent . P))) + '((default . ((parent . P) + (action . a) + (filename . f))) + (configf . ((parent . P) + (action . a) + (filename . f))) (server . ((action . a) (pid . d) (ipaddr . i) (port . p) (parent . P))) @@ -2348,11 +2353,11 @@ (string-split pktsdirs-str " ") #f))) pktsdirs)) (define (common:save-pkt pktalist-in mtconf use-lt #!key (add-only #f)) ;; add-only saves the pkt only if there is a parent already - (if (or (not add-only) + (if (or add-only (hash-table-exists? *pkts-info* 'last-parent)) (let* ((parent (hash-table-ref/default *pkts-info* 'last-parent #f)) (pktalist (if parent (cons `(parent . ,parent) pktalist-in) Index: configf.scm ================================================================== --- configf.scm +++ configf.scm @@ -229,11 +229,12 @@ (sections #f) (settings (make-hash-table)) (keep-filenames #f) (post-section-procs '()) (apply-wildcards #t)) (debug:print 9 *default-log-port* "START: " path) (if *configdat* (common:save-pkt `((action . read-config) - (f . path)) + (f . ,path) + (T . configf)) *configdat* #t add-only: #t)) (if (and (not (port? path)) (not (file-exists? path))) ;; for case where we are handed a port (begin (debug:print-info 1 *default-log-port* "read-config - file not found " path " current path: " (current-directory)) Index: mtut.scm ================================================================== --- mtut.scm +++ mtut.scm @@ -1001,11 +1001,11 @@ (mtconf (car mtconfdat))) (common:load-pkts-to-db mtconf use-lt: #t) ;; need to NOT do this by default ... (common:with-queue-db mtconf (lambda (pktsdirs pktsdir conn) - (make-report "out.dot" conn common:pkts-spec '(action ipaddr port) )) + (make-report "out.dot" conn common:pkts-spec '(action ipaddr port filename) )) use-lt: #t))) ((db) (if (null? remargs) (print "ERROR: missing sub command for db command") (let ((subcmd (car remargs)))