Update of /project/cl-xmpp/cvsroot/cl-xmpp In directory clnet:/home/ehuelsmann/cl-xmpp-cvs
Modified Files: cl-xmpp-sasl.lisp Log Message: Fixed stream reset after SASL authentication. Patch by lichtblau.
--- /project/cl-xmpp/cvsroot/cl-xmpp/cl-xmpp-sasl.lisp 2005/11/17 21:51:15 1.11 +++ /project/cl-xmpp/cvsroot/cl-xmpp/cl-xmpp-sasl.lisp 2008/07/09 19:53:19 1.12 @@ -1,4 +1,4 @@ -;;;; $Id: cl-xmpp-sasl.lisp,v 1.11 2005/11/17 21:51:15 eenge Exp $ +;;;; $Id: cl-xmpp-sasl.lisp,v 1.12 2008/07/09 19:53:19 ehuelsmann Exp $ ;;;; $Source: /project/cl-xmpp/cvsroot/cl-xmpp/cl-xmpp-sasl.lisp,v $
;;;; See the LICENSE file for licensing information. @@ -68,10 +68,19 @@ (if (eq (name second-challenge) :challenge) (progn (send-second-response connection) - (receive-stanza connection)) + (when (eq (receive-stanza connection) + :authentication-successful) + (begin-xml-stream connection) + (reset-stream connection))) second-challenge))))) initial-challenge))))
+(defun reset-stream (connection) + (setf (server-source connection) + (cxml:make-source + (cxml::source-xstream (server-source connection)) + :buffering nil))) + (defmethod initiate-sasl-authentication ((connection connection) mechanism sasl-client) (with-xml-stream (stream connection) (xml-output