[cl-xmpp-devel] Namespace problem

David Lichteblau david at lichteblau.com
Sat Mar 3 21:09:27 UTC 2007


Hi,

Quoting Julian Stecklina (der_julian at web.de):
> One of CXML's functions (p/document) rebinds cxml::*namespace-bindings* 
> to cxml::*initial-namespace-bindings* and so effectively removes 
> "stream" entry placed there by xmpp:read-stanza.

Right, that change was necessary to make CXML re-entrant.  Sorry for not
testing it with CL-XMPP.

On the topic of testing: It would be nicer to get rid of these hacks
completely.  With current CXML, it should be possible to work without
using any cxml internals.  If I submit a patch to change CL-XMPP
accordingly, could you test it for me?

> As this is a showstopper, I committed a workaround to CVS, until there 
> is a real solution to this:
> 
> http://common-lisp.net/cgi-bin/viewcvs.cgi/cl-xmpp/cl-xmpp.lisp?root=cl-xmpp&r1=1.28&r2=1.29

For now, can you try the following patch instead, which would not affect
other uses of cxml in the same image?

--- cl-xmpp.lisp	28 Aug 2006 21:17:08 -0000	1.28
+++ cl-xmpp.lisp	3 Mar 2007 21:01:36 -0000
@@ -327,10 +327,10 @@
 			      :uri nil))))
   (force-output (server-stream connection))
   (catch 'stanza
-    (let ((cxml::*namespace-bindings*
+    (let ((cxml::*initial-namespace-bindings*
            (acons #"stream"
                   #"http://etherx.jabber.org/streams"
-                  cxml::*namespace-bindings*)))
+                  cxml::*initial-namespace-bindings*)))
       (cxml::parse-xstream (server-xstream connection)
                            (make-instance 'stanza-handler))
       (runes::write-xstream-buffer (server-xstream connection)))))


David



More information about the cl-xmpp-devel mailing list