raw is not cloned in XMLElement::clone()

Brad Fitzpatrick brad at danga.com
Wed Feb 14 13:58:08 UTC 2007


Good find.  Fixed in svn 741.

On Mon, 5 Feb 2007, Pedro Melo wrote:

> Hi,
>
> the raw field is not cloned by XMLElement::clone. Shouldn't it be?
>
> Case in point: hooking PresenceCheck, created presence stanza with
> DJabberd::Presence->available($from) and then used set_raw() to add
> capability child (XEP-0115).
>
> When the fallback runs in DJabberd::Presence::_process_inbound_probe
> (), the clone() will not copy the capabilities.
>
> For now, I've added the a
>
>      $clone->{raw}      = $self->{raw};
>
> to XMLElement::clone(), but I'm not sure if this breaks something. I
> think it doesn't.
>
> Best regards,
> --
> Pedro Melo
> Blog: http://www.simplicidade.org/notes/
> Jabber ID: melo at simplicidade.org
> Use Jabber!
>
>
>


More information about the Djabberd mailing list