From 9041ade3335effa7c8acf178f84c5d9e2837e0c6 Mon Sep 17 00:00:00 2001 From: Niten Date: Wed, 11 Nov 2020 12:55:57 -0800 Subject: [PATCH] Ugh, wrong argument order...make keyword args --- backplane-dns.lisp | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/backplane-dns.lisp b/backplane-dns.lisp index b9aa6d7..78ddc3f 100644 --- a/backplane-dns.lisp +++ b/backplane-dns.lisp @@ -184,13 +184,14 @@ :mechanism :sasl-plain) (funcall f backplane))) -(defun backplane-dns-listen (xmpp-host - xmpp-username - xmpp-password - db-host - db-name - db-username - db-password) +(defun backplane-dns-listen (&key + xmpp-host + xmpp-username + xmpp-password + db-host + db-name + db-username + db-password) (postmodern:with-connection (list db-name db-username db-password db-host :use-ssl :try) (with-backplane xmpp-host xmpp-username xmpp-password (lambda (backplane) @@ -202,11 +203,11 @@ (defun start-listener-with-env () (backplane-dns-listen - (getenv-or-fail "FUDO_DNS_BACKPLANE_XMPP_HOSTNAME" "backplane.fudo.org") - (getenv-or-fail "FUDO_DNS_BACKPLANE_XMPP_USERNAME" "dns") - (read-file-line (getenv-or-fail "FUDO_DNS_BACKPLANE_XMPP_PASSWORD_FILE")) + :xmpp-host (getenv-or-fail "FUDO_DNS_BACKPLANE_XMPP_HOSTNAME") + :xmpp-username (getenv-or-fail "FUDO_DNS_BACKPLANE_XMPP_USERNAME") + :xmpp-password (read-file-line (getenv-or-fail "FUDO_DNS_BACKPLANE_XMPP_PASSWORD_FILE")) - (getenv-or-fail "FUDO_DNS_BACKPLANE_DATABASE_NAME" "pdns") - (getenv-or-fail "FUDO_DNS_BACKPLANE_DATABASE_USERNAME" "dns_backplane") - (getenv-or-fail "FUDO_DNS_BACKPLANE_DATABASE_HOSTNAME") - (read-file-line (getenv-or-fail "FUDO_DNS_BACKPLANE_DATABASE_PASSWORD_FILE")))) + :db-name (getenv-or-fail "FUDO_DNS_BACKPLANE_DATABASE_NAME") + :db-username (getenv-or-fail "FUDO_DNS_BACKPLANE_DATABASE_USERNAME") + :db-host (getenv-or-fail "FUDO_DNS_BACKPLANE_DATABASE_HOSTNAME") + :db-password (read-file-line (getenv-or-fail "FUDO_DNS_BACKPLANE_DATABASE_PASSWORD_FILE"))))