mailman3.common-lisp.net
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
List overview
Download
cl-xmpp-cvs
March 2007
----- 2024 -----
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
cl-xmpp-cvs@common-lisp.net
1 participants
3 discussions
Start a n
N
ew thread
[cl-xmpp-cvs] CVS cl-xmpp
by jstecklina
05 Mar '07
05 Mar '07
Update of /project/cl-xmpp/cvsroot/cl-xmpp In directory clnet:/tmp/cvs-serv497 Modified Files: cl-xmpp-tls.lisp cl-xmpp.lisp cxml.lisp Log Message: Removed stanza-handler. (Patch by David Lichteblau) --- /project/cl-xmpp/cvsroot/cl-xmpp/cl-xmpp-tls.lisp 2005/11/28 15:15:46 1.8 +++ /project/cl-xmpp/cvsroot/cl-xmpp/cl-xmpp-tls.lisp 2007/03/05 17:38:35 1.9 @@ -1,4 +1,4 @@ -;;;; $Id: cl-xmpp-tls.lisp,v 1.8 2005/11/28 15:15:46 eenge Exp $ +;;;; $Id: cl-xmpp-tls.lisp,v 1.9 2007/03/05 17:38:35 jstecklina Exp $ ;;;; $Source: /project/cl-xmpp/cvsroot/cl-xmpp/cl-xmpp-tls.lisp,v $ ;;;; See the LICENSE file for licensing information. @@ -48,9 +48,9 @@ (setf (server-stream connection) (cl+ssl:make-ssl-client-stream (server-stream connection) :external-format :iso-8859-1)) - (setf (server-xstream connection) nil) + (setf (server-source connection) nil) (when begin-xml-stream (begin-xml-stream connection)) (when receive-stanzas (receive-stanza connection) - (receive-stanza connection))) \ No newline at end of file + (receive-stanza connection))) --- /project/cl-xmpp/cvsroot/cl-xmpp/cl-xmpp.lisp 2007/03/04 04:26:23 1.30 +++ /project/cl-xmpp/cvsroot/cl-xmpp/cl-xmpp.lisp 2007/03/05 17:38:35 1.31 @@ -1,4 +1,4 @@ -;;;; $Id: cl-xmpp.lisp,v 1.30 2007/03/04 04:26:23 jstecklina Exp $ +;;;; $Id: cl-xmpp.lisp,v 1.31 2007/03/05 17:38:35 jstecklina Exp $ ;;;; $Source: /project/cl-xmpp/cvsroot/cl-xmpp/cl-xmpp.lisp,v $ ;;;; See the LICENSE file for licensing information. @@ -10,8 +10,8 @@ :accessor server-stream :initarg :server-stream :initform nil) - (server-xstream - :accessor server-xstream + (server-source + :accessor server-source :initform nil) (stream-id :accessor stream-id @@ -317,23 +317,37 @@ (car (funcall stanza-callback stanza connection :dom-repr dom-repr))))))) (defun read-stanza (connection) - (unless (server-xstream connection) - (setf (server-xstream connection) - (cxml:make-xstream (make-slow-stream (server-stream connection)) - :name - (cxml::make-stream-name - :entity-name "stanza" - :entity-kind :main - :uri nil)))) + (unless (server-source connection) + (setf (server-source connection) + (cxml:make-source + (cxml:make-xstream (make-slow-stream (server-stream connection)) + :name + (cxml::make-stream-name + :entity-name "stanza" + :entity-kind :main + :uri nil)) + :buffering nil))) (force-output (server-stream connection)) - (catch 'stanza - (let ((cxml::*initial-namespace-bindings* - (acons #"stream" - #"
http://etherx.jabber.org/streams
" - cxml::*initial-namespace-bindings*))) - (cxml::parse-xstream (server-xstream connection) - (make-instance 'stanza-handler)) - (runes::write-xstream-buffer (server-xstream connection))))) + (let ((source (server-source connection))) + (loop + (multiple-value-bind (key uri lname qname) + (klacks:peek-next source) + (when (eq key :start-element) + (return + (if (and (equal uri "
http://etherx.jabber.org/streams
") + (equal lname "stream")) + ;; Create an element for DOM-TO-EVENT so we don't have to have + ;; any specialized code just to handle stream:stream. + (let* ((document (cxml-dom:create-document)) + (element (dom:create-element document qname))) + (dom:append-child document element) + (dolist (attribute (klacks:list-attributes source)) + (let ((name (sax::attribute-qname attribute)) + (value (sax::attribute-value attribute))) + (dom:set-attribute element name value))) + document) + (klacks:serialize-element source + (cxml-dom:make-dom-builder))))))))) (defmacro with-xml-stream ((stream connection) &body body) "Helper macro to make it easy to control outputting XML --- /project/cl-xmpp/cvsroot/cl-xmpp/cxml.lisp 2005/12/31 20:15:06 1.10 +++ /project/cl-xmpp/cvsroot/cl-xmpp/cxml.lisp 2007/03/05 17:38:35 1.11 @@ -1,53 +1,17 @@ -;;;; $Id: cxml.lisp,v 1.10 2005/12/31 20:15:06 eenge Exp $ +;;;; $Id: cxml.lisp,v 1.11 2007/03/05 17:38:35 jstecklina Exp $ ;;;; $Source: /project/cl-xmpp/cvsroot/cl-xmpp/cxml.lisp,v $ ;;;; See the LICENSE file for licensing information. (in-package :xmpp) -(defclass stanza-handler (cxml:sax-proxy) - ((depth - :initform 0 - :accessor depth))) - -(defun start-sax-document (handler) - (let ((dom-builder (cxml-dom:make-dom-builder))) - (setf (cxml:proxy-chained-handler handler) dom-builder) - (sax:start-document dom-builder) - dom-builder)) - -(defmethod sax:start-element ((handler stanza-handler) uri lname qname attrs) - (declare (ignore uri lname)) - (when (eql (depth handler) 0) - (if (eq :stream\:stream (ensure-keyword qname)) - ;; Create an element for DOM-TO-EVENT so we don't have to have - ;; any specialized code just to handle stream:stream. - (let* ((document (cxml-dom:create-document)) - (element (dom:create-element document qname))) - (dom:append-child document element) - (dolist (attribute attrs) - (let ((name (sax::attribute-qname attribute)) - (value (sax::attribute-value attribute))) - (dom:set-attribute element name value))) - (throw 'stanza document)) - (start-sax-document handler))) - (incf (depth handler)) - (call-next-method)) - -;;; END-ELEMENT will try and call the stanza-callback at every time -;;; it sees depth reach 0 and there is a callback to be called. -;;; This means that we can keep reading from the stream and as we -;;; close out elements we parse them and return them to users -;;; using callbacks (the one supplied to RECEIVE-STANZA-LOOP). -(defmethod sax:end-element ((handler stanza-handler) uri lname qname) - (declare (ignore uri lname qname)) - (decf (depth handler)) - (call-next-method) - (when (eql (depth handler) 0) - (throw 'stanza - (cxml-dom::document (cxml:proxy-chained-handler handler))))) - ;;; Perform single-byte reads to avoid blocking on the socket. +;;; Also print all data read to *DEBUG-STREAM*. +;;; +;;; FIXME: Is this still needed, now that cxml supports :BUFFERING NIL? +;;; The debugging output could be done using a special gray stream that +;;; dribbles input, instead of a special xstream. --david + (defstruct (slow-stream (:constructor make-slow-stream (target))) (target nil :type stream)) @@ -58,22 +22,13 @@ (when (< start end) (let ((byte (read-byte (slow-stream-target stream) nil))) (when byte + (when *debug-stream* + ;; Original comment: + ;; I'd like to see what CXML is reading from the stream + ;; and this code helps us in that regard by printing it + ;; to the *debug-stream* + (write-char (code-char byte) *debug-stream*)) (setf (elt seq start) byte) (incf start)))) start) -;; I'd like to see what CXML is reading from the stream -;; and this code helps us in that regard by printing it -;; to the *debug-stream* -(defun runes::write-xstream-buffer (xstream &optional (stream *debug-stream*)) - (when stream - (write-string (map 'string - #'code-char - (remove runes::+end+ - (subseq (runes::xstream-buffer xstream) 0 - (runes::xstream-read-ptr xstream)))) - stream) - (force-output stream))) - -(defmethod runes::xstream-underflow :before ((input runes:xstream)) - (runes::write-xstream-buffer input)) \ No newline at end of file
1
0
0
0
[cl-xmpp-cvs] CVS cl-xmpp
by jstecklina
04 Mar '07
04 Mar '07
Update of /project/cl-xmpp/cvsroot/cl-xmpp In directory clnet:/tmp/cvs-serv29735 Modified Files: cl-xmpp.lisp Log Message: Replaced fix to namespace problem by suggestion of David Lichteblau --- /project/cl-xmpp/cvsroot/cl-xmpp/cl-xmpp.lisp 2007/03/03 18:42:08 1.29 +++ /project/cl-xmpp/cvsroot/cl-xmpp/cl-xmpp.lisp 2007/03/04 04:26:23 1.30 @@ -1,4 +1,4 @@ -;;;; $Id: cl-xmpp.lisp,v 1.29 2007/03/03 18:42:08 jstecklina Exp $ +;;;; $Id: cl-xmpp.lisp,v 1.30 2007/03/04 04:26:23 jstecklina Exp $ ;;;; $Source: /project/cl-xmpp/cvsroot/cl-xmpp/cl-xmpp.lisp,v $ ;;;; See the LICENSE file for licensing information. @@ -316,16 +316,6 @@ (when stanza-callback (car (funcall stanza-callback stanza connection :dom-repr dom-repr))))))) -;;; XXX: Kludge. Newer versions of CXML rebind *namespace-bindings* -;;; inside of parse-xstream, so the old method of augmenting -;;; *namespace-bindings* inside of read-stanza does not work any -;;; longer. - Julian Stecklina (Mar 03, 2007) - -(unless (assoc #"stream" cxml::*initial-namespace-bindings* - :test #'runes:rod=) - (push (cons #"stream" #"
http://etherx.jabber.org/streams
") - cxml::*initial-namespace-bindings*)) - (defun read-stanza (connection) (unless (server-xstream connection) (setf (server-xstream connection) @@ -337,9 +327,13 @@ :uri nil)))) (force-output (server-stream connection)) (catch 'stanza - (cxml::parse-xstream (server-xstream connection) - (make-instance 'stanza-handler)) - (runes::write-xstream-buffer (server-xstream connection)))) + (let ((cxml::*initial-namespace-bindings* + (acons #"stream" + #"
http://etherx.jabber.org/streams
" + cxml::*initial-namespace-bindings*))) + (cxml::parse-xstream (server-xstream connection) + (make-instance 'stanza-handler)) + (runes::write-xstream-buffer (server-xstream connection))))) (defmacro with-xml-stream ((stream connection) &body body) "Helper macro to make it easy to control outputting XML
1
0
0
0
[cl-xmpp-cvs] CVS cl-xmpp
by jstecklina
03 Mar '07
03 Mar '07
Update of /project/cl-xmpp/cvsroot/cl-xmpp In directory clnet:/tmp/cvs-serv3081 Modified Files: cl-xmpp.lisp Log Message: Fixed READ-STANZA for recent CXML versions. Kludge. Please improve. --- /project/cl-xmpp/cvsroot/cl-xmpp/cl-xmpp.lisp 2006/08/28 21:17:08 1.28 +++ /project/cl-xmpp/cvsroot/cl-xmpp/cl-xmpp.lisp 2007/03/03 18:42:08 1.29 @@ -1,4 +1,4 @@ -;;;; $Id: cl-xmpp.lisp,v 1.28 2006/08/28 21:17:08 jstecklina Exp $ +;;;; $Id: cl-xmpp.lisp,v 1.29 2007/03/03 18:42:08 jstecklina Exp $ ;;;; $Source: /project/cl-xmpp/cvsroot/cl-xmpp/cl-xmpp.lisp,v $ ;;;; See the LICENSE file for licensing information. @@ -316,6 +316,16 @@ (when stanza-callback (car (funcall stanza-callback stanza connection :dom-repr dom-repr))))))) +;;; XXX: Kludge. Newer versions of CXML rebind *namespace-bindings* +;;; inside of parse-xstream, so the old method of augmenting +;;; *namespace-bindings* inside of read-stanza does not work any +;;; longer. - Julian Stecklina (Mar 03, 2007) + +(unless (assoc #"stream" cxml::*initial-namespace-bindings* + :test #'runes:rod=) + (push (cons #"stream" #"
http://etherx.jabber.org/streams
") + cxml::*initial-namespace-bindings*)) + (defun read-stanza (connection) (unless (server-xstream connection) (setf (server-xstream connection) @@ -327,13 +337,9 @@ :uri nil)))) (force-output (server-stream connection)) (catch 'stanza - (let ((cxml::*namespace-bindings* - (acons #"stream" - #"
http://etherx.jabber.org/streams
" - cxml::*namespace-bindings*))) - (cxml::parse-xstream (server-xstream connection) - (make-instance 'stanza-handler)) - (runes::write-xstream-buffer (server-xstream connection))))) + (cxml::parse-xstream (server-xstream connection) + (make-instance 'stanza-handler)) + (runes::write-xstream-buffer (server-xstream connection)))) (defmacro with-xml-stream ((stream connection) &body body) "Helper macro to make it easy to control outputting XML
1
0
0
0
Results per page:
10
25
50
100
200