Commit 6c44d8b5 authored by Dave Cooper's avatar Dave Cooper

Merge branch 'feature/json' into devo

parents c286ab46 540b5895
......@@ -80,14 +80,14 @@
(let ((keys
(if *sort-children?*
(safe-sort (mapcar #'make-keyword
(funcall (glisp:intern (format nil "~a" cat) :gdl) class))
(funcall (glisp:intern (symbol-name cat) :gdl) class))
#'string<)
(mapcar #'make-keyword
(funcall (glisp:intern (format nil "~a" cat) :gdl) class)))))
(funcall (glisp:intern (symbol-name cat) :gdl) class)))))
keys)))
*message-categories*))
(otherwise (let ((messages (mapcar #'make-keyword
(funcall (glisp:intern (format nil "~a" category) :gdl) class))))
(funcall (glisp:intern (symbol-name category) :gdl) class))))
(mapcan #'(lambda(message)
(list message category))
messages))))))
......
......@@ -641,13 +641,7 @@ CL \"fround\" function.
(defmethod evaluate-object ((category t) args)
(cons (if (consp category)
(evaluate-object (first category) (rest category))
category)
(mapcar #'(lambda(arg)
(if (consp arg)
(evaluate-object (first arg) (rest arg))
arg)) args)))
nil)
(defun iso-8601-date (universal-time &key include-time?)
......
......@@ -37,8 +37,8 @@
;; any new requests while all this is happening...
;;
(glisp:w-o-interrupts
(let ((port (slot-value (wserver-socket *wserver*) 'socket::local-port)))
(when (>= port 1000)
(let ((port (server-port)))
(when (and port (>= port 1000))
(net.aserve:shutdown) (net.aserve:start :port port :listeners listeners)))
(mapc #'funcall (ensure-list extra-functions))
......
......@@ -169,7 +169,7 @@ the browser in development mode). Defaults to NIL (the empty list)."
;;
(full-url (when *wserver*
(format nil "http://localhost:~a~a"
(socket:local-port (net.aserve:wserver-socket net.aserve:*wserver*))
(server-port)
(the url))))
("String. The web address in the current session which points at this page. Published on demand."
......
......@@ -166,7 +166,7 @@ the browser in development mode). Defaults to NIL (the empty list)."
;;
(full-url (when *wserver*
(format nil "http://localhost:~a~a"
(socket:local-port (net.aserve:wserver-socket net.aserve:*wserver*))
(server-socket)
(the url))))
("String. The web address in the current session which points at this page. Published on demand."
......
......@@ -32,7 +32,7 @@
(setq *log-file* (format nil "/home/dcooper8/kitchen/logs-~a-~a.lisp"
(gwl::iso-time (get-universal-time))
(slot-value (slot-value server 'net.aserve::socket) 'socket::local-port)))
(server-port server)))
(glisp:process-run-function
"log-maker"
#'(lambda()
......
This diff is collapsed.
This diff is collapsed.
......@@ -31,7 +31,13 @@ A warning is given if an error condition occurs with <b>body</b>.
`(,(glisp:with-timeout-sym) (,timeout ,timeout-body) ,code)
code)))))))
(defun server-port (&optional (wserver net.aserve:*wserver*))
(when wserver
(let ((socket (net.aserve:wserver-socket wserver)))
(when socket
(glisp:local-port socket)))))
(defun announce-server-port ()
(let ((port (glisp:local-port (slot-value net.aserve:*wserver* 'net.aserve::socket))))
(let ((port (server-port)))
(when port
(format t "~&~%***** ~%Your Webserver is running on Port ~a.~%*****~%" port))))
......@@ -282,8 +282,8 @@
(defmethod encode-for-http ((self geometry-kernel-object-mixin))
(if (typep (the %parent%) 'remote-object)
(call-next-method)
(list :gdl-geometry-kernel-instance
:smlib-string (with-output-to-string(ss)(with-format (native ss) (write-the cad-output))))))
(construct-object-for-http :gdl-geometry-kernel-instance
(list :smlib-string (with-output-to-string(ss)(with-format (native ss) (write-the cad-output)))))))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment