I'm not sure about this patch.

When I look at that sub,

IQ.pm....
sub on_recv_from_client {
    my ($self, $conn) = @_;

    my $to = $self->to_jid;
    if (! $to || $conn->vhost->uses_jid($to)) {
        $self->process($conn);
        return;
    }

    $self->deliver;
}


That seems to say, if there's no 'to' attribute, it's obviously intended
for the server, not another user.  But if the 'to' is there, and the vhost
uses that JID to represent itself (as opposed to handles_jid, which means
the vhost's domain is the same as the 'to' domain... like the vhost for
livejournal.com 'handles' [EMAIL PROTECTED]), then that means the same
thing as no 'to' attribute, and the server should process it.

What IQ packet XML are you seeing that's spinning the server?



On Mon, 26 Feb 2007, Pedro Melo wrote:

> Hi,
>
> I'm not sure but I think this is a bug. WIth the current code, the
> server goes into a loop.
>
> Basically the code in IQ.pm for on_recv_from_client() fails to
> recognize [EMAIL PROTECTED] as a valid "to the server" IQ. I think the bug
> is that it should be calling
>
> $conn->vhost->handles_jid($to)
>
> and not
>
> $conn->vhost->uses_jid($to)
>
> at line 14.
>
> Attached patch switches to handles_jid.
>
>

Reply via email to