[cl-xmpp-devel] patch: connect-tls broken
Stas Boukarev
stassats at gmail.com
Tue Mar 30 17:48:18 UTC 2010
On Fri, Mar 19, 2010 at 11:36 AM, Jakob Reschke <jakob at resfarm.de> wrote:
> Hi,
>
> with the most recent CVS version, connect-tls was broken for me.
>
> Connect calls Make-instance <specified connection class> and supplies
> :stanza-callback together with the equally named keyword argument for
> Connect. In the defclass of xmpp:connection, stanza-callback's
> initform is 'default-stanza-callback, which seems reasonable. But in
> connect, by default nil was supplied for make-instance, leaving the
> connection without any stanza-callback. Connect-tls needs to receive
> a stanza from the server, but without a stanza-callback,
> receive-stanza always returns nil. That's why Connect-tls raises an
> no-applicable-method-error (nil instead of a received stanza).
>
> I fixed the issue by passing :stanza-callback initarg and value only
> if something non-nil has been supplied to Connect. I'm using an
> appending loop that checks the initargs of Connect. I'm appending a
> diff.
>
> best regards
> Jakob
>
> cvs diff: Diffing .
> Index: cl-xmpp.lisp
> ===================================================================
> RCS file: /project/cl-xmpp/cvsroot/cl-xmpp/cl-xmpp.lisp,v
> retrieving revision 1.35
> diff -r1.35 cl-xmpp.lisp
> 101,106c101,104
> < (connection (make-instance class
> < :jid-domain-part jid-domain-part
> < :server-stream stream
> < :hostname hostname
> < :port port
> < :stanza-callback stanza-callback)))
> ---
>> (connection (apply #'make-instance class
>> (loop for keyword in (list :jid-domain-part :server-stream :hostname :port :stanza-callback)
>> and value in (list jid-domain-part stream hostname port stanza-callback)
>> when value append (list keyword value)))))
>
> _______________________________________________
> cl-xmpp-devel mailing list
> cl-xmpp-devel at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/cl-xmpp-devel
>
I sent a patch for this before, but it wasn't applied. Can you try it instead?
http://common-lisp.net/pipermail/cl-xmpp-devel/2008-August/000295.html
--
With best regards, Stas.
More information about the cl-xmpp-devel
mailing list