From: Tim Vaughan Date: Sun, 5 May 2019 21:23:37 +0000 (+0200) Subject: Got rid of useless ip address arg in query procedures. X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?a=commitdiff_plain;h=4bb715363eff4e534a3ccbb1981401118dfa234d;p=scratchy.git Got rid of useless ip address arg in query procedures. --- diff --git a/burrower.scm b/burrower.scm index 581ea9c..69fafbc 100644 --- a/burrower.scm +++ b/burrower.scm @@ -55,7 +55,7 @@ (serve-selector (if (= (string-length selector) 0) "/" selector) - remote-ip config))) + config))) (print "... served selector '" selector "'. Closing connection.")) (o (exn) (print-error-message o out-port) @@ -88,14 +88,14 @@ ;;; Selector retrieval -(define (serve-selector raw-selector remote-ip config) +(define (serve-selector raw-selector config) (let* ((selector-list (string-split raw-selector "\t")) (selector (car selector-list)) (arguments (cdr selector-list))) (case (infer-selector-type selector) ((1) (serve-directory selector config)) ((0) (serve-text-file selector config)) - ((7) (serve-query selector arguments remote-ip config)) + ((7) (serve-query selector arguments config)) (else (serve-binary-file selector config))))) (define (serve-directory selector config) @@ -144,7 +144,7 @@ (loop (read-byte))))))) (error "File not found." file-name)))) -(define (serve-query selector arguments remote-ip config) +(define (serve-query selector arguments config) (let ((file-name (make-pathname (config-root-dir config) selector))) (if (and (regular-file? file-name) (= (length arguments) 1)) @@ -154,8 +154,7 @@ (with-selector-dir selector config (lambda () - (apply (eval (read)) - (list (car arguments) remote-ip))))))) + (apply (eval (read)) arguments)))))) (error "Invalid query." selector arguments))))