diff options
-rw-r--r-- | src/bgpstore.lisp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/bgpstore.lisp b/src/bgpstore.lisp index 5abc348..c77844f 100644 --- a/src/bgpstore.lisp +++ b/src/bgpstore.lisp @@ -1,12 +1,15 @@ ;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*- +(defparameter *db-spec* '("linus" "linus" "" "localhost" )) + (defun start-bgpstore (host port) - (let ((reader (new-reader host port))) - (do ((e (next-xml-blurb reader "BGP_MESSAGE") - (next-xml-blurb reader "BGP_MESSAGE"))) - ((null e)) - (dolist (obj (new-entries (xml-top-elem-from-octets e))) - (insert-dao obj))) - (close-reader))) + (with-connection *db-spec* + (let ((reader (new-reader host port))) + (do ((e (next-xml-blurb reader "BGP_MESSAGE") + (next-xml-blurb reader "BGP_MESSAGE"))) + ((null e)) + (dolist (obj (new-entries (xml-top-elem-from-octets e))) + (insert-dao obj))) + (close-reader)))) (defun stop-bgpstore ()) |